dbt-labs / dbt-adapters

Apache License 2.0
17 stars 20 forks source link

[Feature] Test for `date_spine` should remove adapter-specific logic #209

Open dbeatty10 opened 2 months ago

dbeatty10 commented 2 months ago

Housekeeping

Short description

The test for the cross-adapter date_spine macro within fixture_date_spine.py contains adapter-specific logic like {% if target.type == 'postgres' %} that should be in dbt-postgres instead.

Context

History: this test was migrated effectively as-is from dbt-utils to dbt-core to dbt-adapters. But now we'll probably want to clean it up a bit.

Acceptance criteria

- [ ] The test definition in `dbt-adapters` contains no adapter-specific logic like `{% if target.type == 'postgres' %}`
- [ ] Rather, adapters like `dbt-postgres` can override the test as-needed

Testing

- [ ] Test in `dbt-postgres`
- [ ] Test in `dbt-bigquery`
- [ ] Test in `dbt-redshift`
- [ ] Test in `dbt-snowflake`
- [ ] Test in `dbt-spark`

Security

No security concerns.

Docs

No doc updates needed.

Consequences

This change impacts any adapter that imports this test.

Depending on the final implementation in dbt-adapters, the adapter types that are currently hard-coded (postgres, bigquery, redshift) may need to provide overrides of the text fixtures as a result of this change.