Schema inference for TEXT[] incorrectly generates as ARRAY [postgres]
ma1f opened this issue · comments
ma1f commented
Not a biggy, but sqlmesh create_external_models
infers TEXT[]
as ARRAY
(invalid) in postgres.
Toby Mao commented
hi could you please provide a bit more detail of the issue? can you describe a minimally reproducible example, this will help us a lot, thanks!
ma1f commented
sure, see below. Obviously a simple find/replace is a simple workaround (otherwide causes errors in models), but thought worth raising.
create table users (
id bigint generated always as identity primary key,
_timestamp timestamp default CURRENT_TIMESTAMP not null,
name text not null,
email text unique,
mobile text,
job_role text,
goals text[],
active boolean
);
and corresponding schema.yaml
- name: 'xxx.users'
columns:
id: BIGINT
_timestamp: TIMESTAMP
name: TEXT
email: TEXT
mobile: TEXT
job_role: TEXT
goals: ARRAY <-- this should be TEXT[]
active: BOOLEAN