airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.88k stars 4.07k forks source link

Destination snowflake: remove raw table case-sensitivity #30101

Open edgao opened 1 year ago

edgao commented 1 year ago

follow-on to https://github.com/airbytehq/airbyte/issues/30010

raw tables are still case-sensitive, i.e. must be queried as select * from "airbyte_internal"."foo_raw__stream_bar". we... probably should make those also case-insensitive, i.e. queryable as select * from airbyte_internal.foo_raw__stream_bar?

this is a bit trickier because we can't just do a soft reset, we'll need to actually do an alter table or create table ... select sort of thing.

for now, there's a relatively easy workaround to just create views on whatever raw tables:

create schema airbyte_internal;
create view airbyte_internal.foo_raw__stream_bar as
select
  "_airbyte_raw_id" as _airbyte_raw_id,
  "_airbyte_extracted_at" as _airbyte_extracted_at,
  "_airbyte_loaded_at" as _airbyte_loaded_at,
  "_airbyte_data" as _airbyte_data
from "airbyte_internal"."foo_raw__stream_bar"
bibhutis007 commented 1 year ago

Please prioritize this issue. We run Permifrost to manage grants and privileges in our snowflake and the lowercase schema and table name for airbyte_internal is causing Permifrost runs to fail. I have tried explicitly defining lowercase names in permifrost yaml file and it fails.

apd-bscally commented 11 months ago

Also would like to see this resolved, we have seen multiple issues in downstream tools because of this

cbuckle1 commented 11 months ago

Causing us issues as well

bibhutis007 commented 11 months ago

Workaround:

Screenshot 2023-11-21 at 3 13 22 PM