Secure Direct Access
Elementum provides secure, in-place data access to your Databricks Lakebase Postgres database:Authentication
Native PostgreSQL role with password authenticates Elementum. You retain full control over the data and can terminate access at any time.
In-Place Access
Data stays in your Databricks instance. No data is copied or moved to external systems.
How It Works
Databricks Side
A Lakebase Postgres instance provides a managed PostgreSQL database. Service principal permissions control access to the database.
What is Lakebase Postgres?
Lakebase Postgres is a fully managed, cloud-native PostgreSQL database within Databricks. Key features:Managed PostgreSQL
A complete PostgreSQL database with its own compute and storage, not just a gateway to Delta tables.
Serverless Scaling
Automatically scales compute based on workload. Supports scale-to-zero for cost efficiency.
Unity Catalog Integration
Optionally register managed database catalogs to sync with Unity Catalog tables.
Standard Postgres
Uses standard PostgreSQL syntax, permissions, and tools. Connect with any Postgres client.
Security Architecture
Data Encryption
At Rest:
- Database encrypted using industry-standard algorithms
- Credentials encrypted and never exposed
- All traffic encrypted using TLS (sslmode=require)
- Secure connection via PostgreSQL protocol
Access Control
Authentication:
- Native PostgreSQL role with password
- No token expiration (persistent connections)
- PostgreSQL role-based permissions
- Managed at the Lakebase instance level
Setting up Elementum Access in Databricks
Prerequisites
Before starting:- Ensure you have Workspace Admin or Account Admin access
- Have access to create Lakebase Postgres instances
- Have access to create Lakebase Postgres instances
Setup Steps Overview
Run These Steps in Databricks
Create Lakebase Postgres Instance
Set up the managed PostgreSQL database:
- In your Databricks workspace, go to Compute
- Click the Lakebase Postgres tab
- Click Create
- Configure the instance:
- Name:
elementum-lakebase - Instance size (Capacity Unit):
2(adjust based on workload) - Serverless usage policy:
None(or configure as needed)
- Name:
- Click Create
- Wait for the instance to show Status: Available
Enable Native Postgres Login
Enable password-based authentication for the Lakebase instance:
- On the Lakebase instance page, click Edit in the upper-right
- Turn on Enable Postgres Native Role Login
- Click Save
This allows creating Postgres roles with passwords that don’t expire, which is required for persistent connections like Elementum CloudLink.
Get Connection Details
Note the connection parameters from the Lakebase instance:
- Click on the instance name (
elementum-lakebase) - Go to the Connection details tab
- Note the Connection parameters:
- host:
instance-<uuid>.database.cloud.databricks.com - dbname:
databricks_postgres(default database) - port:
5432
- host:
The hostname format is:
instance-<instance-id>.database.cloud.databricks.comCreate Elementum Role with Password
Connect to the Lakebase instance via the New Query button or psql, and create a role for Elementum:
Grant Permissions to Elementum Role
Grant the Elementum role appropriate access to your data:
Choose Your Permission Level
- Superuser (Simplest)
- Specific Permissions (Recommended)
For the simplest setup, grant superuser privileges:
Note: This grants full access to all schemas and tables. Use specific permissions below if you need tighter access control.
Permission Examples
- Full Access (Read/Write)
- Read-Only Access
- Specific Tables Only
Create Platform Schema for Elementum
Create the platform schema and grant the Elementum role full access:
(Optional) Register Managed Database Catalog
If you want to access Unity Catalog tables through Lakebase:
- On the Lakebase instance page, go to the Catalogs tab
- Click Create managed database catalog
- Select the Unity Catalog you want to expose
- This creates a bridge between your Delta tables and the Postgres interface
Managed database catalogs allow you to query Unity Catalog tables using standard PostgreSQL syntax through your Lakebase instance.
Configuring CloudLink in Elementum
After completing the Databricks setup, configure the connection in Elementum:Enter Connection Details
Fill in the connection form:
| Field | Value | Description |
|---|---|---|
| Name | Production Databricks | Descriptive name for your connection |
| Hostname | instance-<uuid>.database.cloud.databricks.com | Your Lakebase Postgres hostname |
| Port | 5432 | PostgreSQL port |
| Database | databricks_postgres | The Lakebase database name |
| Schema | elementum_platform | The empty platform schema (NOT your data schema) |
| Username | elementum | The Postgres role name you created |
| Password | your-strong-password-here | The password you set for the role |
Test the Connection
Click Save to test the connection. The system will verify:
- Network connectivity
- PostgreSQL authentication
- Schema access
If the connection saves successfully, your setup is complete.
Configure Data Access
After saving the connection:
- Select Tables: Choose which tables to expose in Elementum
- Configure Field Mapping: Map columns to Elementum field types
- Set Primary Key: Identify the unique identifier column for each table
- Configure Permissions: Set which users/roles can access the data
Verification and Testing
After completing the setup, verify everything is working:Test Connection via psql
You can test the connection using the psql command from the Connection details tab:When prompted for password, enter the password you set for the
elementum role.Troubleshooting
Connection Issues
Connection Issues
Cannot Connect from Elementum:
- Verify the Lakebase instance is in “Available” status
- Confirm the password is correct
- Check that the Postgres role has been created and granted appropriate permissions
- Verify the hostname is correct (should be
instance-<uuid>.database.cloud.databricks.com)
- Verify the role name and password are correct
- Ensure Enable Postgres Native Role Login is turned on
- Confirm the role was created with
LOGINprivilege
Cannot See Data Tables
Cannot See Data Tables
Tables not visible in Elementum:
- Most common cause: You entered your data schema in the Schema field instead of the platform schema
- Verify the Postgres role has the appropriate permissions
- Check that tables exist in the database
- If using managed database catalogs, verify the catalog is registered
Permission Errors
Permission Errors
“Permission denied” Errors:
- Verify the Postgres role has appropriate GRANT permissions
- Check that
databricks_superuseror appropriate roles are granted - For specific table access, verify GRANT statements have been run
Lakebase Instance Issues
Lakebase Instance Issues
Instance not starting:
- Check if you’ve reached capacity limits
- Verify workspace has Lakebase Postgres enabled
- Contact Databricks support if the instance stays in “Starting” state
- Lakebase instances can scale to zero when idle
- The instance will automatically resume when a connection is made
- First connection after suspension may take a few seconds
Security Best Practices
Principle of Least Privilege
- Grant only necessary PostgreSQL roles
- Use specific table grants instead of superuser where possible
- Regularly audit granted permissions
- Remove unused Postgres roles
Credential Security
- Rotate passwords periodically (recommended: every 90 days)
- Store passwords securely (never in code)
- Use separate Postgres roles for different environments
- Never share credentials outside authorized personnel
Network Security
- Lakebase uses TLS encryption by default (sslmode=require)
- Consider workspace-level IP access controls
- Monitor connection logs regularly
- Set up alerts for suspicious activity
Monitoring
- Review query history via Lakebase Metrics tab
- Monitor compute costs
- Set up cost alerts in Databricks
- Track data access patterns
Next Steps
Configure Apps
Set up your first app in Elementum using your connected data
Create Automations
Build workflows that act on your Databricks data
Setup AI Features
Enable AI-powered search, automations, and insights
Data Best Practices
Optimize your data models for Elementum
Additional Resources
CloudLink Overview
Learn more about CloudLink architecture
Databricks Documentation
Official Lakebase Postgres documentation
Get Support
Contact our team for setup assistance
This guide reflects the latest Databricks Lakebase Postgres and Elementum best practices. For additional assistance, contact support@elementum.io.