dbt-labs / dbt-labs-experimental-features

dbt support for database features which are not yet supported natively in dbt-core
Apache License 2.0
147 stars 43 forks source link

Database is not included in get_period_boundaries #51

Open brian-franklin opened 1 month ago

brian-franklin commented 1 month ago

When a database is targeted that is different from the one specified in the profile, the insert_by_period materialization is not taking the database name into account when calling get_period_boundaries.

Additionally, get_period_boundaries is quoting the relation parts and therefore resulting in "object does not exist" error.

  1. get_period_boundaries should have a database argument that is passed from the insert_by_period materialization.
  2. insert_by_period should apply "upper" to the database, schema and identifier or apply "upper" in get_period_boundaries before building the "from" clause where the relation parts are quoted.