Skip to content

fix name for postgresql - #1482

Merged
mistercrunch merged 2 commits into
apache:masterfrom
willgroves:fix_postgres_time_grains
Oct 30, 2016
Merged

mistercrunch merged 2 commits into
apache:masterfrom
willgroves:fix_postgres_time_grains

Conversation

@willgroves

Copy link
Copy Markdown
Contributor

The code change in ef2670c caused tables on a postgres backend to lose the time grain selector in the table explorer (i.e. cannot see/select a time grain after this code change).

The previous code used startswith to match the database driver type (which was looking to match 'postgres' and 'postgresql').

https://github.com/airbnb/caravel/blob/8626c80d3a491b842f8262c5807154903c107747/caravel/models.py#L775

The new version requires matching the whole string so a postgresql:// uri will not match postgres.

https://github.com/airbnb/caravel/blob/ef2670ca32e8ba0a04f9dc7899db55812e2f9b46/caravel/models.py#L1365

The fix sets postgresql as the engine name. This corresponds to the sqlalchemy doc as well.

@mistercrunch

Copy link
Copy Markdown
Member

thanks for the fix!

@mistercrunch
mistercrunch merged commit 248e6a7 into apache:master Oct 30, 2016
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.13.0 First shipped in 0.13.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.13.0 First shipped in 0.13.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants