z3z1ma / dbt-osmosis

Provides automated YAML management, a dbt server, streamlit workbench, and git-integrated dbt model output diff tools
https://z3z1ma.github.io/dbt-osmosis/
Apache License 2.0
422 stars 45 forks source link

Database specification for source bootstrapping+fix #85

Closed cwcartmell closed 10 months ago

cwcartmell commented 10 months ago

Issues

  1. For multi-database warehouses (like snowflake) it's important to be able to specify which database a set of sources resides in as well as a schema.
  2. Right now the yaml refactor command fails when source config vars are dictionaries instead of just a path:
    vars:
    dbt-osmosis:
    <source_name>: <path>  # Works
    <source_name>:  # Causes failures
      path: <path>
      schema: <schema>

Solutions

For issue (1):

  1. Parse a database from the source spec, still defaulting to the configured default database from the dbt profile.
  2. Write the database to generated source yml files explicitly.
  3. Update documentation.

For issue (2)

Add conditional logic to handle source specs that are dictionaries.

z3z1ma commented 10 months ago

LGTM, will cut a release. Thank you!