-
Notifications
You must be signed in to change notification settings - Fork 12
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
Casting literal to the right type and adding alias to select literal #13
Conversation
Hey thanks for raising this. I think the numeric type looks good but I am a little confused about the changes related to #11. It looks like the select literal gets aliased to the table name but I am not sure that this is correct. Take the statements below:
As far as I can tell the current behaviour preserves the bit after the table reference. Are you doing something different in your dbt models? I think if the entire table was explicitly used then the dry runner would not properly alias it like this:
But not sure if this is what you mean in the issue |
Ah ok I see the problem. I think adding the flag will still not work in all cases if the dbt project has mixed styles. Where sometimes we explicitly use the table name in our SELECT and sometimes we don't and sometimes we alias our reference as well. We need a way to correctly insert the select literal for all these cases in the same project. Would you mind splitting out these PRs so they map one to one to the issues? It would be good to get the numeric types bug out the way so we can focus on a nice solution to this problem. I will move this discussion to issue #11 to talk about all the cases |
Perfect, I left a comment on that issue and for now I'll close this PR and will open a new one with the right changes |
Solves #12 and #11. I haven't been able to solve #10 as I haven't found a good place to do the replacement, if you give me some guidance, I'll sort that out as well