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

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

Closed
l1xnan opened this issue Sep 20, 2023 · 1 comment · Fixed by #256
Closed

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

l1xnan opened this issue Sep 20, 2023 · 1 comment · Fixed by #256

Comments

@l1xnan
Copy link

l1xnan commented Sep 20, 2023

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
@jwills
Copy link
Collaborator

jwills commented Sep 21, 2023

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants