Skip to content

[BUG] dbt Fusion: Recommended static_analysis configs to resolve introspective query warning message #40

@fivetran-jamie

Description

@fivetran-jamie

Copied from fivetran/dbt_asana #46.

Is there an existing issue for this?

  • I have searched the existing issues

Describe the Issue

We have seen in other packages that dbt Fusion users might get a warning message from package models that use introspective queries (ie run_query() or dbt_utils.get_column_values())

Relevant error log or model output

warning: dbt1000: Detected unsafe introspection which may lead to non-deterministic static analysis. 
To suppress this warning, set static_analysis to 'unsafe' in the nodes' configuration. 
Learn more: https://docs.getdbt.com/docs/fusion/new-concepts. 
Nodes: 'model.marketo.marketo__calendar_spine' (execute), 'model.marketo.marketo__change_data_details' (execute), 'model.marketo.marketo__change_data_pivot' (execute), ...

Expected behavior

No warnings

Possible solution

As recommended by dbt Labs, Fusion users should add the following sort of configuration to their root project's dbt_project.yml for the models highlighted in the warning message.

models:
  package_name:
    model_path:
      model_name:
        +static_analysis: unsafe # Uses dbt Core rendering strategy to allow for introspective queries -- see https://docs.getdbt.com/docs/fusion/new-concepts for details

If a lot of folks are running into this warning, we should consider adding the configs to the package itself so that each individual doesn't need to add these them.

dbt Project configurations

Any

Package versions

Any

What database are you using dbt with?

Any

How are you running this dbt package?

dbt Fusion

dbt Version

Latest

Additional Context

No response

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

  • Yes.
  • Yes, but I will need assistance.
  • No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:copycatCloned from another issue.type:bugSomething is broken or incorrecttype:wontfixThis will not be worked onwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions