dbt-labs / dbt-labs/dbt-adapters

[Bug] Setting dbt-postgres config option "unlogged" raises `CustomKeyInConfigDeprecation` warnings

Open
#1,840 1 comment 0 reactions 0 assignees View on GitHub
triage:product type:bug
Dominant language
Python
Stars
233
Forks
362
Avg merge
3d 22h
Merged PRs (30d)
9

Description

### Is this a new bug?

- [x] I believe this is a new bug
- [x] I have searched the existing issues, and I could not find an existing issue for this bug

### Which packages are affected?

- [x] dbt-adapters
- [ ] dbt-tests-adapter
- [ ] dbt-athena
- [ ] dbt-athena-community
- [ ] dbt-bigquery
- [x] dbt-postgres
- [ ] dbt-redshift
- [ ] dbt-snowflake
- [ ] dbt-spark

### Current Behavior

The postgres configuration key `unlogged` is documented here: https://docs.getdbt.com/reference/resource-configs/postgres-configs?version=1.12#unlogged

However, when we configure our dbt_project.yml using this config option:

```yaml
models:
my_project:
staging:
+schema: staging
+materialized: table
+unlogged: true
# ...
```

This results in the following warnings:

```
[WARNING][CustomKeyInConfigDeprecation]: Deprecated functionality
Custom key `+unlogged` found in `config` at path `my_project.staging.+unlogged` in file `/tmp/jobs/70471872361268/target/dbt_project.yml`. Custom config keys should move into the `config.meta`.
```

I believe moving the configuration under `meta` would essentially break the configuration.

### Expected Behavior

The postgres configuration option `unlogged` should not be recognized as a "custom key" and should not raise any warnings. Users should not be advised to move the `unlogged` configuration option into `meta`.

### Steps To Reproduce

See details above.

### Relevant log output

```shell
[WARNING][CustomKeyInConfigDeprecation]: Deprecated functionality
Custom key `+unlogged` found in `config` at path `my_project.staging.+unlogged` in file `/tmp/jobs/70471872361268/target/dbt_project.yml`. Custom config keys should move into the `config.meta`.
```

### Environment

```markdown
- OS: unknown / dbt-cloud (versionless / latest)
- Python: unknown / dbt-cloud (versionless / latest)
- dbt-adapters: unknown / dbt-cloud (versionless / latest)
- dbt-postgres: unknown / dbt-cloud (versionless / latest)
```

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.