-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Update debug task to make the debug query an adapter method #2751
Comments
Hey @PedroMiguelFigueiredo, could you say a bit more here? |
@jtcohen6 it looks like on oracle, selects require a If that is the case, we probably should have an |
Ahh that makes a lot of sense, and sounds good as an approach |
Hi all ! Yes, we had the same idea here in the dbt-oracle repo : This would be great, and maybe this could be circonveined just in SQLAdapter and OracleAdapter. By chance, the dremio adapter will not need it ;-), as dremio is calcite based : dbt's community is simply great ! |
Submitted a PR prematurely, my apologies. I'd like to resolve this issue! As far as inputting a custom debug sql statement for the new method in the base debug task, will that need to pull from the profile passed to the task? |
The existing code is here:
https://github.com/fishtown-analytics/dbt/blob/fa8a4f2020655c60bdb66270616f5654e168a729/core/dbt/task/debug.py#L337
But that won't work on some third party adapters. One example is Oracle, which requires a
from
clause in anyselect
statement.Instead, this should be an adapter method on the base adapter, named
debug_query()
that takes no arguments. Then adapter plugins will be able to override the method with an appropriate debug method. For example, on Oracle, it might beselect 1 from dual
.The text was updated successfully, but these errors were encountered: