Update debug task to make the debug query an adapter method
See original GitHub issueThe 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 any select
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 be select 1 from dual
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Debugger Extension - Visual Studio Code
A DebugAdapterDescriptorFactory has a method createDebugAdapterDescriptor that is called by VS Code when a debug session starts and a debug adapter is needed....
Read more >Best practices for debugging and organizing scripting code in ...
Debug the scripts easily. Update the scripts at runtime without it being necessary to go back to Case Builder and redeploy the solution....
Read more >TaskDebugAdapterAction - Nova
A TaskDebugAdapterAction object represents an action that can be used as part of a Task which invokes a debug adapter conforming to the...
Read more >Debugging
Getting Started. Open a file to debug (either package main source file or the test file) in the editor, and select the Run...
Read more >Create and configure TableAdapters - Visual Studio (Windows)
Use the TableAdapter Configuration Wizard · You have the option to create a new stored procedure in the underlying database if you have...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jtcohen6 it looks like on oracle, selects require a
FROM
clause and their solution to the obvious problems that causes is a special identifier nameddual
that’s globally accessible.If that is the case, we probably should have an
adapter.debug_query()
method that defaults toadapter.execute("select 1 as id")
. Then the author of the oracle plugin (or other databases with similar restrictions) can add their oracle-only special case behavior.@zmac12 I think you had the right start in #2811, I’ll comment over there