export DBT_USAGE_VER=v1 && dbt run
-
Create a new connection in the production Dalgo org
superset_usage
. The connection is to pull superset metadata -
Make sure the destination schema name used is same as org slug in the dalgo backend. Since this is the slug on which we do the
rls
& make sure that the org sees only their data when they head toAnalysis -> Usage
-
Add the following tables/streams in the connection
- logs (append/dedup on
dttm
with pk asid
) - ab_user (overwrite)
- ab_user_role (overwrite)
- ab_role (overwrite)
- slices (overwrite)
- dashboards (overwrite)
- dashboard_roles (overwrite)
- logs (append/dedup on
-
Sync the connection
-
Create a new branch on this repo
-
Update the
macros/fetch_org_names.sql
macros & add new org slug name -
Add a new source for the org (those 7 streams) in
models/sources/schema.yml
. Name of the source should be same as its org slug -
Run a full refresh on logs. This is needed for the first time
export DBT_USAGE_VER=v1 && dbt run --vars '{"full_refresh_logs_for_org": "<new_org_slug>"}'
-
Push all the code to git and submit the PR.
-
Setup a daily pipeline to sync the superset metadata for this org frmo the orchestrate page. Make sure its setup before the
Dbt transform
pipeline -
An example PR