Skip to content

Not all models include the enabled config #32

@santina-brohen

Description

@santina-brohen

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

Currently, the package expects certain sources to be available. Some models, but not all, include the enabled config, which makes it possible to skip the model if the source is not available. For example, stg_zuora__credit_balance_adjustment includes the following: {{ config(enabled=var('zuora__using_credit_balance_adjustment', true)) }} (code here). Of the 19 models, only 4 can be disabled:

  • stg_zuora__credit_balance_adjustment
  • stg_zuora__refund
  • stg_zuora__refund_invoice_payment
  • stg_zuora__taxation_item

At Pleo, we are not ingesting all the sources that are expected by the package, so even when leveraging the enabled config in the models where it's available, we are still left with models raising errors.

With the changes in this PR, it is possible to disable any model, not just the subset listed above. Having the ability to disable models for which the sources are not ingested via Fivetran is a great feature, and it opens up use of this package even when only a few Fivetran sources are available.

Relevant error log or model output

No response

Expected behavior

I would expect to be able to leverage the package for as many models as we currently ingest via Fivetran. IOW, I would expect to be able to configure each model to be enabled.

Before making the changes, we had four models that raised errors because the sources are not available. I ran dbt build --select +zuora_source and the following shows the error:

Screenshot 2024-02-26 at 16 08 21

After making the changes and disabling the models for sources we do not ingest, I ran dbt build --select +zuora_source again; no errors were raised.

Screenshot 2024-02-27 at 16 06 12

Screenshot 2024-02-27 at 16 04 27

I then removed one of the new variables to ensure that it still correctly raised an error; it did:

Screenshot 2024-02-27 at 16 08 12
Note: zuora__using_contact: false is commented out.

Screenshot 2024-02-27 at 16 09 10

dbt Project configurations

  zuora__using_credit_balance_adjustment: false
  zuora__using_refund: false
  zuora__using_refund_invoice_payment: false
  zuora__using_taxation_item: false

Package versions

  - package: fivetran/zuora_source
    version: [">=0.2.0", "<0.3.0"]

What database are you using dbt with?

bigquery

dbt Version

Screenshot 2024-02-28 at 15 59 01

Additional Context

I made and tested the changes in this PR.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:enhancementNew functionality or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions