@databricks/aibi-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.0-alpha.5 • Public • Published

Databricks AI / BI browser client

An API to assist developers in integrating AI/BI dashboards into their applications (AWS, Azure, GCP).

Usage

Basic Usage

const dashboard = new DatabricksDashboard({
  workspaceId: '1234567890123456',
  instanceUrl: 'https://my-databricks-instance.com',
  container: document.getElementById('dashboard-container'),
  dashboardId: 'abcdedf123456',
  token: tokenThatCanBeSeenByViewers,
});

dashboard.initialize();

Handling Token Expiration for Seamless Viewer Experience

To support long-running dashboard, you can pass a getNewToken function that automatically refreshes the token before it expires. Note that this approach will not work in scenarios where the token is exchanged with the Identity Provider (IdP). These scenarios require direct user action to re-mint the token, which is not supported. However, for use cases where the token is minted using a service principal, renewal should be straightforward to implement.

const dashboard = new DatabricksDashboard({
  // ...other required options
  getNewToken: async () => {
    // Return a string literal token value to the API
  },
});

Set up Color Scheme

You can configure the embedded dashboard’s color scheme using the colorScheme option.

The colorScheme option maps to the CSS color-scheme property, which allows the embedded dashboard to respect or override the user’s light or dark preference.

const dashboard = new DatabricksDashboard({
  // ...other required options
  colorScheme: 'light dark', // or "light", or "dark"
});

Readme

Keywords

none

Package Sidebar

Install

npm i @databricks/aibi-client

Weekly Downloads

16

Version

0.0.0-alpha.5

License

none

Unpacked Size

18.6 kB

Total Files

8

Last publish

Collaborators

  • danny-thielman_data