Skip to content

Store the unresolved form of source database representations #2744

@jtcohen6

Description

@jtcohen6

extension of #2713

Describe the feature

Let's say a project has a source defined like:

sources:
  - name: my_postgres_db
    database: "{{ 'raw' if target.name == 'prod' else 'raw_sampled' }}"

Today, if running in dev and comparing to a manifest generated by a prod target, state:modified+ will include all models that depend on source:my_postgres_db because the database differs. Ideally, we'd be able to tell that the unresolved database (Jinja statement) is identical.

I'm most interested in sources and database representations (database, schema, identifier). If it made sense, though, we could broaden this issue to the matter of storing unresolved:

Describe alternatives you've considered

  • The proposal for state:modified subselectors gives decent user-side answers by letting people "switch off" the intersection of state:modified.database_representations and specific sources.

Who will this benefit?

  • Users who develop, test, and deploy against genuinely different source datasets. While this isn't something we recommend in the general case, it's the norm at organizations of a certain size + maturity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requeststaleIssues that have gone stalestateStateful selection (state:modified, defer)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions