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

[Bug] Small typo in boolean logic for config: enabled #8

Open
2 of 4 tasks
fivetran-catfritz opened this issue May 3, 2023 · 0 comments
Open
2 of 4 tasks

[Bug] Small typo in boolean logic for config: enabled #8

fivetran-catfritz opened this issue May 3, 2023 · 0 comments

Comments

@fivetran-catfritz
Copy link
Owner

Copied from fivetran/dbt_amazon_ads_source #6.

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

This results in "False and True", which is not a valid boolean value:

https:/fivetran/dbt_amazon_ads_source/blob/ba849f3e77d153e3cc8548f9f2d9b6b5dd8b31ac/models/src_amazon_ads.yml#L167-L168

This results in an admittedly gross validation error in dbt-core:

hologram.ValidationError: 'False and True' is not of type 'boolean'

Failed validating 'type' in schema['properties']['enabled']:
    {'default': True, 'type': 'boolean'}

On instance['enabled']:
    'False and True'

Change to:

 config: 
   enabled: "{{ var('ad_reporting__amazon_ads_enabled', true) and var('amazon_ads__portfolio_history_enabled', true) }}" 

(Notice the condition is now fully inside the Jinja, rather than templating a string)__

Relevant error log or model output

No response

Expected behavior

Does not raise validation error

dbt Project configurations

vars:
  ...
  # Ads Reporting
  ad_reporting__amazon_ads_enabled: False

Package versions

17:42:18  Installing fivetran/amazon_ads_source
17:42:20    Installed from version 0.1.0
17:42:20    Up to date!

What database are you using dbt with?

snowflake

dbt Version

$ dbt --version
Core:
  - installed: 1.4.0
  - latest:    1.4.1 - Update available!

Additional Context

No response

Are you willing to open a PR to help address this issue?

  • Yes.
  • Yes, but I will need assistance and will schedule time during our office hours for guidance
  • No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant