You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
Adding an array-type column to an existing snapshot or incremental model will result in the following syntax error.
alter table "postgres"."dbt_teddy_snapshots"."test_model_snapshot" add column "some_array" ARRAY; Postgres adapter: Postgres error: syntax error at or near "ARRAY"
Example
# example_model.sql (before)
select
1::numeric as col_a,
2::int as col_b,
'some_text' as col_c
# example_model.sql (after)
select
1::numeric as col_a,
2::int as col_b,
'some_text' as col_c
null::text[] as some_array
Expected Behavior
Alter table command should look like something like the following: alter table "postgres"."dbt_snapshots"."example_model_snapshot" add column "some_array" text[];
Steps To Reproduce
Build above example_model with a downstream snapshot and incremental model
Add an array column to example_model
Build example_model and the downstream incremental models and snapshots
Relevant log output
14:41:28.002733 [debug] [Thread-1 (]: SQL status: SELECT 8 in 0.003 seconds
14:41:28.005418 [debug] [Thread-1 (]: Using postgres connection "snapshot.thymecare.test_model_snapshot"
14:41:28.005658 [debug] [Thread-1 (]: On snapshot.thymecare.test_model_snapshot: /* {"app": "dbt", "dbt_version": "1.8.6", "profile_name": "postgres", "target_name": "local", "node_id": "snapshot.thymecare.test_model_snapshot"} */
alter table "postgres"."dbt_snapshots"."test_model_snapshot" add column "some_array" ARRAY;
14:41:28.009511 [debug] [Thread-1 (]: Postgres adapter: Postgres error: syntax error at or near "ARRAY"
LINE 3: ...pshots"."test_model_snapshot" add column "some_array" ARRAY;
Is this a new bug?
Current Behavior
Adding an array-type column to an existing snapshot or incremental model will result in the following syntax error.
alter table "postgres"."dbt_teddy_snapshots"."test_model_snapshot" add column "some_array" ARRAY;
Postgres adapter: Postgres error: syntax error at or near "ARRAY"
Example
Expected Behavior
Alter table command should look like something like the following:
alter table "postgres"."dbt_snapshots"."example_model_snapshot" add column "some_array" text[];
Steps To Reproduce
example_model
with a downstream snapshot and incremental modelexample_model
example_model
and the downstream incremental models and snapshotsRelevant log output
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: