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

Stop duplicating datasources #1321

Merged
merged 3 commits into from
Oct 12, 2016
Merged

Stop duplicating datasources #1321

merged 3 commits into from
Oct 12, 2016

Conversation

bkyryliuk
Copy link
Member

There is a constraint on the SQL side, but it was introduces after quite big set of duplicates was created. To make the clean up process manageable - we should prevent users from creating more duplicated definitions of tables and druid datasources.

Partially helps #1306.

Reviewers:

database_id=table.database.id,
).all()
# table object is already added to the session
if len(existing_tables) > 1:
Copy link
Member

Choose a reason for hiding this comment

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

NIT (optional): could use funct.count or .count() but no biggy

@mistercrunch
Copy link
Member

LGTM

@bkyryliuk
Copy link
Member Author

Thanks !

@bkyryliuk bkyryliuk merged commit 8626c80 into apache:master Oct 12, 2016
@bkyryliuk bkyryliuk deleted the prevent_duplicates branch October 12, 2016 19:48
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this pull request Nov 26, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.12.0 labels Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants