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

(fix)Exposures definitions and added ability to preserve columns #221

Merged
merged 8 commits into from
Jun 29, 2023

Conversation

Vitor-Avila
Copy link
Contributor

This PR addresses a few issues with the exposures sync:

This PR also introduces a new flag to the dbt sync: --preserve-columns. By default, the sync would update existing datasets in Superset with override_columns=True, which resets the column definition (groupby and filterable configurations) and also sync columns from the dataset. This could potentially misconfigure existing columns in Superset, or bring back to the datasets columns that were intentionally excluded. This behavior will be kept by default (since the main use-case for the dbt integration is to have the dbt info as the source of truth), however if the --preserve-columns flag is included in the dbt sync command, the update dataset API calls would include override_columns=False, preserving column configurations and avoiding a column sync.

@Vitor-Avila Vitor-Avila changed the title (fix)Exposures definitions and added ability to preserve colums (fix)Exposures definitions and added ability to preserve columns Jun 21, 2023
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/preset_cli/cli/superset/sync/dbt/command.py Outdated Show resolved Hide resolved
src/preset_cli/cli/superset/sync/dbt/command.py Outdated Show resolved Hide resolved
src/preset_cli/cli/superset/sync/dbt/exposures.py Outdated Show resolved Hide resolved
src/preset_cli/cli/superset/sync/dbt/exposures.py Outdated Show resolved Hide resolved
Vitor-Avila and others added 7 commits June 29, 2023 00:15
@Vitor-Avila Vitor-Avila merged commit 3208363 into main Jun 29, 2023
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