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 for run and docs generate on Panoply Redshift #1686

Merged
merged 1 commit into from
Aug 19, 2019
Merged

Conversation

drewbanin
Copy link
Contributor

@drewbanin drewbanin commented Aug 16, 2019

Thanks @gautam-ndk for your help in debugging this!

Panoply has two sql rewriting bugs:

  • whitespace before the query begins can cause queries to fail 💀
  • identifiers named columns cause problems; I am quoting or renaming them here

fixes #1479

Copy link
Member

@cmcarthur cmcarthur left a comment

Choose a reason for hiding this comment

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

i did leave you one comment, but this looks fine to me

@@ -80,7 +80,7 @@
numeric_precision,
numeric_scale

from {{ relation.information_schema('columns') }}
Copy link
Member

Choose a reason for hiding this comment

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

how confident are you that this is equivalent

Copy link
Contributor Author

@drewbanin drewbanin Aug 19, 2019

Choose a reason for hiding this comment

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

yeah - should be the same thing. This is definitely not equivalent on BQ/Snowflake, but on Redshift, you can only access the information_schema for the database that you're connected to. Turns out Redshift ignores capitalization in even quoted identifiers, so all of these are equivalent 🙃

select * from information_schema.columns;
select * from information_schema."columns";
select * from information_schema."COLUMNS";

@drewbanin drewbanin merged commit 64ee763 into dev/0.14.1 Aug 19, 2019
@drewbanin drewbanin deleted the fix/panoply branch August 19, 2019 17:04
@wesseljt
Copy link

👏 Thanks guys!

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

Successfully merging this pull request may close these issues.

Unable to run dbt against Panoply Redshift
3 participants