Embedded Data Apps
IMPORTANT
Embedded Data Apps are available through an early adopter program (EAP) currently and activated for customers through coordination with TetraScience. The apps may require changes in future releases. For more information, or to activate the Tetra Data & AI Workspace and Embedded Data Apps in your TDP environment, contact your customer success manager (CSM) or account executive.
Embedded Tetra Data Apps run in the cloud and are configured for software as a service (SaaS) application streaming back to the Tetra Data Platform (TDP), so users can access them through the Tetra Data & AI Workspace.
For a list of available Embedded Data Apps, see Supported Data Apps.
Activate an Embedded Data App
NOTE
Only an organization administrator (Org Admin) can activate, edit, or deactivate an Embedded Data App.
To activate an Embedded Data App, do the following:
- Sign in to the Tetra Data Platform (TDP) with an Org Admin role.
- In the left navigation menu, choose Data & AI Workspace. The Data & AI Workspace page appears.
- Select the Apps tab.
- Next to EMBEDDED DATA APPS, select the three-dot menu icon. Then, choose Manage. The Manage Data Apps dialog appears.
- In the dialog, select a data app to enable. For Embedded Data Apps, select which container version you want to use in the dropdown to the right in that app's row.
- Choose Save. A new data app tile appears under the EMBEDDED DATA APPS section. Depending on the selected application, the app may take up to 10 minutes to activate. After activation completes, the Embedded Data App is accessible to all members of your organization.
Edit Embedded Data Apps Settings for Your Org
To help with availability and control cost, you can edit Embedded Data Apps settings for your entire organization.
IMPORTANT
When you update Embedded Data Apps settings, all active sessions are automatically disconnected for about 15 minutes. The Data & AI Workspace page is deactivated for all users while the updates are in progress.
To edit Embedded Data Apps settings for your organization, do the following:
- Sign in to the Tetra Data Platform (TDP) with an Org Admin role.
- In the left navigation menu, choose Data & AI Workspace. The Data & AI Workspace page appears.
- Select the Apps tab.
- Next to EMBEDDED DATA APPS, select the three-dot menu icon. Then, choose Streaming Settings. The Embedded Data Apps Settings dialog appears.
- In the Embedded Data Apps Settings dialog, you can adjust any of the following settings for Embedded Data Apps in your organization. Then, choose Save to commit the changes.
Embedded Data Apps Settings
Field | Description |
---|---|
Compute Size | Memory and vCPU settings. You can choose from the following options: - Small: 2 vCPU and 8 GB RAM - Medium: 4 vCPU and 16 GB RAM - Large: 8 vCPU and 32 GB RAM |
Minimum Users | The minimum number of running instances. |
Maximum Users | The maximum number of running instances. |
Idle Timeout (mins) | The amount of time that users can be idle (inactive) before they are disconnected from their streaming session. The maximum timeout period is 60 minutes. A 0 makes it so that users are not disconnected because of inactivity. |
Max Session Duration | The maximum amount of time (hours) that a streaming session can remain active. If users are still connected five minutes before this limit is reached, they're prompted to save before being disconnected. Minimum value is 1 hour. Maximum value is 120 hours. |
Image Version | The underlying image version used during a streaming session. |
Connect External Systems to an Embedded Data App
To connect an Embedded Data App to an external system, such as Databricks or Snowflake, first create a new Data App Provider on the Providers tab. Then, add the provider to the Data App in the Tetra Data & AI Workspace.
Create a New Data App Provider
To create a new Data App Provider, do the following:
- Sign in to the TDP with an Administrator role.
- In the left navigation menu, choose Data & AI Workspace. The Data & AI Workspace page appears.
- Select the Providers tab.
- Choose Create new Provider. The Create Data App Provider dialog appears.
- In the Provider Template field, either select one of the preconfigured provider templates (for example, Databricks, Snowflake, Benchling, or Nvidia) or select Custom Provider to configure another provider. Then, fill in all of the required secrets fields, which vary between each external system.
- Choose Save. Then, add the provider to an app.
Add a Provider to an Embedded Data App
To add a provider that you've already configured to an Embedded Data App, do the following:
- Sign in to the TDP with an Administrator role.
- In the left navigation menu, choose Data & AI Workspace. The Data & AI Workspace page appears.
- Select the Apps tab.
- Next to EMBEDDED DATA APPS, select the three-dot menu icon. Then, choose Manage. The Manage Data Apps dialog appears.
- In the tile for the Streamlit-based app that you want to connect your external system to, choose + Add Provider. A list of available providers appears.
- Select a provider. Then, choose Save.
Access Provider Secrets
After you add a provider to an Embedded Data App, the provider's secrets are automatically made available to your application as environment variables. This setup allows your Data App code to securely access external system credentials and configuration values.
Environment Variable Names
Environment Variable Name Format: {PROVIDER_NAME}_{FIELD_NAME}
Provider field names are converted to environment variable names using the following transformation rules:
- Provider name and field name values are converted to uppercase
- Dots (
.
), spaces, and hyphens (-
) are replaced with underscores (\_
) - Characters that aren't letters, numbers, or underscores are removed
Determining Environment Variable Names
To determine the exact environment variable names for your specific provider configuration, do the following:
- Take note of your provider's name as it appears in the TDP user interface.
- Identify the field names you configured when creating the provider.
- Apply the naming convention transformation rules described in Environment Variable Names
- Use the resulting environment variable names in your application code.
Environment Variable Naming Examples
OpenAI Provider
- Provider name:
"OpenAI"
- Field name:
"api_key"
- Environment variable:
OPENAI_API_KEY
Databricks Provider
- Provider name:
"My Databricks"
- Field name:
"server-hostname"
- Environment variable:
MY_DATABRICKS_SERVER_HOSTNAME
Custom Provider
- Provider name:
"Lab.System-1"
- Field name:
"access.token"
- Environment variable:
LAB_SYSTEM_1_ACCESS_TOKEN
NOTE
Environment variables are only available when the provider is successfully attached to your Embedded Data App. If you don't see expected values, verify that the provider has been properly added to your data app through the Manage Data Apps dialog.
Accessing Environment Variables in Your Code
Python
import os
# Access the OpenAI API key
api_key = os.environ.get("OPENAI_API_KEY")
# Access Databricks hostname
databricks_host = os.environ.get("MY_DATABRICKS_SERVER_HOSTNAME")
JavaScript/Node.js
// Access the OpenAI API key
const apiKey = process.env.OPENAI_API_KEY;
// Access Databricks hostname
const databricksHost = process.env.MY_DATABRICKS_SERVER_HOSTNAME;
Deactivate an Embedded Data App
To deactivate an Embedded Data App for your organization, do the following:
- Sign in to the TDP with an Org Admin role.
- In the left navigation menu, choose Data & AI Workspace. The Data & AI Workspace page appears.
- Select the Apps tab.
- Next to EMBEDDED DATA APPS, select the three-dot menu icon. Then, choose Manage. The Manage Data Apps dialog appears.
- Deselect the Data App you want to remove and choose Save. The Data App tile is removed from the EMBEDDED DATA APPS section and is no longer accessible to organization members.
Troubleshooting
An Embedded Data App Opens in One TDP Environment and Not Another
If an Embedded Data App opens in one of your TDP environments, but not another, and it returns a 400
error code, it's likely because of a cookie caching issue.
To resolve the issue, clear the cookies in your web browser for all TDP related domains (domains ending in <*>.tetrascience.com
).
Documentation Feedback
Do you have questions about our documentation or suggestions for how we can improve it? Start a discussion in TetraConnect Hub. For access, see Access the TetraConnect Hub.
NOTE
Feedback isn't part of the official TetraScience product documentation. TetraScience doesn't warrant or make any guarantees about the feedback provided, including its accuracy, relevance, or reliability. All feedback is subject to the terms set forth in the TetraConnect Hub Community Guidelines.
Updated about 2 hours ago