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

Overriding/Extending default adapters in dbt project #3962

Closed
ismailsimsek opened this issue Sep 28, 2021 · 2 comments
Closed

Overriding/Extending default adapters in dbt project #3962

ismailsimsek opened this issue Sep 28, 2021 · 2 comments
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core

Comments

@ismailsimsek
Copy link

Describe the feature

is it possible to override/extend current adapters with dbt project? if yes where is the correct location to add new adapter code? is there any custom adapter location similar to {source-paths, analysis-paths, test-paths, data-paths, macro-paths,snapshot-paths}?

is it possible to extend existing adapters without building new adapter plugin?
for-example:

class BigQueryAdapterCustomized(BigQueryAdapter):
....
def mynew_method(self)

Who will this benefit?

such feature could add flexibility to dbt.

@ismailsimsek ismailsimsek added enhancement New feature or request triage labels Sep 28, 2021
@jtcohen6
Copy link
Contributor

@ismailsimsek It is possible to override, reimplement, or otherwise adapt any built-in dbt core or adapter code written in Jinja. It isn't possible today to implement any user-space code, in python, in your own project. This isn't a position I see us changing in the near future; we find it to be a valuable guardrail, from a security and complexity perspective.

Eventually, I do want to enable defining more python assets outside of the core codebase (e.g. custom tasks, #2381), or reworking complex macros (i.e. materializations) in python to make unit testing them easier. Even then, I think that may look like installing an additional dbt- plugin, or a special kind of package. I'm not sure yet if it will be possible to write that python in your own project code.

I appreciate that this can be frustrating with dbt-bigquery in particular, since there's always more BigQuery functionality available from the python client vs. the StandardSQL "API." Out of curiosity, what's the specific functionality you're hoping to implement in dbt + BigQuery? We may already have a ticket for it, or could open a new one.

I'm going to close this issue for the time being, but happy to continue the conversation.

@jtcohen6 jtcohen6 added wontfix Not a bug or out of scope for dbt-core and removed triage labels Sep 28, 2021
@ismailsimsek
Copy link
Author

@jtcohen6 created discussion here dbt-labs/dbt-adapters#259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix Not a bug or out of scope for dbt-core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants