duckdb/dbt-duckdb

When customizing a plugin, how do I pass the current model customization options?

Closed this issue · 1 comments

Custom a plugin:

class Plugin(BasePlugin):
    def initialize(self, plugin_config: Dict[str, Any]):
        pass

    def load(self, source_config: SourceConfig) -> pd.DataFrame:
        pass

    def store(self, target_config: TargetConfig):
        pass

how to get meta in method store:

models:
  - name: new_demo
    meta:
      custom: test

or to get custom:

-- ./models/new_demo.sql
{{ config(materialized="external", plugin="sql", custom="test") }}
select * from demo where status=1

I don't think I'm passing it in right now to the TargetConfig class, but I don't think it wouldn't be too hard to add it, let me take a look now...