Connection to Databricks using Cube.py
- Dominant language
- Rust
- Stars
- 20.8k
- Forks
- 2.1k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 181
Description
I am using the below code to test multitenancy in cube cloud , I have two catalog which i pass as the customer_groupd_code
and my cube.py settings is this
```
@config('driver_factory')
def driver_factory(ctx: dict):
try:
customer_group_code = ctx['securityContext']['customer_group_code']
except KeyError:
raise ValueError('No customer_group_code found in Security Context!')
catalog = customer_group_code
databricks_token = os.getenv('CUBEJS_DB_DATABRICKS_TOKEN')
jdbc_url = os.getenv('CUBEJS_DB_DATABRICKS_URL')
if not databricks_token or not jdbc_url:
raise ValueError('Databricks token or URL not found in environment variables!')
return {
"type": "databricks-jdbc",
"url":jdbc_url,
"catalog":catalog
}
``` , Please help me out in this issue
Contributor guide
Assessment
This issue has not been assessed yet.