Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: infer dbt models from dataset #132

Merged
merged 2 commits into from
Oct 25, 2022
Merged

feat: infer dbt models from dataset #132

merged 2 commits into from
Oct 25, 2022

Conversation

betodealmeida
Copy link
Member

The CLI currently offers a command to populate dbt exposures — these are charts and dashboards in Superset that were created based on datasets that map back to dbt models.

Currently, the CLI uses extra metadata that is added to datasets when the CLI syncs them from dbt to Superset, eg:

{
  "datasource_type": "table",
  "schema": "public",
  "table_name": "messages_channels",
  ...
  "extra": {
    "resource_type": "model",
    "unique_id": "model.superset_examples.messages_channels",
    "depends_on": "ref('messages_channels')"
  }
}

This makes the process of determining which charts and dashboards read from dbt models easy, since we can just check the extra metadata.

A customer has expressed the need for populating exposures from Preset when they have created the dataset manually. Since the datasets don't have the extra metadata, we need to infer the model references from the schema and table name.

@betodealmeida
Copy link
Member Author

Closes #130.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants