Viewing Lakebase Data in RAD Studio Data Explorer

Dibyendu Datta
Dibyendu Datta
Lead Technology Evangelist
How to view Lakebase data in RAD Studio Data Explorer using the CData ODBC Driver for Lakebase.

Embarcadero RAD Studio provides a development environment for Delphi and C++Builder applications. With the CData ODBC Driver for Lakebase, you gain access to live Lakebase data within RAD Studio, abstracting the data into tables, views, and stored procedures that can be used to both retrieve and update Lakebase data. This article will walk through connecting to Lakebase using the Data Explorer.

Configure a Connection to Lakebase

If you have not already, first specify connection properties in an ODBC DSN (data source name). This is the last step of the driver installation. You can use the Microsoft ODBC Data Source Administrator to create and configure ODBC DSNs.

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:

  1. Create and configure a new service principal
  2. Assign permissions to the service principal
  3. 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.

Connecting to Lakebase Data Using Data Explorer

You can create a simple application for displaying Lakebase data by utilizing the CData FireDAC Components for Lakebase and a new VCL Forms Application:

  1. Open the Data Explorer in RAD Studio and expand FireDAC.
  2. Right-click the ODBC Data Source node in the Data Explorer.
  3. Click Add New Connection.
  4. Enter a name for the connection.
  5. In the FireDAC Connection Editor that appears, set the DataSource property to the name of the ODBC DSN for Lakebase.
  6. Back in the Data Explorer, expand the tables for the connection.
  7. Create a new VCL Forms application and drag a table (for example: Orders) onto the form.

  8. Select the OrdersTable object on the form and set the Active property to true.
  9. Right-click on the object, bind visually, and link everything (*) to a new control (TStringGrid).

  10. Arrange the TStringGrid on the form and run the application to see the Orders data.

Related Articles

Below you can find other articles for using the CData ODBC Driver with RAD Studio, Delphi, and C++ Builder.

Ready to get started?

Download a free trial of the Lakebase ODBC Driver to get started:

 Download Now

Learn more:

Lakebase Icon Lakebase ODBC Driver

The Lakebase ODBC Driver is a powerful tool that allows you to connect with live data from Lakebase, directly from any applications that support ODBC connectivity.

Access Lakebase data like you would a database - read, write, and update Lakebase 0, etc. through a standard ODBC Driver interface.