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

Support hierarchical config setting for SavedQueryExport configs #9065

Merged

Commits on Nov 3, 2023

  1. Configuration menu
    Copy the full SHA
    1eaccb7 View commit details
    Browse the repository at this point in the history
  2. Allow extraneous properties in Export configs

    This brings the Export config object more in line with how other config
    objects are specified in the unparsed definition. It allows for specifying
    of extra configs, although they won't get propagate to the final config.
    QMalcolm committed Nov 3, 2023
    Configuration menu
    Copy the full SHA
    8e1b4b3 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2023

  1. Add ExportConfig options to SavedQueryConfig options

    This allows for specifying `ExportConfig` options at the `SavedQueryConfig` level.
    This also therefore allows these options to be specified in the dbt_project.yml
    config. The plan in the follow up commit is to merge the `SavedQueryConfig` options
    into all configs of `Exports` belonging to the saved query.
    
    There are a couple caveots to call out:
    1. We've used `schema` instead of `schema_name` on the `SavedQueryConfig` despite
    it being called `schema_name` on the `ExportConfig`. This is because need `schema_name`
    to be the name of the property on the `ExportConfig`, but `schema` is the user facing
    specification.
    2. We didn't add the `ExportConfig` `alias` property to the `SavedQueryConfig` This
    is because `alias` will always be specific to a single export, and thus it doesn't
    make sense to allow defining it on the `SavedQueryConfig` to then apply to all
    `Exports` belonging to the `SavedQuery`
    QMalcolm committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    3fd6f82 View commit details
    Browse the repository at this point in the history
  2. Begin inheriting configs from saved query config, and transitively fr…

    …om project config
    
    Export configs will now inherit from saved query configs, with a preference
    for export config specifications. That is to say an export config will inherity
    a config attr from the saved query config only if a value hasn't been supplied
    on the export config directly. Additionally because the saved query config has
    a similar relationship with the project config, exports configs can inherit
    from the project config (again with a preference for export config specifications).
    QMalcolm committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    b67a38b View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. Correct conditional in export config building for map schema to schem…

    …a_name
    
    I somehow wrote a really weird, but also valid, conditional statement. Previously
    the conditional was
    ```
    if combined.get("schema") is not combined.get("schema_name") is None:
    ```
    which basically checked whether `schema` was a boolean that didn't match
    the boolean of whether `schema_name` was None. This would pretty much
    always evaluate to True because `schema` should be a string or none, not
    a bool, and thus would never match the right hand side. Crazy. It has now
    been fixed to do the thing we want to it to do. If `schema` isn't `None`,
    and `schema_name` is `None`, then set `schema_name` to have the value of
    `schema`.
    QMalcolm committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    dd3be16 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ec2363 View commit details
    Browse the repository at this point in the history