Model Context Protocol (MCP) finally gives AI models a way to access the business data needed to make them really useful at work. CData MCP Servers have the depth and performance to make sure AI has access to all of the answers.
Try them now for free →Access REST Data as OData Feeds in Tableau
Use the Tableau Desktop business intelligence tool to connect to REST data using the API Server.
The CData API Server, when paired with the ADO.NET Provider for REST (or any of 200+ other ADO.NET Providers), provides REST data as OData Web services. This article will explain how to use the API Server to provide the underlying connectivity to REST data in Tableau's business intelligence tool.
Set Up the API Server
Follow the steps below to begin producing secure REST OData services:
Deploy
The API Server runs on your own server. On Windows, you can deploy using the stand-alone server or IIS. On a Java servlet container, drop in the API Server WAR file. See the help documentation for more information and how-tos.
The API Server is also easy to deploy on Microsoft Azure, Amazon EC2, and Heroku.
Connect to REST
After you deploy the API Server and the ADO.NET Provider for REST, provide authentication values and other connection properties needed to connect to REST by clicking Settings -> Connections and adding a new connection in the API Server administration console.
See the Getting Started chapter in the data provider documentation to authenticate to your data source: The data provider models REST APIs as bidirectional database tables and XML/JSON files as read-only views (local files, files stored on popular cloud services, and FTP servers). The major authentication schemes are supported, including HTTP Basic, Digest, NTLM, OAuth, and FTP. See the Getting Started chapter in the data provider documentation for authentication guides.
After setting the URI and providing any authentication values, set Format to "XML" or "JSON" and set DataModel to more closely match the data representation to the structure of your data.
The DataModel property is the controlling property over how your data is represented into tables and toggles the following basic configurations.
- Document (default): Model a top-level, document view of your REST data. The data provider returns nested elements as aggregates of data.
- FlattenedDocuments: Implicitly join nested documents and their parents into a single table.
- Relational: Return individual, related tables from hierarchical data. The tables contain a primary key and a foreign key that links to the parent document.
See the Modeling REST Data chapter for more information on configuring the relational representation. You will also find the sample data used in the following examples. The data includes entries for people, the cars they own, and various maintenance services performed on those cars.
When you configure the connection, you may also want to set the Max Rows connection property. This will limit the number of rows returned, which is especially helpful for improving performance when designing reports and visualizations.
You can then choose the REST entities you want to allow the API Server to access by clicking Settings -> Resources.
Additionally, click Settings -> Server and set the Default Format to XML (Atom) for compatibility with Tableau.
Authorize API Server Users
After determining the OData services you want to produce, authorize users by clicking Settings -> Users. The API Server uses authtoken-based authentication and supports the major authentication schemes. Access can also be restricted based on IP address; by default only connections to the local machine are allowed. You can authenticate as well as encrypt connections with SSL.
Create Real-Time REST Data Visualizations
Follow the steps below to create data visualizations based on the remote REST data:
-
In Tableau, select 'Connect to data'. In the 'On a server' section, click OData.
-
In the resulting wizard, enter the URL of the OData endpoint for the API Server. Append the name of the table you want to access to the OData entry URL. For example:
https://your-server/api.rsc/people
-
Select the
'Use a Username and Password' option and enter the username and password of a user who has access to the API Server.
-
Tableau uses the table metadata exposed by the API Server to detect dimension and measure columns.
-
To view the REST data, right-click under the table name in the Data section of the dashboard and select the View Data option. The REST data will appear in Tableau.