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

Use of SQL functions #15

Open
nzscripps opened this issue Jan 20, 2023 · 3 comments
Open

Use of SQL functions #15

nzscripps opened this issue Jan 20, 2023 · 3 comments

Comments

@nzscripps
Copy link

Using SQL functions is not working with this and using the Snowflake Native Driver. We have a number of queries like:

select *, case when run_code = 'Y' then 'Aired'
when run_code = 'N' and intended_air_date < current_date() then 'No Run'
when run_code = 'N' and intended_air_date >= current_date() then 'Scheduled'
else 'NA' end as Status
from MY_SNOWFLAKE_TABLE 

The query is not parsed correctly. Simple queries like:

SELECT ID, NAME from MY_SNOWFLAKE_TABLE

Work fine. Any ideas as to why functions don't get parsed?

@yoramdelangen
Copy link
Collaborator

Do you have a bit more information (error, expected results/query)?

@mckaygerhard
Copy link

the first query need a more elaborate way, by example using subquery or aliasing.. @nzscripps

@yoramdelangen
Copy link
Collaborator

@nzscripps do you have a error thats being given?

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

No branches or pull requests

3 participants