Skip to content

Commit

Permalink
fix(data-warehouse): Add support for sql arrays (#26633)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilbert09 authored Dec 5, 2024
1 parent d1b9d4c commit e62f82a
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,16 @@ def sqla_col_to_column_schema(
col["data_type"] = "date"
elif isinstance(sql_t, sqltypes.Time):
col["data_type"] = "time"
elif isinstance(sql_t, sqltypes.JSON) or isinstance(sql_t, BigQueryJSON) or isinstance(sql_t, BigQueryStruct):
elif (
isinstance(sql_t, sqltypes.JSON)
or isinstance(sql_t, BigQueryJSON)
or isinstance(sql_t, BigQueryStruct)
or isinstance(sql_t, ARRAY)
):
col["data_type"] = "json"
elif isinstance(sql_t, sqltypes.Boolean):
col["data_type"] = "bool"
elif isinstance(sql_t, sqltypes.Interval) or isinstance(sql_t, INTERVAL) or isinstance(sql_t, ARRAY):
elif isinstance(sql_t, sqltypes.Interval) or isinstance(sql_t, INTERVAL):
# No support for interval columns yet - we filter out binary columns, so reusing the DLT type for interval columns to be removed
col["data_type"] = "interval" # type: ignore
else:
Expand Down

0 comments on commit e62f82a

Please sign in to comment.