Analyze Lakebase Data in Infragistics Reveal
Reveal is a data visualization solution provided by Infragistics and can be paired with the CData API Server to build dynamic dashboards from live Lakebase data. The CData API Server generates an OData API for Lakebase, which is natively consumable in Reveal. In this article, we walk through connecting to Lakebase in API Server and connecting to the API Server from Infragistics Reveal to create a simple dashboard.
Connect to Lakebase from API Server
CData API Server uses a straightforward, point-and-click interface to connect to data sources and generate APIs.
- Open API Server and click Settings -> Connection -> Add Connection
- Select "Lakebase"
- Enter the necessary authentication properties to connect to Lakebase.
To connect to Databricks Lakebase, start by setting the following properties:
- DatabricksInstance: The Databricks instance or server hostname, provided in the format instance-abcdef12-3456-7890-abcd-abcdef123456.database.cloud.databricks.com.
- Server: The host name or IP address of the server hosting the Lakebase database.
- Port (optional): The port of the server hosting the Lakebase database, set to 5432 by default.
- Database (optional): The database to connect to after authenticating to the Lakebase Server, set to the authenticating user's default database by default.
OAuth Client Authentication
To authenicate using OAuth client credentials, you need to configure an OAuth client in your service principal. In short, you need to do the following:
- Create and configure a new service principal
- Assign permissions to the service principal
- Create an OAuth secret for the service principal
For more information, refer to the Setting Up OAuthClient Authentication section in the Help documentation.
OAuth PKCE Authentication
To authenticate using the OAuth code type with PKCE (Proof Key for Code Exchange), set the following properties:
- AuthScheme: OAuthPKCE.
- User: The authenticating user's user ID.
For more information, refer to the Help documentation.
Add Lakebase Resource Definitions in API Server
After connecting to Lakebase, create Resources, which represent API endpoints for Lakebase data.
- Click Settings -> Resources -> Add Resource
- Select the Lakebase connection
- Select the table you wish to retrieve and click Next
- (Optional) Edit the resource to select specific fields and more
- Save the settings
Add an API Server User
Create a User to connect to Lakebase from Reveal through API Server.
- Click Settings -> Users
- Click Add
- Configure a User with access to the Lakebase Connection and Resource(s)
(Optional) Configure Cross-Origin Resource Sharing (CORS)
When accessing and connecting to multiple different domains from an application such as Ajax, there is a possibility of violating the limitations of cross-site scripting. In that case, configure the CORS settings in Settings -> Server.
- Enable cross-origin resource sharing (CORS): ON
- Allow all domains without '*': ON
- Access-Control-Allow-Methods: GET, PUT, POST, OPTIONS
- Access-Control-Allow-Headers: Authorization
Save the changes to the settings.
Create a Dashboard in Reveal
With the API Server configured, we can visualize Lakebase data in Reveal.
- Log into Reveal and click Dashboards -> New
- Click Data Source -> OData Feed
- Specify the API Server API endpoint URL, for example: https://serverurl/api.rsc
- Select Generic Credentials and specify the API Server username and authentication token
- Select the entity you wish to visualize
- Select fields and choose a chart type
More Information & Free Trial
At this point, you have created a simple dashboard from live Lakebase data. For more information on creating OData feeds from Lakebase (and more than 150 other sources), visit the API Server page. Download a free, 30-day trial and start working live Lakebase data in tools that consume OData APIs.