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 #6

Closed
2 of 4 tasks
jtcohen6 opened this issue Jan 27, 2023 · 1 comment
Closed
2 of 4 tasks

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

jtcohen6 opened this issue Jan 27, 2023 · 1 comment

Comments

@jtcohen6
Copy link

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:

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

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.
@fivetran-joemarkiewicz
Copy link
Collaborator

Thanks again for raising this to our team and helping to address this issue! This has since been addressed within PR #5 and is now live on the hub.

As such, the issue should be addressed and I will close this bug report. Please feel free to reopen if the issue persists on your end 😄

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