From 0eaf19513efd20ac38105ddd68d1bdc49b92b535 Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Tue, 17 Aug 2021 13:15:05 -0300 Subject: [PATCH 1/8] add unnest_column case conflict --- .../macros/cross_db_utils/json_operations.sql | 18 +++- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 4 +- .../conflict_stream_array_ab3.sql | 2 +- ...stream_array_conflict_stream_array_ab1.sql | 14 --- ...stream_array_conflict_stream_array_ab2.sql | 13 --- ...stream_array_conflict_stream_array_ab3.sql | 18 ---- ..._stream_array_conflict_stream_name_ab1.sql | 16 --- ..._stream_array_conflict_stream_name_ab2.sql | 15 --- ..._stream_array_conflict_stream_name_ab3.sql | 18 ---- ...ict_stream_array_conflict_stream_array.sql | 18 ---- ...lict_stream_array_conflict_stream_name.sql | 18 ---- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 2 +- .../conflict_stream_array_ab3.sql | 2 +- ...stream_array_conflict_stream_array_ab1.sql | 10 -- ...stream_array_conflict_stream_array_ab2.sql | 9 -- ...stream_array_conflict_stream_array_ab3.sql | 11 --- ..._stream_array_conflict_stream_name_ab1.sql | 12 --- ..._stream_array_conflict_stream_name_ab2.sql | 9 -- ..._stream_array_conflict_stream_name_ab3.sql | 11 --- ...ict_stream_array_conflict_stream_array.sql | 10 -- ...lict_stream_array_conflict_stream_name.sql | 10 -- ...ct_stream_array_2lict_stream_array_ab1.sql | 13 --- ...ct_stream_array_2lict_stream_array_ab2.sql | 11 --- ...ct_stream_array_2lict_stream_array_ab3.sql | 10 -- ...ct_stream_array_3flict_stream_name_ab1.sql | 59 ----------- ...ct_stream_array_3flict_stream_name_ab2.sql | 13 --- ...ct_stream_array_3flict_stream_name_ab3.sql | 10 -- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 2 +- ...ct_stream_name__2flict_stream_name_ab1.sql | 6 +- .../conflict_stream_name_ab1.sql | 6 +- ..._stream_with_co_1g_into_long_names_ab1.sql | 6 +- ...ct_stream_array___conflict_stream_name.sql | 15 --- ...ict_stream_array_conflict_stream_array.sql | 15 --- ...ct_stream_array_2lict_stream_array_ab1.sql | 10 -- ...ct_stream_array_2lict_stream_array_ab2.sql | 9 -- ...ct_stream_array_2lict_stream_array_ab3.sql | 11 --- ...ct_stream_array_3flict_stream_name_ab1.sql | 12 --- ...ct_stream_array_3flict_stream_name_ab2.sql | 9 -- ...ct_stream_array_3flict_stream_name_ab3.sql | 11 --- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 2 +- .../conflict_stream_array_ab3.sql | 2 +- ...ct_stream_array___conflict_stream_name.sql | 10 -- ...ict_stream_array_conflict_stream_array.sql | 10 -- ...stream_arra___conflict_stream_name_ab1.sql | 18 ---- ...stream_arra___conflict_stream_name_ab2.sql | 13 --- ...stream_arra___conflict_stream_name_ab3.sql | 20 ---- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 4 +- ...stream_array_conflict_stream_array_ab1.sql | 12 --- ...stream_array_conflict_stream_array_ab2.sql | 11 --- ...stream_array_conflict_stream_array_ab3.sql | 20 ---- .../conflict_stream_name_ab1.sql | 4 +- ...t_stream_name_conflict_stream_name_ab1.sql | 4 +- ...ream_with_c__lting_into_long_names_ab1.sql | 4 +- ...ict_stream_arra___conflict_stream_name.sql | 14 --- ...ict_stream_array_conflict_stream_array.sql | 14 --- ...stream_arra___conflict_stream_name_ab1.sql | 12 --- ...stream_arra___conflict_stream_name_ab2.sql | 9 -- ...stream_arra___conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 2 +- .../conflict_stream_array_ab3.sql | 2 +- ...stream_array_conflict_stream_array_ab1.sql | 10 -- ...stream_array_conflict_stream_array_ab2.sql | 9 -- ...stream_array_conflict_stream_array_ab3.sql | 11 --- ...ict_stream_arra___conflict_stream_name.sql | 10 -- ...ict_stream_array_conflict_stream_array.sql | 10 -- .../conflict_stream_array.sql | 47 --------- ...ict_stream_array_conflict_stream_array.sql | 48 --------- ...lict_stream_array_conflict_stream_name.sql | 95 ------------------ .../conflict_stream_name.sql | 47 --------- ...flict_stream_name_conflict_stream_name.sql | 48 --------- ...flict_stream_name_conflict_stream_name.sql | 48 --------- .../conflict_stream_scalar.sql | 49 ---------- .../test_normalization/dedup_cdc_excluded.sql | 21 ---- .../dedup_cdc_excluded_scd.sql | 85 ---------------- .../dedup_exchange_rate.sql | 24 ----- .../dedup_exchange_rate_scd.sql | 98 ------------------- .../test_normalization/exchange_rate.sql | 77 --------------- ...plex_columns_resulting_into_long_names.sql | 19 ---- ...ns_resulting_into_long_names_partition.sql | 54 ---------- ..._names_partition_column___with__quotes.sql | 93 ------------------ ...sulting_into_long_names_partition_data.sql | 93 ------------------ ...long_names_partition_double_array_data.sql | 93 ------------------ ..._columns_resulting_into_long_names_scd.sql | 71 -------------- ...ut_namespace_resulting_into_long_names.sql | 47 --------- ...th_namespace_resulting_into_long_names.sql | 47 --------- .../conflict_stream_array_ab1.sql | 2 +- .../conflict_stream_array_ab2.sql | 2 +- .../conflict_stream_array_ab3.sql | 2 +- ...stream_array_conflict_stream_array_ab1.sql | 10 -- ...stream_array_conflict_stream_array_ab2.sql | 9 -- ...stream_array_conflict_stream_array_ab3.sql | 11 --- ..._stream_array_conflict_stream_name_ab1.sql | 12 --- ..._stream_array_conflict_stream_name_ab2.sql | 9 -- ..._stream_array_conflict_stream_name_ab3.sql | 11 --- ...ict_stream_array_conflict_stream_array.sql | 10 -- ...lict_stream_array_conflict_stream_name.sql | 10 -- .../CONFLICT_STREAM_ARRAY_AB1.sql | 2 +- .../CONFLICT_STREAM_ARRAY_AB2.sql | 4 +- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql | 12 --- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql | 11 --- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql | 20 ---- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql | 14 --- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql | 13 --- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql | 20 ---- ...ICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql | 14 --- ...LICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql | 14 --- .../CONFLICT_STREAM_ARRAY_AB1.sql | 2 +- .../CONFLICT_STREAM_ARRAY_AB2.sql | 2 +- .../CONFLICT_STREAM_ARRAY_AB3.sql | 2 +- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql | 10 -- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql | 9 -- ...STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql | 11 --- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql | 12 --- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql | 9 -- ..._STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql | 11 --- ...ICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql | 10 -- ...LICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql | 10 -- .../data_input/catalog.json | 21 ++-- .../data_input/messages.txt | 8 +- 125 files changed, 79 insertions(+), 2182 deletions(-) delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql index a7507f4140a7..90cd9ca0dbdf 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql @@ -68,15 +68,27 @@ {%- endmacro %} {% macro postgres__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - jsonb_extract_path({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}) + {%- if json_column|string() == "_airbyte_nested_data" %} + jsonb_extract_path({{ json_column }}, {{ format_json_path(json_path_list) }}) + {% else %} + jsonb_extract_path({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}) + {% endif -%} {%- endmacro %} {% macro mysql__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - json_extract({{ from_table }}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {%- if json_column|string() == "_airbyte_nested_data" %} + json_extract({{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {% else %} + json_extract({{ from_table }}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {% endif -%} {%- endmacro %} {% macro redshift__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - case when json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) end + {%- if json_column|string() == "_airbyte_nested_data" %} + case when json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) end + {% else %} + case when json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) end + {% endif -%} {%- endmacro %} {% macro snowflake__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 5d2c2254397d..dae3ef07ec98 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -6,7 +6,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract(table_alias._airbyte_data, "$['conflict_stream_array']") as conflict_stream_array, + json_extract_array(_airbyte_data, "$['conflict_stream_array']") as conflict_stream_array, _airbyte_emitted_at from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_array as table_alias -- conflict_stream_array; diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index 19cf58e8bf23..43a66e1de59b 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -8,9 +8,7 @@ select cast(id as string ) as id, - cast(conflict_stream_array as - string -) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_ab1` -- conflict_stream_array; diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql index a0a275a86b0c..1615656ffea2 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -8,7 +8,7 @@ select *, to_hex(md5(cast(concat(coalesce(cast(id as string -), ''), '-', coalesce(cast(conflict_stream_array as +), ''), '-', coalesce(cast(array_to_string(conflict_stream_array, "|", "") as string ), '')) as string diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql deleted file mode 100644 index cc293c0e52a8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - json_extract_array(conflict_stream_array, "$['conflict_stream_name']") as conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`conflict_stream_array` as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql deleted file mode 100644 index 5f5d5df5c6ff..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab1` --- conflict_stream_array at conflict_stream_array/conflict_stream_array; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql deleted file mode 100644 index e68164c76892..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_array_hashid as - string -), ''), '-', coalesce(cast(array_to_string(conflict_stream_name, "|", "") as - string -), '')) as - string -))) as _airbyte_conflict_stream_array_2_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab2` --- conflict_stream_array at conflict_stream_array/conflict_stream_array; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql deleted file mode 100644 index 23f57f92526f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_conflict_stream_array_2_hashid, - json_extract_scalar(conflict_stream_name, "$['id']") as id, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`conflict_stream_array_conflict_stream_array` as table_alias -cross join unnest(conflict_stream_name) as conflict_stream_name -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql deleted file mode 100644 index d54df6b2cbd2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as - int64 -) as id, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql deleted file mode 100644 index badc6970f02b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_array_2_hashid as - string -), ''), '-', coalesce(cast(id as - string -), '')) as - string -))) as _airbyte_conflict_stream_name_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index a37c810a5aaa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_array_conflict_stream_array` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_ab3` --- conflict_stream_array at conflict_stream_array/conflict_stream_array from `dataline-integration-testing`.test_normalization.`conflict_stream_array` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql deleted file mode 100644 index 513cefe26016..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from `dataline-integration-testing`.test_normalization.`conflict_stream_array_conflict_stream_array` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 7dd3aef647f1..d3df56ab3d35 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -2,7 +2,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, + {{ json_extract_array('_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, _airbyte_emitted_at from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} as table_alias -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index 42ac43742a99..2f0da1bb06e7 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -2,7 +2,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_array as {{ type_json() }}) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from {{ ref('conflict_stream_array_ab1') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql index 5b087cb8cc29..78f9b1a230cf 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -4,7 +4,7 @@ select *, {{ dbt_utils.surrogate_key([ 'id', - 'conflict_stream_array', + array_to_string('conflict_stream_array'), ]) }} as _airbyte_conflict_stream_array_hashid from {{ ref('conflict_stream_array_ab2') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql deleted file mode 100644 index 9fa73c27e073..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - {{ json_extract_array('conflict_stream_array', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array') }} as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql deleted file mode 100644 index 026a337012ca..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array_ab1') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql deleted file mode 100644 index d276f99af9f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_hashid', - array_to_string('conflict_stream_name'), - ]) }} as _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab2') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql deleted file mode 100644 index b926c2f347c4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('conflict_stream_array_conflict_stream_array', 'conflict_stream_array', 'conflict_stream_name') }} -select - _airbyte_conflict_stream_array_2_hashid, - {{ json_extract_scalar(unnested_column_value('conflict_stream_name'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array') }} as table_alias -{{ cross_join_unnest('conflict_stream_array', 'conflict_stream_name') }} -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql deleted file mode 100644 index 36a6d743a9d9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as {{ dbt_utils.type_bigint() }}) as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql deleted file mode 100644 index 422bf2eb099e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_2_hashid', - 'id', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index 93ea10dc2182..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab3') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array from {{ ref('conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql deleted file mode 100644 index 7e6c8de93be3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from {{ ref('conflict_stream_array_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql deleted file mode 100644 index 303fdbe0205b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - json_extract(conflict_stream_array, - '$."conflict_stream_name"') as conflict_stream_name, - _airbyte_emitted_at -from test_normalization.`conflict_stream_array` as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql deleted file mode 100644 index a5becabd80a8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab1` --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql deleted file mode 100644 index 5f3e56f39add..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_array_hashid as char), ''), '-', coalesce(cast(conflict_stream_name as char), '')) as char)) as _airbyte_conflict_stream_array_2_hashid -from _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab2` --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql deleted file mode 100644 index 648a50d83375..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql +++ /dev/null @@ -1,59 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - - ), - joined as ( - select - _airbyte_conflict_stream_array_hashid as _airbyte_hashid, - - json_extract(conflict_stream_name, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data - from test_normalization.`conflict_stream_array_conflict_stream_array` - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in conflict_stream_array_conflict_stream_array.conflict_stream_name - where numbers.generated_number <= json_length(conflict_stream_name) - ) -select - _airbyte_conflict_stream_array_2_hashid, - json_value(_airbyte_nested_data, - '$."id"') as id, - _airbyte_emitted_at -from test_normalization.`conflict_stream_array_conflict_stream_array` as table_alias -left join joined on _airbyte_conflict_stream_array_hashid = joined._airbyte_hashid -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql deleted file mode 100644 index ea53c9576bb2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as - signed -) as id, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab1` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql deleted file mode 100644 index ebe438dc4432..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_array_2_hashid as char), ''), '-', coalesce(cast(id as char), '')) as char)) as _airbyte_conflict_stream_name_hashid -from _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab2` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 345f1ffde635..16064ab14c2f 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -5,7 +5,7 @@ select json_value(_airbyte_data, '$."id"') as id, - json_extract(table_alias._airbyte_data, + json_extract(_airbyte_data, '$."conflict_stream_array"') as conflict_stream_array, _airbyte_emitted_at from test_normalization._airbyte_raw_conflict_stream_array as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index 4aa4fc65c7ad..2ab090a7e559 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -4,7 +4,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast(id as char) as id, - cast(conflict_stream_array as json) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from _airbyte_test_normalization.`conflict_stream_array_ab1` -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql index 050272c96fc2..e5689bca73bd 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql @@ -4,8 +4,10 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select _airbyte_conflict_stream_name_hashid, - json_extract(table_alias.conflict_stream_name, - '$."conflict_stream_name"') as conflict_stream_name, + + json_extract(table_alias.conflict_stream_name, + '$."conflict_stream_name"') + as conflict_stream_name, _airbyte_emitted_at from test_normalization.`conflict_stream_name` as table_alias where conflict_stream_name is not null diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index 11739bb5186d..a575697fcb36 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -5,8 +5,10 @@ select json_value(_airbyte_data, '$."id"') as id, - json_extract(table_alias._airbyte_data, - '$."conflict_stream_name"') as conflict_stream_name, + + json_extract(table_alias._airbyte_data, + '$."conflict_stream_name"') + as conflict_stream_name, _airbyte_emitted_at from test_normalization._airbyte_raw_conflict_stream_name as table_alias -- conflict_stream_name diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql index 21a63423da85..81d223bc373c 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql @@ -7,8 +7,10 @@ select '$."id"') as id, json_value(_airbyte_data, '$."date"') as `date`, - json_extract(table_alias._airbyte_data, - '$."partition"') as `partition`, + + json_extract(table_alias._airbyte_data, + '$."partition"') + as `partition`, _airbyte_emitted_at from test_normalization._airbyte_raw_nested_s__lting_into_long_names as table_alias -- nested_stream_with_co__lting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql deleted file mode 100644 index 5f95542bc6f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_array___conflict_stream_name__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from _airbyte_test_normalization.`conflict_stream_array_3flict_stream_name_ab3` --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from test_normalization.`conflict_stream_array_conflict_stream_array` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index fa8109195a40..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_array_conflict_stream_array__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from _airbyte_test_normalization.`conflict_stream_array_2lict_stream_array_ab3` --- conflict_stream_array at conflict_stream_array/conflict_stream_array from test_normalization.`conflict_stream_array` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql deleted file mode 100644 index 9fa73c27e073..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - {{ json_extract_array('conflict_stream_array', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array') }} as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql deleted file mode 100644 index 3f34b920e7c1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_2lict_stream_array_ab1') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql deleted file mode 100644 index 97902d17da46..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_2lict_stream_array_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_hashid', - array_to_string('conflict_stream_name'), - ]) }} as _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_2lict_stream_array_ab2') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql deleted file mode 100644 index b926c2f347c4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('conflict_stream_array_conflict_stream_array', 'conflict_stream_array', 'conflict_stream_name') }} -select - _airbyte_conflict_stream_array_2_hashid, - {{ json_extract_scalar(unnested_column_value('conflict_stream_name'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array') }} as table_alias -{{ cross_join_unnest('conflict_stream_array', 'conflict_stream_name') }} -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql deleted file mode 100644 index 818a78e05ae2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as {{ dbt_utils.type_bigint() }}) as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_3flict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql deleted file mode 100644 index d1fc37fab6b3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_3flict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_2_hashid', - 'id', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_3flict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 7dd3aef647f1..d3df56ab3d35 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -2,7 +2,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, + {{ json_extract_array('_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, _airbyte_emitted_at from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} as table_alias -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index 42ac43742a99..2f0da1bb06e7 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -2,7 +2,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_array as {{ type_json() }}) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from {{ ref('conflict_stream_array_ab1') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql index 5b087cb8cc29..78f9b1a230cf 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -4,7 +4,7 @@ select *, {{ dbt_utils.surrogate_key([ 'id', - 'conflict_stream_array', + array_to_string('conflict_stream_array'), ]) }} as _airbyte_conflict_stream_array_hashid from {{ ref('conflict_stream_array_ab2') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql deleted file mode 100644 index b05f027be840..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array___conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_3flict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from {{ ref('conflict_stream_array_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index bfc71a2a3f4d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_2lict_stream_array_ab3') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array from {{ ref('conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql deleted file mode 100644 index b014f8406caa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_conflict_stream_array_2_hashid, - jsonb_extract_path_text(_airbyte_nested_data, 'id') as "id", - _airbyte_emitted_at -from "postgres".test_normalization."conflict_stream_array_conflict_stream_array" as table_alias -cross join jsonb_array_elements( - case jsonb_typeof(conflict_stream_name) - when 'array' then conflict_stream_name - else '[]' end - ) as _airbyte_nested_data -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql deleted file mode 100644 index 5528cff17762..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast("id" as - bigint -) as "id", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab1" --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql deleted file mode 100644 index bee97a00368c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_array_2_hashid as - varchar -), '') || '-' || coalesce(cast("id" as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_name_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab2" --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index fb4a9ed3da93..693121b8cdc5 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -4,7 +4,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path(table_alias._airbyte_data, 'conflict_stream_array') as conflict_stream_array, + jsonb_extract_path(_airbyte_data, 'conflict_stream_array') as conflict_stream_array, _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_conflict_stream_array as table_alias -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index db12153f3fb9..7cb90ed2af78 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -6,9 +6,7 @@ select cast("id" as varchar ) as "id", - cast(conflict_stream_array as - jsonb -) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from "postgres"._airbyte_test_normalization."conflict_stream_array_ab1" -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql deleted file mode 100644 index b5838bff67b6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - jsonb_extract_path(conflict_stream_array, 'conflict_stream_name') as conflict_stream_name, - _airbyte_emitted_at -from "postgres".test_normalization."conflict_stream_array" as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql deleted file mode 100644 index a2146d9676f0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab1" --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql deleted file mode 100644 index 7cf9dc3840af..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_array_hashid as - varchar -), '') || '-' || coalesce(cast(conflict_stream_name as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_array_2_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab2" --- conflict_stream_array at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index 8066cc9cd87a..8d5e15e1cd45 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -4,7 +4,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path(table_alias._airbyte_data, 'conflict_stream_name') as conflict_stream_name, + + jsonb_extract_path(table_alias._airbyte_data, 'conflict_stream_name') + as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_conflict_stream_name as table_alias -- conflict_stream_name diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql index 17530affc263..af9e0733f509 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -4,7 +4,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select _airbyte_conflict_stream_name_hashid, - jsonb_extract_path(table_alias.conflict_stream_name, 'conflict_stream_name') as conflict_stream_name, + + jsonb_extract_path(table_alias.conflict_stream_name, 'conflict_stream_name') + as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization."conflict_stream_name" as table_alias where conflict_stream_name is not null diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql index 27b1576ef067..0cc444ec6bf5 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql @@ -5,7 +5,9 @@ select jsonb_extract_path_text(_airbyte_data, 'id') as "id", jsonb_extract_path_text(_airbyte_data, 'date') as "date", - jsonb_extract_path(table_alias._airbyte_data, 'partition') as "partition", + + jsonb_extract_path(table_alias._airbyte_data, 'partition') + as "partition", _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias -- nested_stream_with_c__lting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql deleted file mode 100644 index f37c88a61288..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_arra___conflict_stream_name__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - "id", - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_arra___conflict_stream_name_ab3" --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from "postgres".test_normalization."conflict_stream_array_conflict_stream_array" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index 79fe799b35d2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_array_conflict_stream_array__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_array_conflict_stream_array_ab3" --- conflict_stream_array at conflict_stream_array/conflict_stream_array from "postgres".test_normalization."conflict_stream_array" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql deleted file mode 100644 index 1a14586bbb40..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('conflict_stream_array_conflict_stream_array', 'conflict_stream_array', 'conflict_stream_name') }} -select - _airbyte_conflict_stream_array_2_hashid, - {{ json_extract_scalar(unnested_column_value('conflict_stream_name'), ['id'], ['id']) }} as {{ adapter.quote('id') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array') }} as table_alias -{{ cross_join_unnest('conflict_stream_array', 'conflict_stream_name') }} -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql deleted file mode 100644 index 06724cacaa22..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_arra___conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql deleted file mode 100644 index 98f90e0b93e7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_arra___conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_2_hashid', - adapter.quote('id'), - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_arra___conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 08592bff0224..bcc29f442b1c 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -2,7 +2,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, + {{ json_extract_array('_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, _airbyte_emitted_at from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} as table_alias -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index c23f5ce802b7..2f109e54445b 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -2,7 +2,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast(conflict_stream_array as {{ type_json() }}) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from {{ ref('conflict_stream_array_ab1') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql index d14730750390..c2b8200b5ffd 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -4,7 +4,7 @@ select *, {{ dbt_utils.surrogate_key([ adapter.quote('id'), - 'conflict_stream_array', + array_to_string('conflict_stream_array'), ]) }} as _airbyte_conflict_stream_array_hashid from {{ ref('conflict_stream_array_ab2') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql deleted file mode 100644 index 9fa73c27e073..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - {{ json_extract_array('conflict_stream_array', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array') }} as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql deleted file mode 100644 index 026a337012ca..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array_ab1') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql deleted file mode 100644 index d276f99af9f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_hashid', - array_to_string('conflict_stream_name'), - ]) }} as _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab2') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql deleted file mode 100644 index bc085474e41f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_arra___conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - {{ adapter.quote('id') }}, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_arra___conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from {{ ref('conflict_stream_array_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index 93ea10dc2182..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab3') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array from {{ ref('conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 4b66a38ee76f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_array__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_array_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_array', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_array', true) end as conflict_stream_array, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_conflict_stream_array as table_alias --- conflict_stream_array -), __dbt__CTE__conflict_stream_array_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(conflict_stream_array as varchar) as conflict_stream_array, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_array_ab1 --- conflict_stream_array -), __dbt__CTE__conflict_stream_array_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_array as varchar), '') - - as varchar)) as _airbyte_conflict_stream_array_hashid -from __dbt__CTE__conflict_stream_array_ab2 --- conflict_stream_array -)-- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from __dbt__CTE__conflict_stream_array_ab3 --- conflict_stream_array from "integrationtests".test_normalization._airbyte_raw_conflict_stream_array - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index 5fce62225c9d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,48 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_array_conflict_stream_array__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_array_conflict_stream_array_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - json_extract_path_text(conflict_stream_array, 'conflict_stream_name', true) as conflict_stream_name, - _airbyte_emitted_at -from "integrationtests".test_normalization."conflict_stream_array" as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array -), __dbt__CTE__conflict_stream_array_conflict_stream_array_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_array_conflict_stream_array_ab1 --- conflict_stream_array at conflict_stream_array/conflict_stream_array -), __dbt__CTE__conflict_stream_array_conflict_stream_array_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_array_hashid as varchar), '') || '-' || coalesce(cast(conflict_stream_name as varchar), '') - - as varchar)) as _airbyte_conflict_stream_array_2_hashid -from __dbt__CTE__conflict_stream_array_conflict_stream_array_ab2 --- conflict_stream_array at conflict_stream_array/conflict_stream_array -)-- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from __dbt__CTE__conflict_stream_array_conflict_stream_array_ab3 --- conflict_stream_array at conflict_stream_array/conflict_stream_array from "integrationtests".test_normalization."conflict_stream_array" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql deleted file mode 100644 index da2df5c8d849..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql +++ /dev/null @@ -1,95 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_array_conflict_stream_array_conflict_stream_name__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - -), -joined as ( - select - _airbyte_conflict_stream_array_hashid as _airbyte_hashid, - json_extract_array_element_text(conflict_stream_name, numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."conflict_stream_array_conflict_stream_array" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in conflict_stream_array_conflict_stream_array.conflict_stream_name - where numbers.generated_number <= json_array_length(conflict_stream_name, true) -) -select - _airbyte_conflict_stream_array_2_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'id', true) end as id, - _airbyte_emitted_at -from "integrationtests".test_normalization."conflict_stream_array_conflict_stream_array" as table_alias -left join joined on _airbyte_conflict_stream_array_hashid = joined._airbyte_hashid -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name -), __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as - bigint -) as id, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1 --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name -), __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_array_2_hashid as varchar), '') || '-' || coalesce(cast(id as varchar), '') - - as varchar)) as _airbyte_conflict_stream_name_hashid -from __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2 --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name -)-- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from __dbt__CTE__conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3 --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_array_conflict_stream_array" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 127bdb421de2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_name__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_name_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) end as conflict_stream_name, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name as table_alias --- conflict_stream_name -), __dbt__CTE__conflict_stream_name_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(conflict_stream_name as varchar) as conflict_stream_name, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_name_ab1 --- conflict_stream_name -), __dbt__CTE__conflict_stream_name_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_name as varchar), '') - - as varchar)) as _airbyte_conflict_stream_name_hashid -from __dbt__CTE__conflict_stream_name_ab2 --- conflict_stream_name -)-- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from __dbt__CTE__conflict_stream_name_ab3 --- conflict_stream_name from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 4d0f83604c82..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,48 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - case when json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) end as conflict_stream_name, - _airbyte_emitted_at -from "integrationtests".test_normalization."conflict_stream_name" as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as varchar) as conflict_stream_name, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 --- conflict_stream_name at conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_name_hashid as varchar), '') || '-' || coalesce(cast(conflict_stream_name as varchar), '') - - as varchar)) as _airbyte_conflict_stream_name_2_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab2 --- conflict_stream_name at conflict_stream_name/conflict_stream_name -)-- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab3 --- conflict_stream_name at conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index f93f3e475165..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,48 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name_conflict_stream_name__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - case when json_extract_path_text(conflict_stream_name, 'groups', true) != '' then json_extract_path_text(conflict_stream_name, 'groups', true) end as groups, - _airbyte_emitted_at -from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(groups as varchar) as groups, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_name_2_hashid as varchar), '') || '-' || coalesce(cast(groups as varchar), '') - - as varchar)) as _airbyte_conflict_stream_name_3_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -)-- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - groups, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 4952f5f88bbf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,49 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_scalar__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_scalar_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) end as conflict_stream_scalar, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias --- conflict_stream_scalar -), __dbt__CTE__conflict_stream_scalar_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(conflict_stream_scalar as - bigint -) as conflict_stream_scalar, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_scalar_ab1 --- conflict_stream_scalar -), __dbt__CTE__conflict_stream_scalar_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_scalar as varchar), '') - - as varchar)) as _airbyte_conflict_stream_scalar_hashid -from __dbt__CTE__conflict_stream_scalar_ab2 --- conflict_stream_scalar -)-- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from __dbt__CTE__conflict_stream_scalar_ab3 --- conflict_stream_scalar from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 263022b9f315..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,21 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_cdc_excluded__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from "integrationtests".test_normalization."dedup_cdc_excluded_scd" --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 41fdb87d9750..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,85 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" - - - as ( - -with __dbt__CTE__dedup_cdc_excluded_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'name', true) != '' then json_extract_path_text(_airbyte_data, 'name', true) end as name, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) end as _ab_cdc_lsn, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) end as _ab_cdc_updated_at, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) end as _ab_cdc_deleted_at, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(name as varchar) as name, - cast(_ab_cdc_lsn as - float -) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as - float -) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as - float -) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from __dbt__CTE__dedup_cdc_excluded_ab1 --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(name as varchar), '') || '-' || coalesce(cast(_ab_cdc_lsn as varchar), '') || '-' || coalesce(cast(_ab_cdc_updated_at as varchar), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as varchar), '') - - as varchar)) as _airbyte_dedup_cdc_excluded_hashid -from __dbt__CTE__dedup_cdc_excluded_ab2 --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab4 as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from __dbt__CTE__dedup_cdc_excluded_ab3 --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from __dbt__CTE__dedup_cdc_excluded_ab4 --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 40056bcbbc47..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,24 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_exchange_rate__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from "integrationtests".test_normalization."dedup_exchange_rate_scd" --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index d9c4ccccbf8d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,98 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_exchange_rate_scd__dbt_tmp" - - - as ( - -with __dbt__CTE__dedup_exchange_rate_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, - case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", - case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, - case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, - case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(currency as varchar) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("hkd@spéçiäl & characters" as - float -) as "hkd@spéçiäl & characters", - cast(hkd_special___characters as varchar) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from __dbt__CTE__dedup_exchange_rate_ab1 --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') - - as varchar)) as _airbyte_dedup_exchange_rate_hashid -from __dbt__CTE__dedup_exchange_rate_ab2 --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab4 as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from __dbt__CTE__dedup_exchange_rate_ab3 --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - date as _airbyte_start_at, - lag(date) over ( - partition by id, currency, cast(nzd as varchar) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id, currency, cast(nzd as varchar) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from __dbt__CTE__dedup_exchange_rate_ab4 --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index ef547faeed64..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,77 +0,0 @@ - - - create table - "integrationtests".test_normalization."exchange_rate__dbt_tmp" - - - as ( - -with __dbt__CTE__exchange_rate_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, - case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", - case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, - case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, - case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_exchange_rate as table_alias --- exchange_rate -), __dbt__CTE__exchange_rate_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(currency as varchar) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("hkd@spéçiäl & characters" as - float -) as "hkd@spéçiäl & characters", - cast(hkd_special___characters as varchar) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from __dbt__CTE__exchange_rate_ab1 --- exchange_rate -), __dbt__CTE__exchange_rate_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') - - as varchar)) as _airbyte_exchange_rate_hashid -from __dbt__CTE__exchange_rate_ab2 --- exchange_rate -)-- Final base SQL model -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from __dbt__CTE__exchange_rate_ab3 --- exchange_rate from "integrationtests".test_normalization._airbyte_raw_exchange_rate - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql deleted file mode 100644 index 7d2e8f10dc4e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql +++ /dev/null @@ -1,19 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - date, - "partition", - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd" --- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql deleted file mode 100644 index 994439d9c0ea..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql +++ /dev/null @@ -1,54 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - json_extract_path_text("partition", 'double_array_data', true) as double_array_data, - json_extract_path_text("partition", 'DATA', true) as data, - json_extract_path_text("partition", 'column`_''with"_quotes', true) as "column`_'with""_quotes", - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" as table_alias -where "partition" is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - "column`_'with""_quotes", - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as varchar), '') || '-' || coalesce(cast(double_array_data as varchar), '') || '-' || coalesce(cast(data as varchar), '') || '-' || coalesce(cast("column`_'with""_quotes" as varchar), '') - - as varchar)) as _airbyte_partition_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -)-- Final base SQL model -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - "column`_'with""_quotes", - _airbyte_emitted_at, - _airbyte_partition_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql deleted file mode 100644 index 909b535ee094..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text("column`_'with""_quotes", numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition."column`_'with""_quotes" - where numbers.generated_number <= json_array_length("column`_'with""_quotes", true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where "column`_'with""_quotes" is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as varchar) as currency, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') - - as varchar)) as _airbyte_column___with__quotes_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -)-- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql deleted file mode 100644 index 4abaa0770943..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_data__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text(data, numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.data - where numbers.generated_number <= json_array_length(data, true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where data is not null --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as varchar) as currency, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') - - as varchar)) as _airbyte_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -)-- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql deleted file mode 100644 index 34429d9d24f1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 2 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text(double_array_data, numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.double_array_data - where numbers.generated_number <= json_array_length(double_array_data, true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'id', true) end as id, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as varchar) as id, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(id as varchar), '') - - as varchar)) as _airbyte_double_array_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -)-- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql deleted file mode 100644 index 23122c0849d7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ /dev/null @@ -1,71 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(table_alias._airbyte_data, 'partition', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'partition', true) end as "partition", - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias --- nested_stream_with_complex_columns_resulting_into_long_names -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(date as varchar) as date, - cast("partition" as varchar) as "partition", - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab1 --- nested_stream_with_complex_columns_resulting_into_long_names -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast("partition" as varchar), '') - - as varchar)) as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab2 --- nested_stream_with_complex_columns_resulting_into_long_names -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab4 as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab3 --- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - date, - "partition", - date as _airbyte_start_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab4 --- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql deleted file mode 100644 index 3b7dd68e15e6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization."non_nested_stream_without_namespace_resulting_into_long_names__dbt_tmp" - - - as ( - -with __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias --- non_nested_stream_without_namespace_resulting_into_long_names -), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(date as varchar) as date, - _airbyte_emitted_at -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 --- non_nested_stream_without_namespace_resulting_into_long_names -), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') - - as varchar)) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 --- non_nested_stream_without_namespace_resulting_into_long_names -)-- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 --- non_nested_stream_without_namespace_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql deleted file mode 100644 index adb67253b0a2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization_namespace."simple_stream_with_namespace_resulting_into_long_names__dbt_tmp" - - - as ( - -with __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - _airbyte_emitted_at -from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias --- simple_stream_with_namespace_resulting_into_long_names -), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(date as varchar) as date, - _airbyte_emitted_at -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 --- simple_stream_with_namespace_resulting_into_long_names -), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') - - as varchar)) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 --- simple_stream_with_namespace_resulting_into_long_names -)-- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 --- simple_stream_with_namespace_resulting_into_long_names from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql index 7dd3aef647f1..d3df56ab3d35 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab1.sql @@ -2,7 +2,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, + {{ json_extract_array('_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as conflict_stream_array, _airbyte_emitted_at from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} as table_alias -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql index 42ac43742a99..2f0da1bb06e7 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab2.sql @@ -2,7 +2,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_array as {{ type_json() }}) as conflict_stream_array, + conflict_stream_array, _airbyte_emitted_at from {{ ref('conflict_stream_array_ab1') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql index 5b087cb8cc29..78f9b1a230cf 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -4,7 +4,7 @@ select *, {{ dbt_utils.surrogate_key([ 'id', - 'conflict_stream_array', + array_to_string('conflict_stream_array'), ]) }} as _airbyte_conflict_stream_array_hashid from {{ ref('conflict_stream_array_ab2') }} -- conflict_stream_array diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql deleted file mode 100644 index 9fa73c27e073..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_array_hashid, - {{ json_extract_array('conflict_stream_array', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array') }} as table_alias -where conflict_stream_array is not null --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql deleted file mode 100644 index 026a337012ca..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array_ab1') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql deleted file mode 100644 index d276f99af9f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_hashid', - array_to_string('conflict_stream_name'), - ]) }} as _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab2') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql deleted file mode 100644 index b926c2f347c4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('conflict_stream_array_conflict_stream_array', 'conflict_stream_array', 'conflict_stream_name') }} -select - _airbyte_conflict_stream_array_2_hashid, - {{ json_extract_scalar(unnested_column_value('conflict_stream_name'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array') }} as table_alias -{{ cross_join_unnest('conflict_stream_array', 'conflict_stream_name') }} -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql deleted file mode 100644 index 36a6d743a9d9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_array_2_hashid, - cast(id as {{ dbt_utils.type_bigint() }}) as id, - _airbyte_emitted_at -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql deleted file mode 100644 index 422bf2eb099e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_array_2_hashid', - 'id', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql deleted file mode 100644 index 93ea10dc2182..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_2_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_ab3') }} --- conflict_stream_array at conflict_stream_array/conflict_stream_array from {{ ref('conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql deleted file mode 100644 index 7e6c8de93be3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array_conflict_stream_array_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_array_2_hashid, - id, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_array_conflict_stream_array_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_array/conflict_stream_array/conflict_stream_name from {{ ref('conflict_stream_array_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql index f533132c0b80..af3d2d21a34f 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql @@ -4,7 +4,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - get_path(parse_json(table_alias._airbyte_data), '"conflict_stream_array"') as CONFLICT_STREAM_ARRAY, + get_path(parse_json(_airbyte_data), '"conflict_stream_array"') as CONFLICT_STREAM_ARRAY, _airbyte_emitted_at from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_ARRAY as table_alias -- CONFLICT_STREAM_ARRAY diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql index 740e68d82086..88430f42ebc8 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql @@ -6,9 +6,7 @@ select cast(ID as varchar ) as ID, - cast(CONFLICT_STREAM_ARRAY as - variant -) as CONFLICT_STREAM_ARRAY, + CONFLICT_STREAM_ARRAY, _airbyte_emitted_at from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB1" -- CONFLICT_STREAM_ARRAY diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql deleted file mode 100644 index 3a306b310ecc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - get_path(parse_json(CONFLICT_STREAM_ARRAY), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY" as table_alias -where CONFLICT_STREAM_ARRAY is not null --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql deleted file mode 100644 index 0075b16f923b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1" --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql deleted file mode 100644 index 47eeaa55ccd9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID as - varchar -), '') || '-' || coalesce(cast(CONFLICT_STREAM_NAME as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2" --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index 47f5b5968fd1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - to_varchar(get_path(parse_json(CONFLICT_STREAM_NAME.value), '"id"')) as ID, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY" as table_alias -cross join table(flatten(CONFLICT_STREAM_NAME)) as CONFLICT_STREAM_NAME -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index e86893cfda14..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - cast(ID as - bigint -) as ID, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1" --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index 4328e60732ee..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID as - varchar -), '') || '-' || coalesce(cast(ID as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2" --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql deleted file mode 100644 index 0bf6fb812bb8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY" as - ( --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3" --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index 2620233086b9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME" as - ( --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - ID, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3" --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql index bbbb0b30c085..14098c8e782a 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB1.sql @@ -2,7 +2,7 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as CONFLICT_STREAM_ARRAY, + {{ json_extract_array('_airbyte_data', ['conflict_stream_array'], ['conflict_stream_array']) }} as CONFLICT_STREAM_ARRAY, _airbyte_emitted_at from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_ARRAY') }} as table_alias -- CONFLICT_STREAM_ARRAY diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql index 29368ca24754..43a24e030681 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB2.sql @@ -2,7 +2,7 @@ -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(CONFLICT_STREAM_ARRAY as {{ type_json() }}) as CONFLICT_STREAM_ARRAY, + CONFLICT_STREAM_ARRAY, _airbyte_emitted_at from {{ ref('CONFLICT_STREAM_ARRAY_AB1') }} -- CONFLICT_STREAM_ARRAY diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql index 2e096f21e0a5..015ca450801f 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql @@ -4,7 +4,7 @@ select *, {{ dbt_utils.surrogate_key([ 'ID', - 'CONFLICT_STREAM_ARRAY', + array_to_string('CONFLICT_STREAM_ARRAY'), ]) }} as _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID from {{ ref('CONFLICT_STREAM_ARRAY_AB2') }} -- CONFLICT_STREAM_ARRAY diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql deleted file mode 100644 index a8bee37f3c28..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - {{ json_extract_array('CONFLICT_STREAM_ARRAY', ['conflict_stream_name'], ['conflict_stream_name']) }} as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_ARRAY') }} as table_alias -where CONFLICT_STREAM_ARRAY is not null --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql deleted file mode 100644 index 6fd9295c59a9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB1') }} --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql deleted file mode 100644 index f7652c6b6dc0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID', - array_to_string('CONFLICT_STREAM_NAME'), - ]) }} as _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB2') }} --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index 312e83327d69..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY', 'CONFLICT_STREAM_ARRAY', 'CONFLICT_STREAM_NAME') }} -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - {{ json_extract_scalar(unnested_column_value('CONFLICT_STREAM_NAME'), ['id'], ['id']) }} as ID, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY') }} as table_alias -{{ cross_join_unnest('CONFLICT_STREAM_ARRAY', 'CONFLICT_STREAM_NAME') }} -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 87fcdfa32bd1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - cast(ID as {{ dbt_utils.type_bigint() }}) as ID, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB1') }} --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index 51a7bb5ae583..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID', - 'ID', - ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB2') }} --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql deleted file mode 100644 index fe78d1c14177..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_AB3') }} --- CONFLICT_STREAM_ARRAY at conflict_stream_array/conflict_stream_array from {{ ref('CONFLICT_STREAM_ARRAY') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index d3518c85fa9a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_ARRAY_2_HASHID, - ID, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_NAME_AB3') }} --- CONFLICT_STREAM_NAME at conflict_stream_array/conflict_stream_array/conflict_stream_name from {{ ref('CONFLICT_STREAM_ARRAY_CONFLICT_STREAM_ARRAY') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json index eb34c61e8797..83d7d8a79987 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json @@ -210,11 +210,20 @@ "properties": { "groups": { "type": "string" - } - }, - "other_info": { - "type": "string" - }, + } + }, + "custom_fields": { + "items": { + "properties": { + "id": { + "type": ["null", "integer"] + }, + "value": {} + }, + "type": ["null", "object"] + }, + "type": ["null", "array"] + }, "conflict_stream_name": { "type": "integer" } @@ -264,7 +273,7 @@ "type": ["null", "number", "string"] }, "conflict_stream_array": { - "type": ["null", "object"], + "type": ["null", "array"], "properties": { "conflict_stream_name": { "type": ["null", "array"], diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt index 503b88685321..8b860ab2e2a0 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt @@ -30,13 +30,13 @@ {"type":"RECORD","record":{"stream":"dedup_cdc_excluded","data":{"id":7,"name":"lotus","_ab_cdc_updated_at":1623850868237,"_ab_cdc_lsn":27010048,"_ab_cdc_deleted_at":null},"emitted_at":1623861660}} {"type":"RECORD","record":{"stream":"dedup_cdc_excluded","data":{"id":6,"name":null,"_ab_cdc_updated_at":1623850868371,"_ab_cdc_lsn":27010232,"_ab_cdc_deleted_at":1623850868371},"emitted_at":1623861660}} -{"type":"RECORD","record":{"stream":"conflict_stream_name","data":{"id":1,"conflict_stream_name":{"conflict_stream_name": {"groups": "1", "other_info": "hello", "conflict_stream_name": 3}}},"emitted_at":1623861660}} -{"type":"RECORD","record":{"stream":"conflict_stream_name","data":{"id":2,"conflict_stream_name":{"conflict_stream_name": {"groups": "2", "other_info": "hi", "conflict_stream_name": 3}}},"emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"conflict_stream_name","data":{"id":1,"conflict_stream_name":{"conflict_stream_name": {"groups": "1", "custom_fields": [{"id":1, "value":3}, {"id":2, "value":4}], "conflict_stream_name": 3}}},"emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"conflict_stream_name","data":{"id":2,"conflict_stream_name":{"conflict_stream_name": {"groups": "2", "custom_fields": [{"id":1, "value":3}, {"id":2, "value":4}], "conflict_stream_name": 3}}},"emitted_at":1623861660}} {"type":"RECORD","record":{"stream":"conflict_stream_scalar","data":{"id":1,"conflict_stream_scalar": 2},"emitted_at":1623861660}} {"type":"RECORD","record":{"stream":"conflict_stream_scalar","data":{"id":2,"conflict_stream_scalar": 2},"emitted_at":1623861660}} -{"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":1,"conflict_stream_array": {"conflict_stream_array": "conflict_stream_array": [{"id": 1}, {"id": 2}, {"id": 3}]}},"emitted_at":1623861660}} -{"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":2,"conflict_stream_array": {"conflict_stream_array": "conflict_stream_array": [{"id": 4}, {"id": 5}, {"id": 6}]}},"emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":1, "conflict_stream_array": {"conflict_stream_array": [{"id": 1}, {"id": 2}, {"id": 3}]}}, "emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":2, "conflict_stream_array": {"conflict_stream_array": [{"id": 4}, {"id": 5}, {"id": 6}]}}, "emitted_at":1623861860}} From 3e66b3737c37a6c1a9baf612dc9149fd3d9e3b8f Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Tue, 17 Aug 2021 15:15:37 -0300 Subject: [PATCH 2/8] add redshift files --- .../conflict_stream_array.sql | 47 +++++++++ .../conflict_stream_name.sql | 49 ++++++++++ ...flict_stream_name_conflict_stream_name.sql | 50 ++++++++++ ...flict_stream_name_conflict_stream_name.sql | 48 +++++++++ .../conflict_stream_scalar.sql | 49 ++++++++++ .../test_normalization/dedup_cdc_excluded.sql | 21 ++++ .../dedup_cdc_excluded_scd.sql | 85 ++++++++++++++++ .../dedup_exchange_rate.sql | 24 +++++ .../dedup_exchange_rate_scd.sql | 98 +++++++++++++++++++ .../test_normalization/exchange_rate.sql | 77 +++++++++++++++ ...plex_columns_resulting_into_long_names.sql | 19 ++++ ...ns_resulting_into_long_names_partition.sql | 54 ++++++++++ ..._names_partition_column___with__quotes.sql | 93 ++++++++++++++++++ ...sulting_into_long_names_partition_data.sql | 93 ++++++++++++++++++ ...long_names_partition_double_array_data.sql | 93 ++++++++++++++++++ ..._columns_resulting_into_long_names_scd.sql | 73 ++++++++++++++ ...ut_namespace_resulting_into_long_names.sql | 47 +++++++++ ...th_namespace_resulting_into_long_names.sql | 47 +++++++++ .../integration_tests/test_normalization.py | 3 +- 19 files changed, 1069 insertions(+), 1 deletion(-) create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..4a93cdebea53 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,47 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_array__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_array_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + json_extract_path_text(_airbyte_data, 'conflict_stream_array', true) as conflict_stream_array, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_conflict_stream_array as table_alias +-- conflict_stream_array +), __dbt__CTE__conflict_stream_array_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + conflict_stream_array, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_array_ab1 +-- conflict_stream_array +), __dbt__CTE__conflict_stream_array_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_array as varchar), '') + + as varchar)) as _airbyte_conflict_stream_array_hashid +from __dbt__CTE__conflict_stream_array_ab2 +-- conflict_stream_array +)-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from __dbt__CTE__conflict_stream_array_ab3 +-- conflict_stream_array from "integrationtests".test_normalization._airbyte_raw_conflict_stream_array + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..b0adb5716bfb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,49 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_name__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_name_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + + case when json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) end + as conflict_stream_name, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name as table_alias +-- conflict_stream_name +), __dbt__CTE__conflict_stream_name_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(conflict_stream_name as varchar) as conflict_stream_name, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_name_ab1 +-- conflict_stream_name +), __dbt__CTE__conflict_stream_name_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_name as varchar), '') + + as varchar)) as _airbyte_conflict_stream_name_hashid +from __dbt__CTE__conflict_stream_name_ab2 +-- conflict_stream_name +)-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from __dbt__CTE__conflict_stream_name_ab3 +-- conflict_stream_name from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..42e977e0706c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,50 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + + case when json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) end + as conflict_stream_name, + _airbyte_emitted_at +from "integrationtests".test_normalization."conflict_stream_name" as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as varchar) as conflict_stream_name, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_conflict_stream_name_hashid as varchar), '') || '-' || coalesce(cast(conflict_stream_name as varchar), '') + + as varchar)) as _airbyte_conflict_stream_name_2_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab2 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name +)-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_ab3 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..f93f3e475165 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,48 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name_conflict_stream_name__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + case when json_extract_path_text(conflict_stream_name, 'groups', true) != '' then json_extract_path_text(conflict_stream_name, 'groups', true) end as groups, + _airbyte_emitted_at +from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(groups as varchar) as groups, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_conflict_stream_name_2_hashid as varchar), '') || '-' || coalesce(cast(groups as varchar), '') + + as varchar)) as _airbyte_conflict_stream_name_3_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +)-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + groups, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..4952f5f88bbf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,49 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_scalar__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_scalar_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) end as conflict_stream_scalar, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias +-- conflict_stream_scalar +), __dbt__CTE__conflict_stream_scalar_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(conflict_stream_scalar as + bigint +) as conflict_stream_scalar, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_scalar_ab1 +-- conflict_stream_scalar +), __dbt__CTE__conflict_stream_scalar_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_scalar as varchar), '') + + as varchar)) as _airbyte_conflict_stream_scalar_hashid +from __dbt__CTE__conflict_stream_scalar_ab2 +-- conflict_stream_scalar +)-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from __dbt__CTE__conflict_stream_scalar_ab3 +-- conflict_stream_scalar from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..263022b9f315 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,21 @@ + + + create table + "integrationtests".test_normalization."dedup_cdc_excluded__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from "integrationtests".test_normalization."dedup_cdc_excluded_scd" +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..41fdb87d9750 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,85 @@ + + + create table + "integrationtests".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" + + + as ( + +with __dbt__CTE__dedup_cdc_excluded_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'name', true) != '' then json_extract_path_text(_airbyte_data, 'name', true) end as name, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) end as _ab_cdc_lsn, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) end as _ab_cdc_updated_at, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) end as _ab_cdc_deleted_at, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(name as varchar) as name, + cast(_ab_cdc_lsn as + float +) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as + float +) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as + float +) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from __dbt__CTE__dedup_cdc_excluded_ab1 +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(name as varchar), '') || '-' || coalesce(cast(_ab_cdc_lsn as varchar), '') || '-' || coalesce(cast(_ab_cdc_updated_at as varchar), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as varchar), '') + + as varchar)) as _airbyte_dedup_cdc_excluded_hashid +from __dbt__CTE__dedup_cdc_excluded_ab2 +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab4 as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from __dbt__CTE__dedup_cdc_excluded_ab3 +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from __dbt__CTE__dedup_cdc_excluded_ab4 +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..40056bcbbc47 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,24 @@ + + + create table + "integrationtests".test_normalization."dedup_exchange_rate__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from "integrationtests".test_normalization."dedup_exchange_rate_scd" +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..d9c4ccccbf8d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,98 @@ + + + create table + "integrationtests".test_normalization."dedup_exchange_rate_scd__dbt_tmp" + + + as ( + +with __dbt__CTE__dedup_exchange_rate_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, + case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", + case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, + case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, + case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(currency as varchar) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("hkd@spéçiäl & characters" as + float +) as "hkd@spéçiäl & characters", + cast(hkd_special___characters as varchar) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from __dbt__CTE__dedup_exchange_rate_ab1 +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') + + as varchar)) as _airbyte_dedup_exchange_rate_hashid +from __dbt__CTE__dedup_exchange_rate_ab2 +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab4 as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from __dbt__CTE__dedup_exchange_rate_ab3 +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + date as _airbyte_start_at, + lag(date) over ( + partition by id, currency, cast(nzd as varchar) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id, currency, cast(nzd as varchar) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from __dbt__CTE__dedup_exchange_rate_ab4 +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..ef547faeed64 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,77 @@ + + + create table + "integrationtests".test_normalization."exchange_rate__dbt_tmp" + + + as ( + +with __dbt__CTE__exchange_rate_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, + case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", + case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, + case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, + case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_exchange_rate as table_alias +-- exchange_rate +), __dbt__CTE__exchange_rate_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(currency as varchar) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("hkd@spéçiäl & characters" as + float +) as "hkd@spéçiäl & characters", + cast(hkd_special___characters as varchar) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from __dbt__CTE__exchange_rate_ab1 +-- exchange_rate +), __dbt__CTE__exchange_rate_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') + + as varchar)) as _airbyte_exchange_rate_hashid +from __dbt__CTE__exchange_rate_ab2 +-- exchange_rate +)-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from __dbt__CTE__exchange_rate_ab3 +-- exchange_rate from "integrationtests".test_normalization._airbyte_raw_exchange_rate + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql new file mode 100644 index 000000000000..7d2e8f10dc4e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql @@ -0,0 +1,19 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + date, + "partition", + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd" +-- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql new file mode 100644 index 000000000000..994439d9c0ea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql @@ -0,0 +1,54 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + json_extract_path_text("partition", 'double_array_data', true) as double_array_data, + json_extract_path_text("partition", 'DATA', true) as data, + json_extract_path_text("partition", 'column`_''with"_quotes', true) as "column`_'with""_quotes", + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" as table_alias +where "partition" is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + "column`_'with""_quotes", + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as varchar), '') || '-' || coalesce(cast(double_array_data as varchar), '') || '-' || coalesce(cast(data as varchar), '') || '-' || coalesce(cast("column`_'with""_quotes" as varchar), '') + + as varchar)) as _airbyte_partition_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +)-- Final base SQL model +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + "column`_'with""_quotes", + _airbyte_emitted_at, + _airbyte_partition_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql new file mode 100644 index 000000000000..909b535ee094 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text("column`_'with""_quotes", numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition."column`_'with""_quotes" + where numbers.generated_number <= json_array_length("column`_'with""_quotes", true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where "column`_'with""_quotes" is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as varchar) as currency, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') + + as varchar)) as _airbyte_column___with__quotes_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +)-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql new file mode 100644 index 000000000000..4abaa0770943 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_data__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text(data, numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.data + where numbers.generated_number <= json_array_length(data, true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where data is not null +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as varchar) as currency, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') + + as varchar)) as _airbyte_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +)-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql new file mode 100644 index 000000000000..34429d9d24f1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 2 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text(double_array_data, numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.double_array_data + where numbers.generated_number <= json_array_length(double_array_data, true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'id', true) end as id, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as varchar) as id, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(id as varchar), '') + + as varchar)) as _airbyte_double_array_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +)-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql new file mode 100644 index 000000000000..835027b60631 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -0,0 +1,73 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + + case when json_extract_path_text(table_alias._airbyte_data, 'partition', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'partition', true) end + as "partition", + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias +-- nested_stream_with_complex_columns_resulting_into_long_names +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(date as varchar) as date, + cast("partition" as varchar) as "partition", + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab1 +-- nested_stream_with_complex_columns_resulting_into_long_names +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast("partition" as varchar), '') + + as varchar)) as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab2 +-- nested_stream_with_complex_columns_resulting_into_long_names +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab4 as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab3 +-- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + date, + "partition", + date as _airbyte_start_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_ab4 +-- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..3b7dd68e15e6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql @@ -0,0 +1,47 @@ + + + create table + "integrationtests".test_normalization."non_nested_stream_without_namespace_resulting_into_long_names__dbt_tmp" + + + as ( + +with __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias +-- non_nested_stream_without_namespace_resulting_into_long_names +), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(date as varchar) as date, + _airbyte_emitted_at +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 +-- non_nested_stream_without_namespace_resulting_into_long_names +), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') + + as varchar)) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 +-- non_nested_stream_without_namespace_resulting_into_long_names +)-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 +-- non_nested_stream_without_namespace_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..adb67253b0a2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql @@ -0,0 +1,47 @@ + + + create table + "integrationtests".test_normalization_namespace."simple_stream_with_namespace_resulting_into_long_names__dbt_tmp" + + + as ( + +with __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + _airbyte_emitted_at +from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias +-- simple_stream_with_namespace_resulting_into_long_names +), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(date as varchar) as date, + _airbyte_emitted_at +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 +-- simple_stream_with_namespace_resulting_into_long_names +), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') + + as varchar)) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 +-- simple_stream_with_namespace_resulting_into_long_names +)-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 +-- simple_stream_with_namespace_resulting_into_long_names from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py index ee07052aa424..f83ba29816ca 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py +++ b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py @@ -77,7 +77,8 @@ def setup_test_path(request): # Uncomment the following line as an example on how to run the test against local destinations only... # @pytest.mark.parametrize("destination_type", [DestinationType.POSTGRES, DestinationType.MYSQL]) # Run tests on all destinations: -@pytest.mark.parametrize("destination_type", list(DestinationType)) +#@pytest.mark.parametrize("destination_type", list(DestinationType)) +@pytest.mark.parametrize("destination_type", [DestinationType.REDSHIFT]) def test_normalization(destination_type: DestinationType, test_resource_name: str, setup_test_path): print("Testing normalization") integration_type = destination_type.value From cd22347f754ff0dc11b6d11d75e47f93d1dcd336 Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Tue, 17 Aug 2021 15:31:50 -0300 Subject: [PATCH 3/8] format --- .../data_input/catalog.json | 26 +++++++++---------- .../integration_tests/test_normalization.py | 2 +- .../source_chargebee/streams.py | 1 + 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json index 83d7d8a79987..7037973518ce 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json @@ -210,20 +210,20 @@ "properties": { "groups": { "type": "string" - } - }, - "custom_fields": { - "items": { - "properties": { - "id": { - "type": ["null", "integer"] - }, - "value": {} - }, - "type": ["null", "object"] - }, - "type": ["null", "array"] + } + }, + "custom_fields": { + "items": { + "properties": { + "id": { + "type": ["null", "integer"] + }, + "value": {} + }, + "type": ["null", "object"] }, + "type": ["null", "array"] + }, "conflict_stream_name": { "type": "integer" } diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py index f83ba29816ca..c23742a67855 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py +++ b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py @@ -77,7 +77,7 @@ def setup_test_path(request): # Uncomment the following line as an example on how to run the test against local destinations only... # @pytest.mark.parametrize("destination_type", [DestinationType.POSTGRES, DestinationType.MYSQL]) # Run tests on all destinations: -#@pytest.mark.parametrize("destination_type", list(DestinationType)) +# @pytest.mark.parametrize("destination_type", list(DestinationType)) @pytest.mark.parametrize("destination_type", [DestinationType.REDSHIFT]) def test_normalization(destination_type: DestinationType, test_resource_name: str, setup_test_path): print("Testing normalization") diff --git a/airbyte-integrations/connectors/source-chargebee/source_chargebee/streams.py b/airbyte-integrations/connectors/source-chargebee/source_chargebee/streams.py index 5f4d71c08b95..47988002500c 100644 --- a/airbyte-integrations/connectors/source-chargebee/source_chargebee/streams.py +++ b/airbyte-integrations/connectors/source-chargebee/source_chargebee/streams.py @@ -126,6 +126,7 @@ class SemiIncrementalChargebeeStream(ChargebeeStream): This means that semi incremental streams read all records (like full_refresh streams) but do filtering directly in the code and output only latest records (like incremental streams). """ + cursor_field = "updated_at" def __init__(self, start_date: str): From ec9e5d45d2df7ac17cc87e263fe6ad40bec8756d Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Wed, 18 Aug 2021 19:33:47 -0300 Subject: [PATCH 4/8] change logic --- .../macros/cross_db_utils/json_operations.sql | 6 +++--- .../conflict_stream_name__2flict_stream_name_ab1.sql | 2 +- .../test_normalization/conflict_stream_name_ab1.sql | 2 +- .../nested_stream_with_co_1g_into_long_names_ab1.sql | 2 +- .../test_normalization/conflict_stream_name_ab1.sql | 2 +- ...conflict_stream_name_conflict_stream_name_ab1.sql | 2 +- ...sted_stream_with_c__lting_into_long_names_ab1.sql | 2 +- .../test_normalization/conflict_stream_name.sql | 2 +- .../conflict_stream_name_conflict_stream_name.sql | 2 +- ...complex_columns_resulting_into_long_names_scd.sql | 2 +- .../integration_tests/test_normalization.py | 3 +-- .../transform_catalog/stream_processor.py | 12 ++++++++++-- 12 files changed, 23 insertions(+), 16 deletions(-) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql index 90cd9ca0dbdf..9dc7339cb558 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql @@ -68,7 +68,7 @@ {%- endmacro %} {% macro postgres__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if json_column|string() == "_airbyte_nested_data" %} + {%- if from_table is defined %} jsonb_extract_path({{ json_column }}, {{ format_json_path(json_path_list) }}) {% else %} jsonb_extract_path({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}) @@ -76,7 +76,7 @@ {%- endmacro %} {% macro mysql__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if json_column|string() == "_airbyte_nested_data" %} + {%- if from_table is defined %} json_extract({{ json_column }}, {{ format_json_path(normalized_json_path) }}) {% else %} json_extract({{ from_table }}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) @@ -84,7 +84,7 @@ {%- endmacro %} {% macro redshift__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if json_column|string() == "_airbyte_nested_data" %} + {%- if from_table is defined %} case when json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) end {% else %} case when json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) end diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql index e5689bca73bd..0e675d7ed263 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select _airbyte_conflict_stream_name_hashid, - json_extract(table_alias.conflict_stream_name, + json_extract(conflict_stream_name, '$."conflict_stream_name"') as conflict_stream_name, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index a575697fcb36..e52099358ad8 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -6,7 +6,7 @@ select json_value(_airbyte_data, '$."id"') as id, - json_extract(table_alias._airbyte_data, + json_extract(_airbyte_data, '$."conflict_stream_name"') as conflict_stream_name, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql index 81d223bc373c..b7fd575e3e57 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql @@ -8,7 +8,7 @@ select json_value(_airbyte_data, '$."date"') as `date`, - json_extract(table_alias._airbyte_data, + json_extract(_airbyte_data, '$."partition"') as `partition`, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index 8d5e15e1cd45..38c2abe60d27 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path(table_alias._airbyte_data, 'conflict_stream_name') + jsonb_extract_path(_airbyte_data, 'conflict_stream_name') as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_conflict_stream_name as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql index af9e0733f509..cd8b1c1e23f2 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select _airbyte_conflict_stream_name_hashid, - jsonb_extract_path(table_alias.conflict_stream_name, 'conflict_stream_name') + jsonb_extract_path(conflict_stream_name, 'conflict_stream_name') as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization."conflict_stream_name" as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql index 0cc444ec6bf5..3a510f27d0f4 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql @@ -6,7 +6,7 @@ select jsonb_extract_path_text(_airbyte_data, 'id') as "id", jsonb_extract_path_text(_airbyte_data, 'date') as "date", - jsonb_extract_path(table_alias._airbyte_data, 'partition') + jsonb_extract_path(_airbyte_data, 'partition') as "partition", _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql index b0adb5716bfb..6c0faeafeb2f 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -12,7 +12,7 @@ with __dbt__CTE__conflict_stream_name_ab1 as ( select case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) end + case when json_extract_path_text(_airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_name', true) end as conflict_stream_name, _airbyte_emitted_at from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql index 42e977e0706c..d3b4f7b9e3a3 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -12,7 +12,7 @@ with __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 as ( select _airbyte_conflict_stream_name_hashid, - case when json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) end + case when json_extract_path_text(conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(conflict_stream_name, 'conflict_stream_name', true) end as conflict_stream_name, _airbyte_emitted_at from "integrationtests".test_normalization."conflict_stream_name" as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql index 835027b60631..5532bef356ec 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -13,7 +13,7 @@ select case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(table_alias._airbyte_data, 'partition', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'partition', true) end + case when json_extract_path_text(_airbyte_data, 'partition', true) != '' then json_extract_path_text(_airbyte_data, 'partition', true) end as "partition", _airbyte_emitted_at from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py index c23742a67855..ee07052aa424 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py +++ b/airbyte-integrations/bases/base-normalization/integration_tests/test_normalization.py @@ -77,8 +77,7 @@ def setup_test_path(request): # Uncomment the following line as an example on how to run the test against local destinations only... # @pytest.mark.parametrize("destination_type", [DestinationType.POSTGRES, DestinationType.MYSQL]) # Run tests on all destinations: -# @pytest.mark.parametrize("destination_type", list(DestinationType)) -@pytest.mark.parametrize("destination_type", [DestinationType.REDSHIFT]) +@pytest.mark.parametrize("destination_type", list(DestinationType)) def test_normalization(destination_type: DestinationType, test_resource_name: str, setup_test_path): print("Testing normalization") integration_type = destination_type.value diff --git a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py index afea5181eb4c..f465c1e045fb 100644 --- a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py +++ b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py @@ -341,20 +341,28 @@ def generate_json_parsing_model(self, from_table: str, column_names: Dict[str, T return sql def extract_json_columns(self, column_names: Dict[str, Tuple[str, str]]) -> List[str]: + # The `unnest_dest_alias` is used when destination macro unnested_column_value alias + # the join table. This causes conflict with table_alias alias when extract the json info + # from main table. + unnest_dest_alias = self.destination_type in [DestinationType.MYSQL, DestinationType.POSTGRES, DestinationType.REDSHIFT] return [ StreamProcessor.extract_json_column( - field, self.json_column_name, self.properties[field], column_names[field][0], self.table_alias + field, self.json_column_name, self.properties[field], column_names[field][0], self.table_alias, unnest_dest_alias ) for field in column_names ] @staticmethod - def extract_json_column(property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str) -> str: + def extract_json_column( + property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str, unnest_dest_alias: bool + ) -> str: json_path = [property_name] # In some cases, some destination aren't able to parse the JSON blob using the original property name # we make their life easier by using a pre-populated and sanitized column name instead... normalized_json_path = [transform_json_naming(property_name)] table_alias = f"{table_alias}" + if "unnest_cte" in json_column_name and unnest_dest_alias: + table_alias = None json_extract = jinja_call(f"json_extract('{table_alias}', {json_column_name}, {json_path})") if "type" in definition: if is_array(definition["type"]): From 50f2b05bb11c01acb589d03a1a578dc707b2c26d Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Thu, 19 Aug 2021 00:15:11 -0300 Subject: [PATCH 5/8] change logic for unnest --- .../macros/cross_db_utils/json_operations.sql | 6 +++--- .../conflict_stream_name__2flict_stream_name_ab1.sql | 2 +- .../test_normalization/conflict_stream_name_ab1.sql | 2 +- .../nested_stream_with_co_1g_into_long_names_ab1.sql | 2 +- .../test_normalization/conflict_stream_name_ab1.sql | 2 +- .../conflict_stream_name_conflict_stream_name_ab1.sql | 2 +- .../nested_stream_with_c__lting_into_long_names_ab1.sql | 2 +- .../test_normalization/conflict_stream_name.sql | 2 +- .../conflict_stream_name_conflict_stream_name.sql | 2 +- ...m_with_complex_columns_resulting_into_long_names_scd.sql | 2 +- .../test_primary_key_streams/data_input/catalog.json | 2 +- .../test_primary_key_streams/data_input/messages.txt | 2 -- .../normalization/transform_catalog/stream_processor.py | 4 ++-- 13 files changed, 15 insertions(+), 17 deletions(-) diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql index 9dc7339cb558..a6748f325db1 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql @@ -68,7 +68,7 @@ {%- endmacro %} {% macro postgres__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if from_table is defined %} + {%- if from_table|string() == '' %} jsonb_extract_path({{ json_column }}, {{ format_json_path(json_path_list) }}) {% else %} jsonb_extract_path({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}) @@ -76,7 +76,7 @@ {%- endmacro %} {% macro mysql__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if from_table is defined %} + {%- if from_table|string() == '' %} json_extract({{ json_column }}, {{ format_json_path(normalized_json_path) }}) {% else %} json_extract({{ from_table }}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) @@ -84,7 +84,7 @@ {%- endmacro %} {% macro redshift__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - {%- if from_table is defined %} + {%- if from_table|string() == '' %} case when json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ json_column }}, {{ format_json_path(json_path_list) }}, true) end {% else %} case when json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) != '' then json_extract_path_text({{ from_table }}.{{ json_column }}, {{ format_json_path(json_path_list) }}, true) end diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql index 0e675d7ed263..e5689bca73bd 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select _airbyte_conflict_stream_name_hashid, - json_extract(conflict_stream_name, + json_extract(table_alias.conflict_stream_name, '$."conflict_stream_name"') as conflict_stream_name, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index e52099358ad8..a575697fcb36 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -6,7 +6,7 @@ select json_value(_airbyte_data, '$."id"') as id, - json_extract(_airbyte_data, + json_extract(table_alias._airbyte_data, '$."conflict_stream_name"') as conflict_stream_name, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql index b7fd575e3e57..81d223bc373c 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql @@ -8,7 +8,7 @@ select json_value(_airbyte_data, '$."date"') as `date`, - json_extract(_airbyte_data, + json_extract(table_alias._airbyte_data, '$."partition"') as `partition`, _airbyte_emitted_at diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index 38c2abe60d27..8d5e15e1cd45 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path(_airbyte_data, 'conflict_stream_name') + jsonb_extract_path(table_alias._airbyte_data, 'conflict_stream_name') as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_conflict_stream_name as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql index cd8b1c1e23f2..af9e0733f509 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -5,7 +5,7 @@ select _airbyte_conflict_stream_name_hashid, - jsonb_extract_path(conflict_stream_name, 'conflict_stream_name') + jsonb_extract_path(table_alias.conflict_stream_name, 'conflict_stream_name') as conflict_stream_name, _airbyte_emitted_at from "postgres".test_normalization."conflict_stream_name" as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql index 3a510f27d0f4..0cc444ec6bf5 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql @@ -6,7 +6,7 @@ select jsonb_extract_path_text(_airbyte_data, 'id') as "id", jsonb_extract_path_text(_airbyte_data, 'date') as "date", - jsonb_extract_path(_airbyte_data, 'partition') + jsonb_extract_path(table_alias._airbyte_data, 'partition') as "partition", _airbyte_emitted_at from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql index 6c0faeafeb2f..b0adb5716bfb 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -12,7 +12,7 @@ with __dbt__CTE__conflict_stream_name_ab1 as ( select case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_name', true) end + case when json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'conflict_stream_name', true) end as conflict_stream_name, _airbyte_emitted_at from "integrationtests".test_normalization._airbyte_raw_conflict_stream_name as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql index d3b4f7b9e3a3..42e977e0706c 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -12,7 +12,7 @@ with __dbt__CTE__conflict_stream_name_conflict_stream_name_ab1 as ( select _airbyte_conflict_stream_name_hashid, - case when json_extract_path_text(conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(conflict_stream_name, 'conflict_stream_name', true) end + case when json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) != '' then json_extract_path_text(table_alias.conflict_stream_name, 'conflict_stream_name', true) end as conflict_stream_name, _airbyte_emitted_at from "integrationtests".test_normalization."conflict_stream_name" as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql index 5532bef356ec..835027b60631 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -13,7 +13,7 @@ select case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(_airbyte_data, 'partition', true) != '' then json_extract_path_text(_airbyte_data, 'partition', true) end + case when json_extract_path_text(table_alias._airbyte_data, 'partition', true) != '' then json_extract_path_text(table_alias._airbyte_data, 'partition', true) end as "partition", _airbyte_emitted_at from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json index 7037973518ce..9e964f78fafa 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json @@ -330,4 +330,4 @@ "primary_key": [["id"]] } ] -} +} \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt index 8b860ab2e2a0..8a8b9659775d 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt @@ -38,5 +38,3 @@ {"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":1, "conflict_stream_array": {"conflict_stream_array": [{"id": 1}, {"id": 2}, {"id": 3}]}}, "emitted_at":1623861660}} {"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":2, "conflict_stream_array": {"conflict_stream_array": [{"id": 4}, {"id": 5}, {"id": 6}]}}, "emitted_at":1623861860}} - - diff --git a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py index f465c1e045fb..859c65758ebd 100644 --- a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py +++ b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py @@ -361,8 +361,8 @@ def extract_json_column( # we make their life easier by using a pre-populated and sanitized column name instead... normalized_json_path = [transform_json_naming(property_name)] table_alias = f"{table_alias}" - if "unnest_cte" in json_column_name and unnest_dest_alias: - table_alias = None + if "unnested_column_value" in json_column_name and unnest_dest_alias: + table_alias = '' json_extract = jinja_call(f"json_extract('{table_alias}', {json_column_name}, {json_path})") if "type" in definition: if is_array(definition["type"]): From 8c1a5ba5ebd94ec0c669b1c952d01a867e9d267f Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Thu, 19 Aug 2021 13:58:51 -0300 Subject: [PATCH 6/8] bump normalization version --- .../bases/base-normalization/Dockerfile | 2 +- .../conflict_stream_name_ab1.sql | 13 --- .../conflict_stream_name_ab2.sql | 17 ---- .../conflict_stream_name_ab3.sql | 18 ---- ...t_stream_name_conflict_stream_name_ab1.sql | 14 --- ...t_stream_name_conflict_stream_name_ab2.sql | 15 --- ...t_stream_name_conflict_stream_name_ab3.sql | 18 ---- ...t_stream_name_conflict_stream_name_ab1.sql | 14 --- ...t_stream_name_conflict_stream_name_ab2.sql | 15 --- ...t_stream_name_conflict_stream_name_ab3.sql | 18 ---- .../conflict_stream_scalar_ab1.sql | 13 --- .../conflict_stream_scalar_ab2.sql | 17 ---- .../conflict_stream_scalar_ab3.sql | 18 ---- .../dedup_cdc_excluded_ab1.sql | 16 --- .../dedup_cdc_excluded_ab2.sql | 26 ----- .../dedup_cdc_excluded_ab3.sql | 24 ----- .../dedup_cdc_excluded_ab4.sql | 15 --- .../dedup_exchange_rate_ab1.sql | 19 ---- .../dedup_exchange_rate_ab2.sql | 35 ------- .../dedup_exchange_rate_ab3.sql | 30 ------ .../dedup_exchange_rate_ab4.sql | 15 --- .../test_normalization/exchange_rate_ab1.sql | 19 ---- .../test_normalization/exchange_rate_ab2.sql | 35 ------- .../test_normalization/exchange_rate_ab3.sql | 30 ------ ..._columns_resulting_into_long_names_ab1.sql | 14 --- ..._columns_resulting_into_long_names_ab2.sql | 20 ---- ..._columns_resulting_into_long_names_ab3.sql | 20 ---- ..._columns_resulting_into_long_names_ab4.sql | 15 --- ...ing_into_long_names_partition_DATA_ab1.sql | 16 --- ...ing_into_long_names_partition_DATA_ab2.sql | 15 --- ...ing_into_long_names_partition_DATA_ab3.sql | 18 ---- ...esulting_into_long_names_partition_ab1.sql | 16 --- ...esulting_into_long_names_partition_ab2.sql | 15 --- ...esulting_into_long_names_partition_ab3.sql | 22 ----- ...es_partition_column___with__quotes_ab1.sql | 16 --- ...es_partition_column___with__quotes_ab2.sql | 15 --- ...es_partition_column___with__quotes_ab3.sql | 18 ---- ..._names_partition_double_array_data_ab1.sql | 16 --- ..._names_partition_double_array_data_ab2.sql | 15 --- ..._names_partition_double_array_data_ab3.sql | 18 ---- ...amespace_resulting_into_long_names_ab1.sql | 13 --- ...amespace_resulting_into_long_names_ab2.sql | 17 ---- ...amespace_resulting_into_long_names_ab3.sql | 18 ---- ...amespace_resulting_into_long_names_ab1.sql | 13 --- ...amespace_resulting_into_long_names_ab2.sql | 17 ---- ...amespace_resulting_into_long_names_ab3.sql | 18 ---- .../conflict_stream_array.sql | 18 ---- .../conflict_stream_name.sql | 18 ---- ...flict_stream_name_conflict_stream_name.sql | 18 ---- ...flict_stream_name_conflict_stream_name.sql | 18 ---- .../conflict_stream_scalar.sql | 18 ---- .../test_normalization/dedup_cdc_excluded.sql | 22 ----- .../dedup_cdc_excluded_scd.sql | 31 ------ .../dedup_exchange_rate.sql | 25 ----- .../dedup_exchange_rate_scd.sql | 38 ------- .../test_normalization/exchange_rate.sql | 24 ----- ...plex_columns_resulting_into_long_names.sql | 20 ---- ...ns_resulting_into_long_names_partition.sql | 20 ---- ...sulting_into_long_names_partition_DATA.sql | 18 ---- ..._names_partition_column___with__quotes.sql | 18 ---- ...long_names_partition_double_array_data.sql | 18 ---- ..._columns_resulting_into_long_names_scd.sql | 29 ------ ...ut_namespace_resulting_into_long_names.sql | 18 ---- ...th_namespace_resulting_into_long_names.sql | 18 ---- .../conflict_stream_name_ab1.sql | 9 -- .../conflict_stream_name_ab2.sql | 9 -- .../conflict_stream_name_ab3.sql | 11 --- ...t_stream_name_conflict_stream_name_ab1.sql | 10 -- ...t_stream_name_conflict_stream_name_ab2.sql | 9 -- ...t_stream_name_conflict_stream_name_ab3.sql | 11 --- ...t_stream_name_conflict_stream_name_ab1.sql | 10 -- ...t_stream_name_conflict_stream_name_ab2.sql | 9 -- ...t_stream_name_conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_scalar_ab1.sql | 9 -- .../conflict_stream_scalar_ab2.sql | 9 -- .../conflict_stream_scalar_ab3.sql | 11 --- .../dedup_cdc_excluded_ab1.sql | 12 --- .../dedup_cdc_excluded_ab2.sql | 12 --- .../dedup_cdc_excluded_ab3.sql | 14 --- .../dedup_cdc_excluded_ab4.sql | 11 --- .../dedup_exchange_rate_ab1.sql | 15 --- .../dedup_exchange_rate_ab2.sql | 15 --- .../dedup_exchange_rate_ab3.sql | 17 ---- .../dedup_exchange_rate_ab4.sql | 11 --- .../test_normalization/exchange_rate_ab1.sql | 15 --- .../test_normalization/exchange_rate_ab2.sql | 15 --- .../test_normalization/exchange_rate_ab3.sql | 17 ---- ..._columns_resulting_into_long_names_ab1.sql | 10 -- ..._columns_resulting_into_long_names_ab2.sql | 10 -- ..._columns_resulting_into_long_names_ab3.sql | 12 --- ..._columns_resulting_into_long_names_ab4.sql | 11 --- ...ing_into_long_names_partition_DATA_ab1.sql | 12 --- ...ing_into_long_names_partition_DATA_ab2.sql | 9 -- ...ing_into_long_names_partition_DATA_ab3.sql | 11 --- ...esulting_into_long_names_partition_ab1.sql | 12 --- ...esulting_into_long_names_partition_ab2.sql | 11 --- ...esulting_into_long_names_partition_ab3.sql | 13 --- ...es_partition_column___with__quotes_ab1.sql | 12 --- ...es_partition_column___with__quotes_ab2.sql | 9 -- ...es_partition_column___with__quotes_ab3.sql | 11 --- ..._names_partition_double_array_data_ab1.sql | 12 --- ..._names_partition_double_array_data_ab2.sql | 9 -- ..._names_partition_double_array_data_ab3.sql | 11 --- ...amespace_resulting_into_long_names_ab1.sql | 9 -- ...amespace_resulting_into_long_names_ab2.sql | 9 -- ...amespace_resulting_into_long_names_ab3.sql | 11 --- ...amespace_resulting_into_long_names_ab1.sql | 9 -- ...amespace_resulting_into_long_names_ab2.sql | 9 -- ...amespace_resulting_into_long_names_ab3.sql | 11 --- .../conflict_stream_array.sql | 10 -- .../conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- .../conflict_stream_scalar.sql | 10 -- .../test_normalization/dedup_cdc_excluded.sql | 14 --- .../dedup_cdc_excluded_scd.sql | 23 ----- .../dedup_exchange_rate.sql | 17 ---- .../dedup_exchange_rate_scd.sql | 26 ----- .../test_normalization/exchange_rate.sql | 16 --- ...plex_columns_resulting_into_long_names.sql | 12 --- ...ns_resulting_into_long_names_partition.sql | 12 --- ...sulting_into_long_names_partition_DATA.sql | 10 -- ..._names_partition_column___with__quotes.sql | 10 -- ...long_names_partition_double_array_data.sql | 10 -- ..._columns_resulting_into_long_names_scd.sql | 21 ---- ...ut_namespace_resulting_into_long_names.sql | 10 -- ...th_namespace_resulting_into_long_names.sql | 10 -- .../models/generated/sources.yml | 23 ----- .../conflict_stream_array_ab3.sql | 10 -- ...ct_stream_name__2flict_stream_name_ab2.sql | 11 --- ...ct_stream_name__2flict_stream_name_ab3.sql | 10 -- ...ct_stream_name__3flict_stream_name_ab1.sql | 13 --- ...ct_stream_name__3flict_stream_name_ab2.sql | 11 --- ...ct_stream_name__3flict_stream_name_ab3.sql | 10 -- .../conflict_stream_name_ab2.sql | 11 --- .../conflict_stream_name_ab3.sql | 10 -- .../conflict_stream_scalar_ab1.sql | 13 --- .../conflict_stream_scalar_ab2.sql | 13 --- .../conflict_stream_scalar_ab3.sql | 10 -- .../dedup_cdc_excluded_ab1.sql | 19 ---- .../dedup_cdc_excluded_ab2.sql | 22 ----- .../dedup_cdc_excluded_ab3.sql | 10 -- .../dedup_cdc_excluded_ab4.sql | 13 --- .../dedup_exchange_rate_ab1.sql | 25 ----- .../dedup_exchange_rate_ab2.sql | 27 ----- .../dedup_exchange_rate_ab3.sql | 10 -- .../dedup_exchange_rate_ab4.sql | 13 --- .../test_normalization/exchange_rate_ab1.sql | 25 ----- .../test_normalization/exchange_rate_ab2.sql | 27 ----- .../test_normalization/exchange_rate_ab3.sql | 10 -- ..._stream_with_co_1g_into_long_names_ab2.sql | 12 --- ..._stream_with_co_1g_into_long_names_ab3.sql | 10 -- ..._stream_with_co_1g_into_long_names_ab4.sql | 13 --- ..._stream_with_co_2g_names_partition_ab1.sql | 17 ---- ..._stream_with_co_2g_names_partition_ab2.sql | 13 --- ..._stream_with_co_2g_names_partition_ab3.sql | 10 -- ..._stream_with_co_3double_array_data_ab1.sql | 59 ----------- ..._stream_with_co_3double_array_data_ab2.sql | 11 --- ..._stream_with_co_3double_array_data_ab3.sql | 10 -- ..._stream_with_co_3es_partition_data_ab1.sql | 59 ----------- ..._stream_with_co_3es_partition_data_ab2.sql | 11 --- ..._stream_with_co_3es_partition_data_ab3.sql | 10 -- ..._stream_with_co_3mn___with__quotes_ab1.sql | 59 ----------- ..._stream_with_co_3mn___with__quotes_ab2.sql | 11 --- ..._stream_with_co_3mn___with__quotes_ab3.sql | 10 -- ...sted_stream_wit_1g_into_long_names_ab1.sql | 13 --- ...sted_stream_wit_1g_into_long_names_ab2.sql | 11 --- ...sted_stream_wit_1g_into_long_names_ab3.sql | 10 -- ..._stream_with_na_1g_into_long_names_ab1.sql | 13 --- ..._stream_with_na_1g_into_long_names_ab2.sql | 11 --- ..._stream_with_na_1g_into_long_names_ab3.sql | 10 -- .../conflict_stream_array.sql | 15 --- .../conflict_stream_name.sql | 15 --- ...ct_stream_name____conflict_stream_name.sql | 15 --- ...flict_stream_name_conflict_stream_name.sql | 15 --- .../conflict_stream_scalar.sql | 15 --- .../test_normalization/dedup_cdc_excluded.sql | 19 ---- .../dedup_cdc_excluded_scd.sql | 28 ------ .../dedup_exchange_rate.sql | 22 ----- .../dedup_exchange_rate_scd.sql | 31 ------ .../test_normalization/exchange_rate.sql | 21 ---- ..._stream_with_co_1g_into_long_names_scd.sql | 26 ----- ..._stream_with_co___long_names_partition.sql | 17 ---- ..._stream_with_co___names_partition_data.sql | 15 --- ..._stream_with_co__column___with__quotes.sql | 15 --- ..._stream_with_co__ion_double_array_data.sql | 15 --- ..._stream_with_co__lting_into_long_names.sql | 17 ---- ...sted_stream_wit__lting_into_long_names.sql | 15 --- ..._stream_with_na__lting_into_long_names.sql | 15 --- ...ct_stream_name__2flict_stream_name_ab1.sql | 10 -- ...ct_stream_name__2flict_stream_name_ab2.sql | 9 -- ...ct_stream_name__2flict_stream_name_ab3.sql | 11 --- ...ct_stream_name__3flict_stream_name_ab1.sql | 10 -- ...ct_stream_name__3flict_stream_name_ab2.sql | 9 -- ...ct_stream_name__3flict_stream_name_ab3.sql | 11 --- .../conflict_stream_name_ab1.sql | 9 -- .../conflict_stream_name_ab2.sql | 9 -- .../conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_scalar_ab1.sql | 9 -- .../conflict_stream_scalar_ab2.sql | 9 -- .../conflict_stream_scalar_ab3.sql | 11 --- .../dedup_cdc_excluded_ab1.sql | 12 --- .../dedup_cdc_excluded_ab2.sql | 12 --- .../dedup_cdc_excluded_ab3.sql | 14 --- .../dedup_cdc_excluded_ab4.sql | 11 --- .../dedup_exchange_rate_ab1.sql | 15 --- .../dedup_exchange_rate_ab2.sql | 15 --- .../dedup_exchange_rate_ab3.sql | 17 ---- .../dedup_exchange_rate_ab4.sql | 11 --- .../test_normalization/exchange_rate_ab1.sql | 15 --- .../test_normalization/exchange_rate_ab2.sql | 15 --- .../test_normalization/exchange_rate_ab3.sql | 17 ---- ..._stream_with_co_1g_into_long_names_ab1.sql | 10 -- ..._stream_with_co_1g_into_long_names_ab2.sql | 10 -- ..._stream_with_co_1g_into_long_names_ab3.sql | 12 --- ..._stream_with_co_1g_into_long_names_ab4.sql | 11 --- ..._stream_with_co_2g_names_partition_ab1.sql | 12 --- ..._stream_with_co_2g_names_partition_ab2.sql | 11 --- ..._stream_with_co_2g_names_partition_ab3.sql | 13 --- ..._stream_with_co_3double_array_data_ab1.sql | 12 --- ..._stream_with_co_3double_array_data_ab2.sql | 9 -- ..._stream_with_co_3double_array_data_ab3.sql | 11 --- ..._stream_with_co_3es_partition_data_ab1.sql | 12 --- ..._stream_with_co_3es_partition_data_ab2.sql | 9 -- ..._stream_with_co_3es_partition_data_ab3.sql | 11 --- ..._stream_with_co_3mn___with__quotes_ab1.sql | 12 --- ..._stream_with_co_3mn___with__quotes_ab2.sql | 9 -- ..._stream_with_co_3mn___with__quotes_ab3.sql | 11 --- ...sted_stream_wit_1g_into_long_names_ab1.sql | 9 -- ...sted_stream_wit_1g_into_long_names_ab2.sql | 9 -- ...sted_stream_wit_1g_into_long_names_ab3.sql | 11 --- ..._stream_with_na_1g_into_long_names_ab1.sql | 9 -- ..._stream_with_na_1g_into_long_names_ab2.sql | 9 -- ..._stream_with_na_1g_into_long_names_ab3.sql | 11 --- .../conflict_stream_array.sql | 10 -- .../conflict_stream_name.sql | 10 -- ...ct_stream_name____conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- .../conflict_stream_scalar.sql | 10 -- .../test_normalization/dedup_cdc_excluded.sql | 14 --- .../dedup_cdc_excluded_scd.sql | 23 ----- .../dedup_exchange_rate.sql | 17 ---- .../dedup_exchange_rate_scd.sql | 26 ----- .../test_normalization/exchange_rate.sql | 16 --- ..._stream_with_co_1g_into_long_names_scd.sql | 21 ---- ..._stream_with_co___long_names_partition.sql | 12 --- ..._stream_with_co___names_partition_data.sql | 10 -- ..._stream_with_co__column___with__quotes.sql | 10 -- ..._stream_with_co__ion_double_array_data.sql | 10 -- ..._stream_with_co__lting_into_long_names.sql | 12 --- ...sted_stream_wit__lting_into_long_names.sql | 10 -- ..._stream_with_na__lting_into_long_names.sql | 10 -- .../models/generated/sources.yml | 23 ----- .../conflict_stream_array_ab3.sql | 20 ---- ...stream_name___conflict_stream_name_ab1.sql | 12 --- ...stream_name___conflict_stream_name_ab2.sql | 13 --- ...stream_name___conflict_stream_name_ab3.sql | 20 ---- .../conflict_stream_name_ab2.sql | 15 --- .../conflict_stream_name_ab3.sql | 20 ---- ...t_stream_name_conflict_stream_name_ab2.sql | 13 --- ...t_stream_name_conflict_stream_name_ab3.sql | 20 ---- .../conflict_stream_scalar_ab1.sql | 11 --- .../conflict_stream_scalar_ab2.sql | 15 --- .../conflict_stream_scalar_ab3.sql | 20 ---- .../dedup_cdc_excluded_ab1.sql | 14 --- .../dedup_cdc_excluded_ab2.sql | 24 ----- .../dedup_cdc_excluded_ab3.sql | 26 ----- .../dedup_cdc_excluded_ab4.sql | 13 --- .../dedup_exchange_rate_ab1.sql | 17 ---- .../dedup_exchange_rate_ab2.sql | 33 ------- .../dedup_exchange_rate_ab3.sql | 32 ------ .../dedup_exchange_rate_ab4.sql | 13 --- .../test_normalization/exchange_rate_ab1.sql | 17 ---- .../test_normalization/exchange_rate_ab2.sql | 33 ------- .../test_normalization/exchange_rate_ab3.sql | 32 ------ ...ream_with_c___long_names_partition_ab1.sql | 14 --- ...ream_with_c___long_names_partition_ab2.sql | 13 --- ...ream_with_c___long_names_partition_ab3.sql | 24 ----- ...ream_with_c___names_partition_data_ab1.sql | 18 ---- ...ream_with_c___names_partition_data_ab2.sql | 13 --- ...ream_with_c___names_partition_data_ab3.sql | 20 ---- ...ream_with_c__column___with__quotes_ab1.sql | 18 ---- ...ream_with_c__column___with__quotes_ab2.sql | 13 --- ...ream_with_c__column___with__quotes_ab3.sql | 20 ---- ...ream_with_c__ion_double_array_data_ab1.sql | 18 ---- ...ream_with_c__ion_double_array_data_ab2.sql | 13 --- ...ream_with_c__ion_double_array_data_ab3.sql | 20 ---- ...ream_with_c__lting_into_long_names_ab2.sql | 18 ---- ...ream_with_c__lting_into_long_names_ab3.sql | 22 ----- ...ream_with_c__lting_into_long_names_ab4.sql | 13 --- ...d_stream_wi__lting_into_long_names_ab1.sql | 11 --- ...d_stream_wi__lting_into_long_names_ab2.sql | 15 --- ...d_stream_wi__lting_into_long_names_ab3.sql | 20 ---- ...ream_with_n__lting_into_long_names_ab1.sql | 11 --- ...ream_with_n__lting_into_long_names_ab2.sql | 15 --- ...ream_with_n__lting_into_long_names_ab3.sql | 20 ---- .../conflict_stream_array.sql | 14 --- .../conflict_stream_name.sql | 14 --- ...ict_stream_name___conflict_stream_name.sql | 14 --- ...flict_stream_name_conflict_stream_name.sql | 14 --- .../conflict_stream_scalar.sql | 14 --- .../test_normalization/dedup_cdc_excluded.sql | 18 ---- .../dedup_cdc_excluded_scd.sql | 27 ----- .../dedup_exchange_rate.sql | 21 ---- .../dedup_exchange_rate_scd.sql | 34 ------- .../test_normalization/exchange_rate.sql | 20 ---- ...d_stream_with_c___long_names_partition.sql | 16 --- ...d_stream_with_c___names_partition_data.sql | 14 --- ...d_stream_with_c__column___with__quotes.sql | 14 --- ...d_stream_with_c__ion_double_array_data.sql | 14 --- ...d_stream_with_c__lting_into_long_names.sql | 16 --- ...ream_with_c__lting_into_long_names_scd.sql | 25 ----- ...ested_stream_wi__lting_into_long_names.sql | 14 --- ...e_stream_with_n__lting_into_long_names.sql | 14 --- ...stream_name___conflict_stream_name_ab1.sql | 10 -- ...stream_name___conflict_stream_name_ab2.sql | 9 -- ...stream_name___conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_name_ab1.sql | 9 -- .../conflict_stream_name_ab2.sql | 9 -- .../conflict_stream_name_ab3.sql | 11 --- ...t_stream_name_conflict_stream_name_ab1.sql | 10 -- ...t_stream_name_conflict_stream_name_ab2.sql | 9 -- ...t_stream_name_conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_scalar_ab1.sql | 9 -- .../conflict_stream_scalar_ab2.sql | 9 -- .../conflict_stream_scalar_ab3.sql | 11 --- .../dedup_cdc_excluded_ab1.sql | 12 --- .../dedup_cdc_excluded_ab2.sql | 12 --- .../dedup_cdc_excluded_ab3.sql | 14 --- .../dedup_cdc_excluded_ab4.sql | 11 --- .../dedup_exchange_rate_ab1.sql | 15 --- .../dedup_exchange_rate_ab2.sql | 15 --- .../dedup_exchange_rate_ab3.sql | 17 ---- .../dedup_exchange_rate_ab4.sql | 11 --- .../test_normalization/exchange_rate_ab1.sql | 15 --- .../test_normalization/exchange_rate_ab2.sql | 15 --- .../test_normalization/exchange_rate_ab3.sql | 17 ---- ...ream_with_c___long_names_partition_ab1.sql | 12 --- ...ream_with_c___long_names_partition_ab2.sql | 11 --- ...ream_with_c___long_names_partition_ab3.sql | 13 --- ...ream_with_c___names_partition_data_ab1.sql | 12 --- ...ream_with_c___names_partition_data_ab2.sql | 9 -- ...ream_with_c___names_partition_data_ab3.sql | 11 --- ...ream_with_c__column___with__quotes_ab1.sql | 12 --- ...ream_with_c__column___with__quotes_ab2.sql | 9 -- ...ream_with_c__column___with__quotes_ab3.sql | 11 --- ...ream_with_c__ion_double_array_data_ab1.sql | 12 --- ...ream_with_c__ion_double_array_data_ab2.sql | 9 -- ...ream_with_c__ion_double_array_data_ab3.sql | 11 --- ...ream_with_c__lting_into_long_names_ab1.sql | 10 -- ...ream_with_c__lting_into_long_names_ab2.sql | 10 -- ...ream_with_c__lting_into_long_names_ab3.sql | 12 --- ...ream_with_c__lting_into_long_names_ab4.sql | 11 --- ...d_stream_wi__lting_into_long_names_ab1.sql | 9 -- ...d_stream_wi__lting_into_long_names_ab2.sql | 9 -- ...d_stream_wi__lting_into_long_names_ab3.sql | 11 --- ...ream_with_n__lting_into_long_names_ab1.sql | 9 -- ...ream_with_n__lting_into_long_names_ab2.sql | 9 -- ...ream_with_n__lting_into_long_names_ab3.sql | 11 --- .../conflict_stream_array.sql | 10 -- .../conflict_stream_name.sql | 10 -- ...ict_stream_name___conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- .../conflict_stream_scalar.sql | 10 -- .../test_normalization/dedup_cdc_excluded.sql | 14 --- .../dedup_cdc_excluded_scd.sql | 23 ----- .../dedup_exchange_rate.sql | 17 ---- .../dedup_exchange_rate_scd.sql | 26 ----- .../test_normalization/exchange_rate.sql | 16 --- ...d_stream_with_c___long_names_partition.sql | 12 --- ...d_stream_with_c___names_partition_data.sql | 10 -- ...d_stream_with_c__column___with__quotes.sql | 10 -- ...d_stream_with_c__ion_double_array_data.sql | 10 -- ...d_stream_with_c__lting_into_long_names.sql | 12 --- ...ream_with_c__lting_into_long_names_scd.sql | 21 ---- ...ested_stream_wi__lting_into_long_names.sql | 10 -- ...e_stream_with_n__lting_into_long_names.sql | 10 -- .../models/generated/sources.yml | 23 ----- ...flict_stream_name_conflict_stream_name.sql | 48 --------- .../conflict_stream_scalar.sql | 49 ---------- .../test_normalization/dedup_cdc_excluded.sql | 21 ---- .../dedup_cdc_excluded_scd.sql | 85 ---------------- .../dedup_exchange_rate.sql | 24 ----- .../dedup_exchange_rate_scd.sql | 98 ------------------- .../test_normalization/exchange_rate.sql | 77 --------------- ...plex_columns_resulting_into_long_names.sql | 19 ---- ...ns_resulting_into_long_names_partition.sql | 54 ---------- ..._names_partition_column___with__quotes.sql | 93 ------------------ ...sulting_into_long_names_partition_data.sql | 93 ------------------ ...long_names_partition_double_array_data.sql | 93 ------------------ ...ut_namespace_resulting_into_long_names.sql | 47 --------- ...th_namespace_resulting_into_long_names.sql | 47 --------- .../conflict_stream_name_ab1.sql | 9 -- .../conflict_stream_name_ab2.sql | 9 -- .../conflict_stream_name_ab3.sql | 11 --- ...t_stream_name_conflict_stream_name_ab1.sql | 10 -- ...t_stream_name_conflict_stream_name_ab2.sql | 9 -- ...t_stream_name_conflict_stream_name_ab3.sql | 11 --- ...t_stream_name_conflict_stream_name_ab1.sql | 10 -- ...t_stream_name_conflict_stream_name_ab2.sql | 9 -- ...t_stream_name_conflict_stream_name_ab3.sql | 11 --- .../conflict_stream_scalar_ab1.sql | 9 -- .../conflict_stream_scalar_ab2.sql | 9 -- .../conflict_stream_scalar_ab3.sql | 11 --- .../dedup_cdc_excluded_ab1.sql | 12 --- .../dedup_cdc_excluded_ab2.sql | 12 --- .../dedup_cdc_excluded_ab3.sql | 14 --- .../dedup_cdc_excluded_ab4.sql | 11 --- .../dedup_exchange_rate_ab1.sql | 15 --- .../dedup_exchange_rate_ab2.sql | 15 --- .../dedup_exchange_rate_ab3.sql | 17 ---- .../dedup_exchange_rate_ab4.sql | 11 --- .../test_normalization/exchange_rate_ab1.sql | 15 --- .../test_normalization/exchange_rate_ab2.sql | 15 --- .../test_normalization/exchange_rate_ab3.sql | 17 ---- ..._columns_resulting_into_long_names_ab1.sql | 10 -- ..._columns_resulting_into_long_names_ab2.sql | 10 -- ..._columns_resulting_into_long_names_ab3.sql | 12 --- ..._columns_resulting_into_long_names_ab4.sql | 11 --- ...esulting_into_long_names_partition_ab1.sql | 12 --- ...esulting_into_long_names_partition_ab2.sql | 11 --- ...esulting_into_long_names_partition_ab3.sql | 13 --- ...es_partition_column___with__quotes_ab1.sql | 12 --- ...es_partition_column___with__quotes_ab2.sql | 9 -- ...es_partition_column___with__quotes_ab3.sql | 11 --- ...ing_into_long_names_partition_data_ab1.sql | 12 --- ...ing_into_long_names_partition_data_ab2.sql | 9 -- ...ing_into_long_names_partition_data_ab3.sql | 11 --- ..._names_partition_double_array_data_ab1.sql | 12 --- ..._names_partition_double_array_data_ab2.sql | 9 -- ..._names_partition_double_array_data_ab3.sql | 11 --- ...amespace_resulting_into_long_names_ab1.sql | 9 -- ...amespace_resulting_into_long_names_ab2.sql | 9 -- ...amespace_resulting_into_long_names_ab3.sql | 11 --- ...amespace_resulting_into_long_names_ab1.sql | 9 -- ...amespace_resulting_into_long_names_ab2.sql | 9 -- ...amespace_resulting_into_long_names_ab3.sql | 11 --- .../conflict_stream_array.sql | 10 -- .../conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- ...flict_stream_name_conflict_stream_name.sql | 10 -- .../conflict_stream_scalar.sql | 10 -- .../test_normalization/dedup_cdc_excluded.sql | 14 --- .../dedup_cdc_excluded_scd.sql | 23 ----- .../dedup_exchange_rate.sql | 17 ---- .../dedup_exchange_rate_scd.sql | 26 ----- .../test_normalization/exchange_rate.sql | 16 --- ...plex_columns_resulting_into_long_names.sql | 12 --- ...ns_resulting_into_long_names_partition.sql | 12 --- ..._names_partition_column___with__quotes.sql | 10 -- ...sulting_into_long_names_partition_data.sql | 10 -- ...long_names_partition_double_array_data.sql | 10 -- ..._columns_resulting_into_long_names_scd.sql | 21 ---- ...ut_namespace_resulting_into_long_names.sql | 10 -- ...th_namespace_resulting_into_long_names.sql | 10 -- .../models/generated/sources.yml | 23 ----- .../CONFLICT_STREAM_ARRAY_AB3.sql | 20 ---- .../CONFLICT_STREAM_NAME_AB1.sql | 11 --- .../CONFLICT_STREAM_NAME_AB2.sql | 15 --- .../CONFLICT_STREAM_NAME_AB3.sql | 20 ---- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 12 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 13 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 20 ---- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 12 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 13 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 20 ---- .../CONFLICT_STREAM_SCALAR_AB1.sql | 11 --- .../CONFLICT_STREAM_SCALAR_AB2.sql | 15 --- .../CONFLICT_STREAM_SCALAR_AB3.sql | 20 ---- .../DEDUP_CDC_EXCLUDED_AB1.sql | 14 --- .../DEDUP_CDC_EXCLUDED_AB2.sql | 24 ----- .../DEDUP_CDC_EXCLUDED_AB3.sql | 26 ----- .../DEDUP_CDC_EXCLUDED_AB4.sql | 13 --- .../DEDUP_EXCHANGE_RATE_AB1.sql | 17 ---- .../DEDUP_EXCHANGE_RATE_AB2.sql | 33 ------- .../DEDUP_EXCHANGE_RATE_AB3.sql | 32 ------ .../DEDUP_EXCHANGE_RATE_AB4.sql | 13 --- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql | 17 ---- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql | 33 ------- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql | 32 ------ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql | 12 --- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql | 18 ---- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql | 22 ----- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql | 13 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql | 14 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql | 13 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql | 24 ----- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql | 14 --- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql | 13 --- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql | 20 ---- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql | 14 --- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql | 13 --- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql | 20 ---- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql | 14 --- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql | 13 --- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql | 20 ---- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 11 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 15 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 20 ---- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 11 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 15 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 20 ---- .../CONFLICT_STREAM_ARRAY.sql | 14 --- .../CONFLICT_STREAM_NAME.sql | 14 --- ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 14 --- ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 14 --- .../CONFLICT_STREAM_SCALAR.sql | 14 --- .../TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql | 18 ---- .../DEDUP_CDC_EXCLUDED_SCD.sql | 27 ----- .../DEDUP_EXCHANGE_RATE.sql | 21 ---- .../DEDUP_EXCHANGE_RATE_SCD.sql | 34 ------- .../TEST_NORMALIZATION/EXCHANGE_RATE.sql | 20 ---- ...PLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql | 16 --- ...NS_RESULTING_INTO_LONG_NAMES_PARTITION.sql | 16 --- ..._NAMES_PARTITION_COLUMN___WITH__QUOTES.sql | 14 --- ...SULTING_INTO_LONG_NAMES_PARTITION_DATA.sql | 14 --- ...LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql | 14 --- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql | 25 ----- ...UT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 14 --- ...TH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 14 --- .../CONFLICT_STREAM_NAME_AB1.sql | 9 -- .../CONFLICT_STREAM_NAME_AB2.sql | 9 -- .../CONFLICT_STREAM_NAME_AB3.sql | 11 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 10 -- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 9 -- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 11 --- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 10 -- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 9 -- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 11 --- .../CONFLICT_STREAM_SCALAR_AB1.sql | 9 -- .../CONFLICT_STREAM_SCALAR_AB2.sql | 9 -- .../CONFLICT_STREAM_SCALAR_AB3.sql | 11 --- .../DEDUP_CDC_EXCLUDED_AB1.sql | 12 --- .../DEDUP_CDC_EXCLUDED_AB2.sql | 12 --- .../DEDUP_CDC_EXCLUDED_AB3.sql | 14 --- .../DEDUP_CDC_EXCLUDED_AB4.sql | 11 --- .../DEDUP_EXCHANGE_RATE_AB1.sql | 15 --- .../DEDUP_EXCHANGE_RATE_AB2.sql | 15 --- .../DEDUP_EXCHANGE_RATE_AB3.sql | 17 ---- .../DEDUP_EXCHANGE_RATE_AB4.sql | 11 --- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql | 15 --- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql | 15 --- .../TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql | 17 ---- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql | 10 -- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql | 10 -- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql | 12 --- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql | 11 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql | 12 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql | 11 --- ...ESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql | 13 --- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql | 12 --- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql | 9 -- ...ES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql | 11 --- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql | 12 --- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql | 9 -- ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql | 11 --- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql | 12 --- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql | 9 -- ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql | 11 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 9 -- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 9 -- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 11 --- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 9 -- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 9 -- ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 11 --- .../CONFLICT_STREAM_ARRAY.sql | 10 -- .../CONFLICT_STREAM_NAME.sql | 10 -- ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 10 -- ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 10 -- .../CONFLICT_STREAM_SCALAR.sql | 10 -- .../TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql | 14 --- .../DEDUP_CDC_EXCLUDED_SCD.sql | 23 ----- .../DEDUP_EXCHANGE_RATE.sql | 17 ---- .../DEDUP_EXCHANGE_RATE_SCD.sql | 26 ----- .../TEST_NORMALIZATION/EXCHANGE_RATE.sql | 16 --- ...PLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql | 12 --- ...NS_RESULTING_INTO_LONG_NAMES_PARTITION.sql | 12 --- ..._NAMES_PARTITION_COLUMN___WITH__QUOTES.sql | 10 -- ...SULTING_INTO_LONG_NAMES_PARTITION_DATA.sql | 10 -- ...LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql | 10 -- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql | 21 ---- ...UT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 10 -- ...TH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 10 -- .../models/generated/sources.yml | 23 ----- .../DefaultNormalizationRunner.java | 2 +- 585 files changed, 2 insertions(+), 9161 deletions(-) delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql delete mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml diff --git a/airbyte-integrations/bases/base-normalization/Dockerfile b/airbyte-integrations/bases/base-normalization/Dockerfile index d9a7aab26620..e75907a098c4 100644 --- a/airbyte-integrations/bases/base-normalization/Dockerfile +++ b/airbyte-integrations/bases/base-normalization/Dockerfile @@ -24,5 +24,5 @@ WORKDIR /airbyte ENV AIRBYTE_ENTRYPOINT "/airbyte/entrypoint.sh" ENTRYPOINT ["/airbyte/entrypoint.sh"] -LABEL io.airbyte.version=0.1.41 +LABEL io.airbyte.version=0.1.42 LABEL io.airbyte.name=airbyte/normalization diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql deleted file mode 100644 index d5c87b768333..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract(table_alias._airbyte_data, "$['conflict_stream_name']") as conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_name as table_alias --- conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index 0e880d8d1132..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - string -) as id, - cast(conflict_stream_name as - string -) as conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab1` --- conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 7861911c1e51..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(conflict_stream_name as - string -), '')) as - string -))) as _airbyte_conflict_stream_name_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab2` --- conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index 6bc79f20076c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - json_extract(table_alias.conflict_stream_name, "$['conflict_stream_name']") as conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`conflict_stream_name` as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 17e8df654774..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as - string -) as conflict_stream_name, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab1` --- conflict_stream_name at conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index c381c247f1f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_hashid as - string -), ''), '-', coalesce(cast(conflict_stream_name as - string -), '')) as - string -))) as _airbyte_conflict_stream_name_2_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab2` --- conflict_stream_name at conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index 43ebdecf36c4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - json_extract_scalar(conflict_stream_name, "$['groups']") as `groups`, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index b1674b6fb1cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(`groups` as - string -) as `groups`, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index 74aff2b2d922..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_2_hashid as - string -), ''), '-', coalesce(cast(`groups` as - string -), '')) as - string -))) as _airbyte_conflict_stream_name_3_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index bd1d66a5840f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['conflict_stream_scalar']") as conflict_stream_scalar, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_scalar as table_alias --- conflict_stream_scalar; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index 2a3441329550..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - string -) as id, - cast(conflict_stream_scalar as - int64 -) as conflict_stream_scalar, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab1` --- conflict_stream_scalar; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index 4423fb726b78..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(conflict_stream_scalar as - string -), '')) as - string -))) as _airbyte_conflict_stream_scalar_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab2` --- conflict_stream_scalar; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index 81d31a55de73..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['name']") as name, - json_extract_scalar(_airbyte_data, "$['_ab_cdc_lsn']") as _ab_cdc_lsn, - json_extract_scalar(_airbyte_data, "$['_ab_cdc_updated_at']") as _ab_cdc_updated_at, - json_extract_scalar(_airbyte_data, "$['_ab_cdc_deleted_at']") as _ab_cdc_deleted_at, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias --- dedup_cdc_excluded; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index cc52d282b18c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,26 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - int64 -) as id, - cast(name as - string -) as name, - cast(_ab_cdc_lsn as - float64 -) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as - float64 -) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as - float64 -) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab1` --- dedup_cdc_excluded; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 597f858f6ae2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,24 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(name as - string -), ''), '-', coalesce(cast(_ab_cdc_lsn as - string -), ''), '-', coalesce(cast(_ab_cdc_updated_at as - string -), ''), '-', coalesce(cast(_ab_cdc_deleted_at as - string -), '')) as - string -))) as _airbyte_dedup_cdc_excluded_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab2` --- dedup_cdc_excluded; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index b6dcffec9d42..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab4` - OPTIONS() - as --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab3` --- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index 75554c2c95f6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['currency']") as currency, - json_extract_scalar(_airbyte_data, "$['date']") as date, - json_extract_scalar(_airbyte_data, "$['timestamp_col']") as timestamp_col, - json_extract_scalar(_airbyte_data, "$['HKD@spéçiäl & characters']") as HKD_special___characters, - json_extract_scalar(_airbyte_data, "$['HKD_special___characters']") as HKD_special___characters_1, - json_extract_scalar(_airbyte_data, "$['NZD']") as NZD, - json_extract_scalar(_airbyte_data, "$['USD']") as USD, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate as table_alias --- dedup_exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index e23544e7ec74..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,35 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - int64 -) as id, - cast(currency as - string -) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp -) as timestamp_col, - cast(HKD_special___characters as - float64 -) as HKD_special___characters, - cast(HKD_special___characters_1 as - string -) as HKD_special___characters_1, - cast(NZD as - float64 -) as NZD, - cast(USD as - float64 -) as USD, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab1` --- dedup_exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index 3e66e916af46..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,30 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(currency as - string -), ''), '-', coalesce(cast(date as - string -), ''), '-', coalesce(cast(timestamp_col as - string -), ''), '-', coalesce(cast(HKD_special___characters as - string -), ''), '-', coalesce(cast(HKD_special___characters_1 as - string -), ''), '-', coalesce(cast(NZD as - string -), ''), '-', coalesce(cast(USD as - string -), '')) as - string -))) as _airbyte_dedup_exchange_rate_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab2` --- dedup_exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index 5f1888a5871a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab4` - OPTIONS() - as --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab3` --- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index a7ed234497d7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['currency']") as currency, - json_extract_scalar(_airbyte_data, "$['date']") as date, - json_extract_scalar(_airbyte_data, "$['timestamp_col']") as timestamp_col, - json_extract_scalar(_airbyte_data, "$['HKD@spéçiäl & characters']") as HKD_special___characters, - json_extract_scalar(_airbyte_data, "$['HKD_special___characters']") as HKD_special___characters_1, - json_extract_scalar(_airbyte_data, "$['NZD']") as NZD, - json_extract_scalar(_airbyte_data, "$['USD']") as USD, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_exchange_rate as table_alias --- exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index 4fa388e61017..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,35 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - int64 -) as id, - cast(currency as - string -) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp -) as timestamp_col, - cast(HKD_special___characters as - float64 -) as HKD_special___characters, - cast(HKD_special___characters_1 as - string -) as HKD_special___characters_1, - cast(NZD as - float64 -) as NZD, - cast(USD as - float64 -) as USD, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab1` --- exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index 2618577830ac..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,30 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(currency as - string -), ''), '-', coalesce(cast(date as - string -), ''), '-', coalesce(cast(timestamp_col as - string -), ''), '-', coalesce(cast(HKD_special___characters as - string -), ''), '-', coalesce(cast(HKD_special___characters_1 as - string -), ''), '-', coalesce(cast(NZD as - string -), ''), '-', coalesce(cast(USD as - string -), '')) as - string -))) as _airbyte_exchange_rate_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab2` --- exchange_rate; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql deleted file mode 100644 index b8f7ef23dfe6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['date']") as date, - json_extract(table_alias._airbyte_data, "$['partition']") as `partition`, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias --- nested_stream_with_complex_columns_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql deleted file mode 100644 index ed49b9abf584..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - string -) as id, - cast(date as - string -) as date, - cast(`partition` as - string -) as `partition`, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab1` --- nested_stream_with_complex_columns_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql deleted file mode 100644 index 4550c95545bf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(date as - string -), ''), '-', coalesce(cast(`partition` as - string -), '')) as - string -))) as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab2` --- nested_stream_with_complex_columns_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql deleted file mode 100644 index 015591a90fa6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab4` - OPTIONS() - as --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab3` --- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql deleted file mode 100644 index ffc273b03241..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - json_extract_scalar(DATA, "$['currency']") as currency, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias -cross join unnest(DATA) as DATA -where DATA is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql deleted file mode 100644 index 31ee702ba3ec..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as - string -) as currency, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql deleted file mode 100644 index 3f1d3246288c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as - string -), ''), '-', coalesce(cast(currency as - string -), '')) as - string -))) as _airbyte_DATA_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql deleted file mode 100644 index fae58456c350..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - json_extract_array(`partition`, "$['double_array_data']") as double_array_data, - json_extract_array(`partition`, "$['DATA']") as DATA, - json_extract_array(`partition`, "$['column___with__quotes']") as column___with__quotes, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` as table_alias -where `partition` is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql deleted file mode 100644 index a0eeb3ef422b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - DATA, - column___with__quotes, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql deleted file mode 100644 index 6ca3de83be50..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as - string -), ''), '-', coalesce(cast(array_to_string(double_array_data, "|", "") as - string -), ''), '-', coalesce(cast(array_to_string(DATA, "|", "") as - string -), ''), '-', coalesce(cast(array_to_string(column___with__quotes, "|", "") as - string -), '')) as - string -))) as _airbyte_partition_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql deleted file mode 100644 index 1e59ead141ba..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - json_extract_scalar(column___with__quotes, "$['currency']") as currency, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias -cross join unnest(column___with__quotes) as column___with__quotes -where column___with__quotes is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql deleted file mode 100644 index be9eef8648af..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as - string -) as currency, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql deleted file mode 100644 index abeb4664ea7e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as - string -), ''), '-', coalesce(cast(currency as - string -), '')) as - string -))) as _airbyte_column___with__quotes_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql deleted file mode 100644 index bc13ba7f2783..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - json_extract_scalar(double_array_data, "$['id']") as id, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias -cross join unnest(double_array_data) as double_array_data -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql deleted file mode 100644 index 8de95f382eb3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as - string -) as id, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql deleted file mode 100644 index e42a8aa35963..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as - string -), ''), '-', coalesce(cast(id as - string -), '')) as - string -))) as _airbyte_double_array_data_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index d00f9c167c3a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['date']") as date, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias --- non_nested_stream_without_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index e653ba297d30..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - string -) as id, - cast(date as - string -) as date, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab1` --- non_nested_stream_without_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index a072611c0bef..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(date as - string -), '')) as - string -))) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab2` --- non_nested_stream_without_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index c7e36ed1112d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab1` - OPTIONS() - as --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract_scalar(_airbyte_data, "$['date']") as date, - _airbyte_emitted_at -from `dataline-integration-testing`.test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias --- simple_stream_with_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index d7cebc4de520..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab2` - OPTIONS() - as --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - string -) as id, - cast(date as - string -) as date, - _airbyte_emitted_at -from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab1` --- simple_stream_with_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index 10f8af300953..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab3` - OPTIONS() - as --- SQL model to build a hash column based on the values of this record -select - *, - to_hex(md5(cast(concat(coalesce(cast(id as - string -), ''), '-', coalesce(cast(date as - string -), '')) as - string -))) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab2` --- simple_stream_with_namespace_resulting_into_long_names; - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index efb1c7223ca9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_array` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_ab3` --- conflict_stream_array from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_array - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index c660adb89754..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab3` --- conflict_stream_name from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_name - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 1083f66f46a0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab3` --- conflict_stream_name at conflict_stream_name/conflict_stream_name from `dataline-integration-testing`.test_normalization.`conflict_stream_name` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 573cfc4a54fb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - `groups`, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 40652d62ec2c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_scalar` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab3` --- conflict_stream_scalar from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_scalar - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 6789714e4646..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,22 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded_scd` --- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 4af4e800ea7e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,31 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded_scd` - - - OPTIONS() - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab4` --- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 08416cc3cb4a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,25 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`dedup_exchange_rate` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from `dataline-integration-testing`.test_normalization.`dedup_exchange_rate_scd` --- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index 9ad6c0902f5e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,38 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`dedup_exchange_rate_scd` - - - OPTIONS() - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - date as _airbyte_start_at, - lag(date) over ( - partition by id, currency, cast(NZD as - string -) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id, currency, cast(NZD as - string -) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab4` --- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index 364bdfec888d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,24 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`exchange_rate` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab3` --- exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_exchange_rate - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql deleted file mode 100644 index 0f4ca9548ef1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - date, - `partition`, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_scd` --- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql deleted file mode 100644 index c5cfbbd0b526..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - DATA, - column___with__quotes, - _airbyte_emitted_at, - _airbyte_partition_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql deleted file mode 100644 index 42cacd429408..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_DATA_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql deleted file mode 100644 index ef3a1635a6e4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql deleted file mode 100644 index 088994fc6fc1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data` - - - OPTIONS() - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql deleted file mode 100644 index 33a8a28f33bd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ /dev/null @@ -1,29 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_scd` - - - OPTIONS() - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - date, - `partition`, - date as _airbyte_start_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab4` --- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql deleted file mode 100644 index 271d231a59f9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab3` --- non_nested_stream_without_namespace_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql deleted file mode 100644 index cf45f438b2ec..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace table `dataline-integration-testing`.test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names` - - - OPTIONS() - as ( - --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab3` --- simple_stream_with_namespace_resulting_into_long_names from `dataline-integration-testing`.test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql deleted file mode 100644 index 8556d7f50afb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index a1d77f379bce..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_ab1') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 2592ce581df8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab2') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index d6e2edb75ced..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 463a878933f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index b98fcff9e377..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_hashid', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index e29eff6b3c01..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as {{ adapter.quote('groups') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 759e3a18d132..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast({{ adapter.quote('groups') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('groups') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index 51035eb0946d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_2_hashid', - adapter.quote('groups'), - ]) }} as _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index be57970e399e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index cf0d9deb51cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, - _airbyte_emitted_at -from {{ ref('conflict_stream_scalar_ab1') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index b718d36bb399..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_scalar', - ]) }} as _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab2') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index 106a78e83df7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as name, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index 1fe684c4026d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(name as {{ dbt_utils.type_string() }}) as name, - cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ ref('dedup_cdc_excluded_ab1') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 3d994a17195d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'name', - '_ab_cdc_lsn', - '_ab_cdc_updated_at', - '_ab_cdc_deleted_at', - ]) }} as _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab2') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index 4d4fe392fd7f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_cdc_excluded_ab3') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index 2e5c76354fb8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as HKD_special___characters, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_special___characters_1, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index 964b2903bbd1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(date as {{ type_date() }}) as date, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast(HKD_special___characters as {{ dbt_utils.type_float() }}) as HKD_special___characters, - cast(HKD_special___characters_1 as {{ dbt_utils.type_string() }}) as HKD_special___characters_1, - cast(NZD as {{ dbt_utils.type_float() }}) as NZD, - cast(USD as {{ dbt_utils.type_float() }}) as USD, - _airbyte_emitted_at -from {{ ref('dedup_exchange_rate_ab1') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index 5777735df222..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - 'date', - 'timestamp_col', - 'HKD_special___characters', - 'HKD_special___characters_1', - 'NZD', - 'USD', - ]) }} as _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab2') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index f45c79d39e27..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_exchange_rate_ab3') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index 0cac51cb1e9c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as HKD_special___characters, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_special___characters_1, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index 491934c06852..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(date as {{ type_date() }}) as date, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast(HKD_special___characters as {{ dbt_utils.type_float() }}) as HKD_special___characters, - cast(HKD_special___characters_1 as {{ dbt_utils.type_string() }}) as HKD_special___characters_1, - cast(NZD as {{ dbt_utils.type_float() }}) as NZD, - cast(USD as {{ dbt_utils.type_float() }}) as USD, - _airbyte_emitted_at -from {{ ref('exchange_rate_ab1') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index a66fa4a7c245..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - 'date', - 'timestamp_col', - 'HKD_special___characters', - 'HKD_special___characters_1', - 'NZD', - 'USD', - ]) }} as _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab2') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql deleted file mode 100644 index aaa4eb63f243..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql deleted file mode 100644 index 63bd774a716f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab1') }} --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql deleted file mode 100644 index 7d5fab4ab6a4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - adapter.quote('partition'), - ]) }} as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab2') }} --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql deleted file mode 100644 index 8a2db82defcb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab3') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql deleted file mode 100644 index 055fa0fd6186..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'DATA') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('DATA'), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'DATA') }} -where DATA is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql deleted file mode 100644 index be7b0d9e999d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql deleted file mode 100644 index d84ac21d8f82..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_DATA_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql deleted file mode 100644 index dbe34c46db5e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, - {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as DATA, - {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as column___with__quotes, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias -where {{ adapter.quote('partition') }} is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql deleted file mode 100644 index 7c2087a397f4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - DATA, - column___with__quotes, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql deleted file mode 100644 index e63dd843831e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql +++ /dev/null @@ -1,13 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid', - array_to_string('double_array_data'), - array_to_string('DATA'), - array_to_string('column___with__quotes'), - ]) }} as _airbyte_partition_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql deleted file mode 100644 index 4202a1cef1c6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'column___with__quotes') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('column___with__quotes'), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'column___with__quotes') }} -where column___with__quotes is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql deleted file mode 100644 index 076b4bfc975c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql deleted file mode 100644 index 36d43b45d0b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql deleted file mode 100644 index 48b7ea236ae1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'double_array_data') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'double_array_data') }} -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql deleted file mode 100644 index a3e29e92dfb7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as {{ dbt_utils.type_string() }}) as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql deleted file mode 100644 index 269418d7250d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'id', - ]) }} as _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index fd2fbdd54863..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index e4ed8d075d22..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - _airbyte_emitted_at -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab1') }} --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index 55471ad5091e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - ]) }} as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab2') }} --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index e3ec7ffd2f82..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - _airbyte_emitted_at -from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index c437ca698089..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - _airbyte_emitted_at -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab1') }} --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index 05770b856f50..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - ]) }} as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab2') }} --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 9ffda6086e35..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from {{ ref('conflict_stream_array_ab3') }} --- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 8a83ccc01e31..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab3') }} --- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 94a9dc3d0139..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 36c23b81b82d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - {{ adapter.quote('groups') }}, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 9d7acc846fd0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab3') }} --- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 87007e001559..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_scd') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index f23636879592..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab4') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 605f71b2c4a5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_scd') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index 040edf6efb32..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - date as _airbyte_start_at, - lag(date) over ( - partition by id, currency, cast(NZD as {{ dbt_utils.type_string() }}) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id, currency, cast(NZD as {{ dbt_utils.type_string() }}) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab4') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index 49c0da07de8e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,16 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - HKD_special___characters, - HKD_special___characters_1, - NZD, - USD, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab3') }} --- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql deleted file mode 100644 index d03125b32542..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - {{ adapter.quote('partition') }}, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_scd') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql deleted file mode 100644 index 8461ffb2cabd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - DATA, - column___with__quotes, - _airbyte_emitted_at, - _airbyte_partition_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql deleted file mode 100644 index 4e7bf4841bd5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_DATA_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql deleted file mode 100644 index 2bd228318b0d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql deleted file mode 100644 index 50b39ee05b38..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql deleted file mode 100644 index d9c12b8eb43a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - date, - {{ adapter.quote('partition') }}, - date as _airbyte_start_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab4') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql deleted file mode 100644 index 1004a9e2f4a4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab3') }} --- non_nested_stream_without_namespace_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql deleted file mode 100644 index ce74645f7864..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab3') }} --- simple_stream_with_namespace_resulting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml deleted file mode 100644 index 69352d59cdbb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -sources: -- name: test_normalization - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_conflict_stream_array - - name: _airbyte_raw_conflict_stream_name - - name: _airbyte_raw_conflict_stream_scalar - - name: _airbyte_raw_dedup_cdc_excluded - - name: _airbyte_raw_dedup_exchange_rate - - name: _airbyte_raw_exchange_rate - - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names -- name: test_normalization_namespace - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql deleted file mode 100644 index 137d362d5e81..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_array_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_array as char), '')) as char)) as _airbyte_conflict_stream_array_hashid -from _airbyte_test_normalization.`conflict_stream_array_ab2` --- conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql deleted file mode 100644 index 7a25f59f18f0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as json) as conflict_stream_name, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab1` --- conflict_stream_name at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql deleted file mode 100644 index 7606530234f4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_hashid as char), ''), '-', coalesce(cast(conflict_stream_name as char), '')) as char)) as _airbyte_conflict_stream_name_2_hashid -from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab2` --- conflict_stream_name at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql deleted file mode 100644 index d786dfa4a89e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - json_value(conflict_stream_name, - '$."groups"') as `groups`, - _airbyte_emitted_at -from test_normalization.`conflict_stream_name_conflict_stream_name` as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql deleted file mode 100644 index 3393dde64ef8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(`groups` as char) as `groups`, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab1` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql deleted file mode 100644 index ccf23dd250f3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_2_hashid as char), ''), '-', coalesce(cast(`groups` as char), '')) as char)) as _airbyte_conflict_stream_name_3_hashid -from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab2` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index f9ad98a47215..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as char) as id, - cast(conflict_stream_name as json) as conflict_stream_name, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_name_ab1` --- conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 2d6eaa141987..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_name_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_name as char), '')) as char)) as _airbyte_conflict_stream_name_hashid -from _airbyte_test_normalization.`conflict_stream_name_ab2` --- conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index c97c708d399b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_scalar_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."conflict_stream_scalar"') as conflict_stream_scalar, - _airbyte_emitted_at -from test_normalization._airbyte_raw_conflict_stream_scalar as table_alias --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index fc08f53590d0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_scalar_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as char) as id, - cast(conflict_stream_scalar as - signed -) as conflict_stream_scalar, - _airbyte_emitted_at -from _airbyte_test_normalization.`conflict_stream_scalar_ab1` --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index 46a35a436e7d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`conflict_stream_scalar_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_scalar as char), '')) as char)) as _airbyte_conflict_stream_scalar_hashid -from _airbyte_test_normalization.`conflict_stream_scalar_ab2` --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index 7778e7680509..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,19 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_cdc_excluded_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."name"') as `name`, - json_value(_airbyte_data, - '$."_ab_cdc_lsn"') as _ab_cdc_lsn, - json_value(_airbyte_data, - '$."_ab_cdc_updated_at"') as _ab_cdc_updated_at, - json_value(_airbyte_data, - '$."_ab_cdc_deleted_at"') as _ab_cdc_deleted_at, - _airbyte_emitted_at -from test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index f6294978ae38..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,22 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_cdc_excluded_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - signed -) as id, - cast(`name` as char) as `name`, - cast(_ab_cdc_lsn as - float -) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as - float -) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as - float -) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from _airbyte_test_normalization.`dedup_cdc_excluded_ab1` --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 2e9eb48cdef6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_cdc_excluded_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`name` as char), ''), '-', coalesce(cast(_ab_cdc_lsn as char), ''), '-', coalesce(cast(_ab_cdc_updated_at as char), ''), '-', coalesce(cast(_ab_cdc_deleted_at as char), '')) as char)) as _airbyte_dedup_cdc_excluded_hashid -from _airbyte_test_normalization.`dedup_cdc_excluded_ab2` --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index b96afb221807..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_cdc_excluded_ab4__dbt_tmp` as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from _airbyte_test_normalization.`dedup_cdc_excluded_ab3` --- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index dae5bd72e4ab..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,25 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_exchange_rate_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."currency"') as currency, - json_value(_airbyte_data, - '$."date"') as `date`, - json_value(_airbyte_data, - '$."timestamp_col"') as timestamp_col, - json_value(_airbyte_data, - '$."HKD@spéçiäl & characters"') as `HKD@spéçiäl & characters`, - json_value(_airbyte_data, - '$."HKD_special___characters"') as hkd_special___characters, - json_value(_airbyte_data, - '$."NZD"') as nzd, - json_value(_airbyte_data, - '$."USD"') as usd, - _airbyte_emitted_at -from test_normalization._airbyte_raw_dedup_exchange_rate as table_alias --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index e14989d5c7a9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,27 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_exchange_rate_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - signed -) as id, - cast(currency as char) as currency, - cast(`date` as - date -) as `date`, - cast(timestamp_col as char) as timestamp_col, - cast(`HKD@spéçiäl & characters` as - float -) as `HKD@spéçiäl & characters`, - cast(hkd_special___characters as char) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from _airbyte_test_normalization.`dedup_exchange_rate_ab1` --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index 866e607f1f80..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_exchange_rate_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(currency as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(timestamp_col as char), ''), '-', coalesce(cast(`HKD@spéçiäl & characters` as char), ''), '-', coalesce(cast(hkd_special___characters as char), ''), '-', coalesce(cast(nzd as char), ''), '-', coalesce(cast(usd as char), '')) as char)) as _airbyte_dedup_exchange_rate_hashid -from _airbyte_test_normalization.`dedup_exchange_rate_ab2` --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index 0a30470b439a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`dedup_exchange_rate_ab4__dbt_tmp` as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from _airbyte_test_normalization.`dedup_exchange_rate_ab3` --- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index b8662205d239..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,25 +0,0 @@ - - create view _airbyte_test_normalization.`exchange_rate_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."currency"') as currency, - json_value(_airbyte_data, - '$."date"') as `date`, - json_value(_airbyte_data, - '$."timestamp_col"') as timestamp_col, - json_value(_airbyte_data, - '$."HKD@spéçiäl & characters"') as `HKD@spéçiäl & characters`, - json_value(_airbyte_data, - '$."HKD_special___characters"') as hkd_special___characters, - json_value(_airbyte_data, - '$."NZD"') as nzd, - json_value(_airbyte_data, - '$."USD"') as usd, - _airbyte_emitted_at -from test_normalization._airbyte_raw_exchange_rate as table_alias --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index 7596a0158e24..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,27 +0,0 @@ - - create view _airbyte_test_normalization.`exchange_rate_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - signed -) as id, - cast(currency as char) as currency, - cast(`date` as - date -) as `date`, - cast(timestamp_col as char) as timestamp_col, - cast(`HKD@spéçiäl & characters` as - float -) as `HKD@spéçiäl & characters`, - cast(hkd_special___characters as char) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from _airbyte_test_normalization.`exchange_rate_ab1` --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index d9340feb7057..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`exchange_rate_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(currency as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(timestamp_col as char), ''), '-', coalesce(cast(`HKD@spéçiäl & characters` as char), ''), '-', coalesce(cast(hkd_special___characters as char), ''), '-', coalesce(cast(nzd as char), ''), '-', coalesce(cast(usd as char), '')) as char)) as _airbyte_exchange_rate_hashid -from _airbyte_test_normalization.`exchange_rate_ab2` --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql deleted file mode 100644 index 23b64ee8f8e5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as char) as id, - cast(`date` as char) as `date`, - cast(`partition` as json) as `partition`, - _airbyte_emitted_at -from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab1` --- nested_stream_with_co__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql deleted file mode 100644 index 7aa6a87fea7d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(`partition` as char), '')) as char)) as _airbyte_nested_strea__nto_long_names_hashid -from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab2` --- nested_stream_with_co__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql deleted file mode 100644 index 83c81d9fc861..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab4__dbt_tmp` as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_strea__nto_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab3` --- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql deleted file mode 100644 index 5ba25fb20ebc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql +++ /dev/null @@ -1,17 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_strea__nto_long_names_hashid, - json_extract(`partition`, - '$."double_array_data"') as double_array_data, - json_extract(`partition`, - '$."DATA"') as `DATA`, - json_extract(`partition`, - '$."column___with__quotes"') as `column__'with"_quotes`, - _airbyte_emitted_at -from test_normalization.`nested_stream_with_co__lting_into_long_names` as table_alias -where `partition` is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql deleted file mode 100644 index 56a4acbc626d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_strea__nto_long_names_hashid, - double_array_data, - `DATA`, - `column__'with"_quotes`, - _airbyte_emitted_at -from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab1` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql deleted file mode 100644 index 0c110f939152..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_nested_strea__nto_long_names_hashid as char), ''), '-', coalesce(cast(double_array_data as char), ''), '-', coalesce(cast(`DATA` as char), ''), '-', coalesce(cast(`column__'with"_quotes` as char), '')) as char)) as _airbyte_partition_hashid -from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab2` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql deleted file mode 100644 index 6bb578315008..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql +++ /dev/null @@ -1,59 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 2 - order by generated_number - - - ), - joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - - json_extract(double_array_data, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data - from test_normalization.`nested_stream_with_co___long_names_partition` - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_co___long_names_partition.double_array_data - where numbers.generated_number <= json_length(double_array_data) - ) -select - _airbyte_partition_hashid, - json_value(_airbyte_nested_data, - '$."id"') as id, - _airbyte_emitted_at -from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql deleted file mode 100644 index 43a2faa29900..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as char) as id, - _airbyte_emitted_at -from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab1` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql deleted file mode 100644 index d7261b03b49c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(id as char), '')) as char)) as _airbyte_double_array_data_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab2` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql deleted file mode 100644 index a532d3e22f8f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql +++ /dev/null @@ -1,59 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - - ), - joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - - json_extract(`DATA`, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data - from test_normalization.`nested_stream_with_co___long_names_partition` - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_co___long_names_partition.`DATA` - where numbers.generated_number <= json_length(`DATA`) - ) -select - _airbyte_partition_hashid, - json_value(_airbyte_nested_data, - '$."currency"') as currency, - _airbyte_emitted_at -from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where `DATA` is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql deleted file mode 100644 index 4c7968e3c11d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as char) as currency, - _airbyte_emitted_at -from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab1` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql deleted file mode 100644 index 01d00378e139..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(currency as char), '')) as char)) as _airbyte_data_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab2` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql deleted file mode 100644 index 4f3b7632f1b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql +++ /dev/null @@ -1,59 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - - ), - joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - - json_extract(`column__'with"_quotes`, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data - from test_normalization.`nested_stream_with_co___long_names_partition` - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_co___long_names_partition.`column__'with"_quotes` - where numbers.generated_number <= json_length(`column__'with"_quotes`) - ) -select - _airbyte_partition_hashid, - json_value(_airbyte_nested_data, - '$."currency"') as currency, - _airbyte_emitted_at -from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where `column__'with"_quotes` is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql deleted file mode 100644 index 097f8b5b835e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as char) as currency, - _airbyte_emitted_at -from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab1` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql deleted file mode 100644 index 5f3ee64ee324..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(currency as char), '')) as char)) as _airbyte_column___with__quotes_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab2` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql deleted file mode 100644 index 590bb28948ca..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."date"') as `date`, - _airbyte_emitted_at -from test_normalization._airbyte_raw_non_nest__lting_into_long_names as table_alias --- non_nested_stream_wit__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql deleted file mode 100644 index 8c37318b3d29..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as char) as id, - cast(`date` as char) as `date`, - _airbyte_emitted_at -from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab1` --- non_nested_stream_wit__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql deleted file mode 100644 index 5108eb39e24d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), '')) as char)) as _airbyte_non_nested_s__nto_long_names_hashid -from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab2` --- non_nested_stream_wit__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql deleted file mode 100644 index 52aa78db11bd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab1__dbt_tmp` as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - json_value(_airbyte_data, - '$."id"') as id, - json_value(_airbyte_data, - '$."date"') as `date`, - _airbyte_emitted_at -from test_normalization_namespace._airbyte_raw_simple_s__lting_into_long_names as table_alias --- simple_stream_with_na__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql deleted file mode 100644 index 679f88767d21..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab2__dbt_tmp` as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as char) as id, - cast(`date` as char) as `date`, - _airbyte_emitted_at -from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab1` --- simple_stream_with_na__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql deleted file mode 100644 index b6cf2f3be51b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,10 +0,0 @@ - - create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab3__dbt_tmp` as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), '')) as char)) as _airbyte_simple_strea__nto_long_names_hashid -from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab2` --- simple_stream_with_na__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 2c1eed7331a4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_array__dbt_tmp` - as ( - --- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from _airbyte_test_normalization.`conflict_stream_array_ab3` --- conflict_stream_array from test_normalization._airbyte_raw_conflict_stream_array - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index d341fcab11c6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_name__dbt_tmp` - as ( - --- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from _airbyte_test_normalization.`conflict_stream_name_ab3` --- conflict_stream_name from test_normalization._airbyte_raw_conflict_stream_name - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql deleted file mode 100644 index c55a5e3a62ed..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_name____conflict_stream_name__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - `groups`, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab3` --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from test_normalization.`conflict_stream_name_conflict_stream_name` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 8cf88cc99275..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_name_conflict_stream_name__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab3` --- conflict_stream_name at conflict_stream_name/conflict_stream_name from test_normalization.`conflict_stream_name` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index aad49db6aa81..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`conflict_stream_scalar__dbt_tmp` - as ( - --- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from _airbyte_test_normalization.`conflict_stream_scalar_ab3` --- conflict_stream_scalar from test_normalization._airbyte_raw_conflict_stream_scalar - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 25ac49405092..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,19 +0,0 @@ - - - create table - test_normalization.`dedup_cdc_excluded__dbt_tmp` - as ( - --- Final base SQL model -select - id, - `name`, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from test_normalization.`dedup_cdc_excluded_scd` --- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_active_row = True - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 6872e6885312..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,28 +0,0 @@ - - - create table - test_normalization.`dedup_cdc_excluded_scd__dbt_tmp` - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - `name`, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from _airbyte_test_normalization.`dedup_cdc_excluded_ab4` --- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_row_num = 1 - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 4c2d410588c1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,22 +0,0 @@ - - - create table - test_normalization.`dedup_exchange_rate__dbt_tmp` - as ( - --- Final base SQL model -select - id, - currency, - `date`, - timestamp_col, - `HKD@spéçiäl & characters`, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from test_normalization.`dedup_exchange_rate_scd` --- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_active_row = True - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index e1f99c510d00..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,31 +0,0 @@ - - - create table - test_normalization.`dedup_exchange_rate_scd__dbt_tmp` - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - `date`, - timestamp_col, - `HKD@spéçiäl & characters`, - hkd_special___characters, - nzd, - usd, - `date` as _airbyte_start_at, - lag(`date`) over ( - partition by id, currency, cast(nzd as char) - order by `date` is null asc, `date` desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(`date`) over ( - partition by id, currency, cast(nzd as char) - order by `date` is null asc, `date` desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from _airbyte_test_normalization.`dedup_exchange_rate_ab4` --- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_row_num = 1 - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index e24cf0e7d279..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,21 +0,0 @@ - - - create table - test_normalization.`exchange_rate__dbt_tmp` - as ( - --- Final base SQL model -select - id, - currency, - `date`, - timestamp_col, - `HKD@spéçiäl & characters`, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from _airbyte_test_normalization.`exchange_rate_ab3` --- exchange_rate from test_normalization._airbyte_raw_exchange_rate - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql deleted file mode 100644 index 4e0270422a03..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql +++ /dev/null @@ -1,26 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co_1g_into_long_names_scd__dbt_tmp` - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - `date`, - `partition`, - `date` as _airbyte_start_at, - lag(`date`) over ( - partition by id - order by `date` is null asc, `date` desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(`date`) over ( - partition by id - order by `date` is null asc, `date` desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_strea__nto_long_names_hashid -from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab4` --- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names -where _airbyte_row_num = 1 - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql deleted file mode 100644 index a796e4bec478..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co___long_names_partition__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_nested_strea__nto_long_names_hashid, - double_array_data, - `DATA`, - `column__'with"_quotes`, - _airbyte_emitted_at, - _airbyte_partition_hashid -from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab3` --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from test_normalization.`nested_stream_with_co__lting_into_long_names` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql deleted file mode 100644 index 829800f026b8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co___names_partition_data__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab3` --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from test_normalization.`nested_stream_with_co___long_names_partition` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql deleted file mode 100644 index c65521b6b2c2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co__column___with__quotes__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab3` --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from test_normalization.`nested_stream_with_co___long_names_partition` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql deleted file mode 100644 index e0795e0c729c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co__ion_double_array_data__dbt_tmp` - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab3` --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from test_normalization.`nested_stream_with_co___long_names_partition` - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql deleted file mode 100644 index f74292f7598c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql +++ /dev/null @@ -1,17 +0,0 @@ - - - create table - test_normalization.`nested_stream_with_co__lting_into_long_names__dbt_tmp` - as ( - --- Final base SQL model -select - id, - `date`, - `partition`, - _airbyte_emitted_at, - _airbyte_nested_strea__nto_long_names_hashid -from test_normalization.`nested_stream_with_co_1g_into_long_names_scd` --- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names -where _airbyte_active_row = True - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql deleted file mode 100644 index d80970404ecf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization.`non_nested_stream_wit__lting_into_long_names__dbt_tmp` - as ( - --- Final base SQL model -select - id, - `date`, - _airbyte_emitted_at, - _airbyte_non_nested_s__nto_long_names_hashid -from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab3` --- non_nested_stream_wit__lting_into_long_names from test_normalization._airbyte_raw_non_nest__lting_into_long_names - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql deleted file mode 100644 index c7220f05c387..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql +++ /dev/null @@ -1,15 +0,0 @@ - - - create table - test_normalization_namespace.`simple_stream_with_na__lting_into_long_names__dbt_tmp` - as ( - --- Final base SQL model -select - id, - `date`, - _airbyte_emitted_at, - _airbyte_simple_strea__nto_long_names_hashid -from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab3` --- simple_stream_with_na__lting_into_long_names from test_normalization_namespace._airbyte_raw_simple_s__lting_into_long_names - ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql deleted file mode 100644 index d6e2edb75ced..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql deleted file mode 100644 index d31ae94a8814..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name__2flict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql deleted file mode 100644 index b7b7a73a467d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_hashid', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name__2flict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql deleted file mode 100644 index e29eff6b3c01..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as {{ adapter.quote('groups') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql deleted file mode 100644 index e131f0fc01c1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast({{ adapter.quote('groups') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('groups') }}, - _airbyte_emitted_at -from {{ ref('conflict_stream_name__3flict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql deleted file mode 100644 index f68eaea79d22..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_2_hashid', - adapter.quote('groups'), - ]) }} as _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name__3flict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql deleted file mode 100644 index 8556d7f50afb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index a1d77f379bce..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_ab1') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 2592ce581df8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab2') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index be57970e399e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index cf0d9deb51cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, - _airbyte_emitted_at -from {{ ref('conflict_stream_scalar_ab1') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index b718d36bb399..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_scalar', - ]) }} as _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab2') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index 55bf95295a24..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index ce757361bd0a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ ref('dedup_cdc_excluded_ab1') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index f508b2211f14..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - adapter.quote('name'), - '_ab_cdc_lsn', - '_ab_cdc_updated_at', - '_ab_cdc_deleted_at', - ]) }} as _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab2') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index 4d4fe392fd7f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_cdc_excluded_ab3') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index c9a6865ef7fd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index 07a1a6cade5a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('dedup_exchange_rate_ab1') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index c198740dc7b2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - adapter.quote('date'), - 'timestamp_col', - adapter.quote('HKD@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab2') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index f45c79d39e27..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_exchange_rate_ab3') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index 3e66f6d0b4fc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index cd1a48278828..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('exchange_rate_ab1') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index 11997b31c804..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - adapter.quote('date'), - 'timestamp_col', - adapter.quote('HKD@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab2') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql deleted file mode 100644 index 8f7cabd6d907..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} as table_alias --- nested_stream_with_co__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql deleted file mode 100644 index 6b268cccc087..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co_1g_into_long_names_ab1') }} --- nested_stream_with_co__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql deleted file mode 100644 index fbeeeedfd617..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - adapter.quote('date'), - adapter.quote('partition'), - ]) }} as _airbyte_nested_strea__nto_long_names_hashid -from {{ ref('nested_stream_with_co_1g_into_long_names_ab2') }} --- nested_stream_with_co__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql deleted file mode 100644 index 87b9a5bbfa1f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_strea__nto_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('nested_stream_with_co_1g_into_long_names_ab3') }} --- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql deleted file mode 100644 index 31f6b6a06672..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_strea__nto_long_names_hashid, - {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, - {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as {{ adapter.quote('DATA') }}, - {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column__\'with"_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co__lting_into_long_names') }} as table_alias -where {{ adapter.quote('partition') }} is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql deleted file mode 100644 index 81aae267055d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_strea__nto_long_names_hashid, - double_array_data, - {{ adapter.quote('DATA') }}, - {{ adapter.quote('column__\'with"_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co_2g_names_partition_ab1') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql deleted file mode 100644 index 47333f92a2c9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql +++ /dev/null @@ -1,13 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_nested_strea__nto_long_names_hashid', - array_to_string('double_array_data'), - array_to_string(adapter.quote('DATA')), - array_to_string(adapter.quote('column__\'with"_quotes')), - ]) }} as _airbyte_partition_hashid -from {{ ref('nested_stream_with_co_2g_names_partition_ab2') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql deleted file mode 100644 index 5b3a0601175b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', 'double_array_data') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'double_array_data') }} -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql deleted file mode 100644 index b4357e9d1f1e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as {{ dbt_utils.type_string() }}) as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co_3double_array_data_ab1') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql deleted file mode 100644 index eb092411884f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'id', - ]) }} as _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_co_3double_array_data_ab2') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql deleted file mode 100644 index d5c4708f7e07..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', adapter.quote('DATA')) }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value(adapter.quote('DATA')), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', adapter.quote('DATA')) }} -where {{ adapter.quote('DATA') }} is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql deleted file mode 100644 index baad4bbf0f14..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co_3es_partition_data_ab1') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql deleted file mode 100644 index 1bcd5df3b9a8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_data_hashid -from {{ ref('nested_stream_with_co_3es_partition_data_ab2') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql deleted file mode 100644 index f8b1f55fc4df..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', adapter.quote('column__\'with"_quotes')) }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value(adapter.quote('column__\'with"_quotes')), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', adapter.quote('column__\'with"_quotes')) }} -where {{ adapter.quote('column__\'with"_quotes') }} is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql deleted file mode 100644 index 32acb349e636..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_co_3mn___with__quotes_ab1') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql deleted file mode 100644 index 38b83239564d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_co_3mn___with__quotes_ab2') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql deleted file mode 100644 index 6575f5003ddf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_non_nest__lting_into_long_names') }} as table_alias --- non_nested_stream_wit__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql deleted file mode 100644 index d8d262e97685..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ ref('non_nested_stream_wit_1g_into_long_names_ab1') }} --- non_nested_stream_wit__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql deleted file mode 100644 index 184c3858c4c2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - adapter.quote('date'), - ]) }} as _airbyte_non_nested_s__nto_long_names_hashid -from {{ ref('non_nested_stream_wit_1g_into_long_names_ab2') }} --- non_nested_stream_wit__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql deleted file mode 100644 index ab36933bcef0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ source('test_normalization_namespace', '_airbyte_raw_simple_s__lting_into_long_names') }} as table_alias --- simple_stream_with_na__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql deleted file mode 100644 index 0cd875e93da8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ ref('simple_stream_with_na_1g_into_long_names_ab1') }} --- simple_stream_with_na__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql deleted file mode 100644 index b22a624397a5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - adapter.quote('date'), - ]) }} as _airbyte_simple_strea__nto_long_names_hashid -from {{ ref('simple_stream_with_na_1g_into_long_names_ab2') }} --- simple_stream_with_na__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 9ffda6086e35..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from {{ ref('conflict_stream_array_ab3') }} --- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 8a83ccc01e31..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab3') }} --- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql deleted file mode 100644 index ac40e0861b86..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - {{ adapter.quote('groups') }}, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name__3flict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index ea20646f8121..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name__2flict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 9d7acc846fd0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab3') }} --- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 986edf9cec20..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - {{ adapter.quote('name') }}, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_scd') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 6f958b9b0405..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - {{ adapter.quote('name') }}, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab4') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 6a36d1914bb9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_scd') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index e92415dd94b7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - {{ adapter.quote('date') }} as _airbyte_start_at, - lag({{ adapter.quote('date') }}) over ( - partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag({{ adapter.quote('date') }}) over ( - partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab4') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index 147399e6739d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,16 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab3') }} --- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql deleted file mode 100644 index f66d317eba17..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - {{ adapter.quote('date') }}, - {{ adapter.quote('partition') }}, - {{ adapter.quote('date') }} as _airbyte_start_at, - lag({{ adapter.quote('date') }}) over ( - partition by id - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag({{ adapter.quote('date') }}) over ( - partition by id - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_strea__nto_long_names_hashid -from {{ ref('nested_stream_with_co_1g_into_long_names_ab4') }} --- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql deleted file mode 100644 index b64a0b856c0e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_nested_strea__nto_long_names_hashid, - double_array_data, - {{ adapter.quote('DATA') }}, - {{ adapter.quote('column__\'with"_quotes') }}, - _airbyte_emitted_at, - _airbyte_partition_hashid -from {{ ref('nested_stream_with_co_2g_names_partition_ab3') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_co__lting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql deleted file mode 100644 index eec219cee615..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from {{ ref('nested_stream_with_co_3es_partition_data_ab3') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_co___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql deleted file mode 100644 index b7c647643b54..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_co_3mn___with__quotes_ab3') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_co___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql deleted file mode 100644 index eb0f195e2786..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_co_3double_array_data_ab3') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_co___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql deleted file mode 100644 index acb26a1d1689..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - {{ adapter.quote('date') }}, - {{ adapter.quote('partition') }}, - _airbyte_emitted_at, - _airbyte_nested_strea__nto_long_names_hashid -from {{ ref('nested_stream_with_co_1g_into_long_names_scd') }} --- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql deleted file mode 100644 index 12fcd9b638fa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - {{ adapter.quote('date') }}, - _airbyte_emitted_at, - _airbyte_non_nested_s__nto_long_names_hashid -from {{ ref('non_nested_stream_wit_1g_into_long_names_ab3') }} --- non_nested_stream_wit__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nest__lting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql deleted file mode 100644 index fdd42e4ce199..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} --- Final base SQL model -select - id, - {{ adapter.quote('date') }}, - _airbyte_emitted_at, - _airbyte_simple_strea__nto_long_names_hashid -from {{ ref('simple_stream_with_na_1g_into_long_names_ab3') }} --- simple_stream_with_na__lting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_s__lting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml deleted file mode 100644 index 50c2d2f68ee8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -sources: -- name: test_normalization - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_conflict_stream_array - - name: _airbyte_raw_conflict_stream_name - - name: _airbyte_raw_conflict_stream_scalar - - name: _airbyte_raw_dedup_cdc_excluded - - name: _airbyte_raw_dedup_exchange_rate - - name: _airbyte_raw_exchange_rate - - name: _airbyte_raw_nested_s__lting_into_long_names - - name: _airbyte_raw_non_nest__lting_into_long_names -- name: test_normalization_namespace - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_simple_s__lting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql deleted file mode 100644 index 8500eff53443..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_array_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast(conflict_stream_array as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_array_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_array_ab2" --- conflict_stream_array - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql deleted file mode 100644 index 6269ba0ab954..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - jsonb_extract_path_text(conflict_stream_name, 'groups') as groups, - _airbyte_emitted_at -from "postgres".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql deleted file mode 100644 index 671aa9e8df7d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(groups as - varchar -) as groups, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab1" --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql deleted file mode 100644 index e69069730d4e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_name_2_hashid as - varchar -), '') || '-' || coalesce(cast(groups as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_name_3_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab2" --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index 5bbbb58c1832..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - varchar -) as "id", - cast(conflict_stream_name as - jsonb -) as conflict_stream_name, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_name_ab1" --- conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 7c40908fb2c9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast(conflict_stream_name as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_name_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name_ab2" --- conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 3df5e1f853fa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as - jsonb -) as conflict_stream_name, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab1" --- conflict_stream_name at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index b235f3bc52a8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_name_hashid as - varchar -), '') || '-' || coalesce(cast(conflict_stream_name as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_name_2_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab2" --- conflict_stream_name at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index c6c3552e6f57..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'conflict_stream_scalar') as conflict_stream_scalar, - _airbyte_emitted_at -from "postgres".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index 06644717b27d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - varchar -) as "id", - cast(conflict_stream_scalar as - bigint -) as conflict_stream_scalar, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab1" --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index e7f113930022..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast(conflict_stream_scalar as - varchar -), '') - - as - varchar -)) as _airbyte_conflict_stream_scalar_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab2" --- conflict_stream_scalar - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index baee172f729c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'name') as "name", - jsonb_extract_path_text(_airbyte_data, '_ab_cdc_lsn') as _ab_cdc_lsn, - jsonb_extract_path_text(_airbyte_data, '_ab_cdc_updated_at') as _ab_cdc_updated_at, - jsonb_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at') as _ab_cdc_deleted_at, - _airbyte_emitted_at -from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index 4475c2007662..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,24 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - bigint -) as "id", - cast("name" as - varchar -) as "name", - cast(_ab_cdc_lsn as - float -) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as - float -) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as - float -) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab1" --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 5a2f3b8ed151..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,26 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast("name" as - varchar -), '') || '-' || coalesce(cast(_ab_cdc_lsn as - varchar -), '') || '-' || coalesce(cast(_ab_cdc_updated_at as - varchar -), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as - varchar -), '') - - as - varchar -)) as _airbyte_dedup_cdc_excluded_hashid -from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab2" --- dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index 10fcc0fdcf89..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab4__dbt_tmp" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab3" --- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index 46e7afe4f771..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,17 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'currency') as currency, - jsonb_extract_path_text(_airbyte_data, 'date') as "date", - jsonb_extract_path_text(_airbyte_data, 'timestamp_col') as timestamp_col, - jsonb_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters') as "HKD@spéçiäl & characters", - jsonb_extract_path_text(_airbyte_data, 'HKD_special___characters') as hkd_special___characters, - jsonb_extract_path_text(_airbyte_data, 'NZD') as nzd, - jsonb_extract_path_text(_airbyte_data, 'USD') as usd, - _airbyte_emitted_at -from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index ac3cb3c5c83e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,33 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - bigint -) as "id", - cast(currency as - varchar -) as currency, - cast("date" as - date -) as "date", - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("HKD@spéçiäl & characters" as - float -) as "HKD@spéçiäl & characters", - cast(hkd_special___characters as - varchar -) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab1" --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index 6a15113888d2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,32 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast(currency as - varchar -), '') || '-' || coalesce(cast("date" as - varchar -), '') || '-' || coalesce(cast(timestamp_col as - varchar -), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as - varchar -), '') || '-' || coalesce(cast(hkd_special___characters as - varchar -), '') || '-' || coalesce(cast(nzd as - varchar -), '') || '-' || coalesce(cast(usd as - varchar -), '') - - as - varchar -)) as _airbyte_dedup_exchange_rate_hashid -from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab2" --- dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index ca05d1103742..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab4__dbt_tmp" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab3" --- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index a9de573688ab..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,17 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."exchange_rate_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'currency') as currency, - jsonb_extract_path_text(_airbyte_data, 'date') as "date", - jsonb_extract_path_text(_airbyte_data, 'timestamp_col') as timestamp_col, - jsonb_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters') as "HKD@spéçiäl & characters", - jsonb_extract_path_text(_airbyte_data, 'HKD_special___characters') as hkd_special___characters, - jsonb_extract_path_text(_airbyte_data, 'NZD') as nzd, - jsonb_extract_path_text(_airbyte_data, 'USD') as usd, - _airbyte_emitted_at -from "postgres".test_normalization._airbyte_raw_exchange_rate as table_alias --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index 689928644db7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,33 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."exchange_rate_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - bigint -) as "id", - cast(currency as - varchar -) as currency, - cast("date" as - date -) as "date", - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("HKD@spéçiäl & characters" as - float -) as "HKD@spéçiäl & characters", - cast(hkd_special___characters as - varchar -) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."exchange_rate_ab1" --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index ae2d7c56dba0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,32 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."exchange_rate_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast(currency as - varchar -), '') || '-' || coalesce(cast("date" as - varchar -), '') || '-' || coalesce(cast(timestamp_col as - varchar -), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as - varchar -), '') || '-' || coalesce(cast(hkd_special___characters as - varchar -), '') || '-' || coalesce(cast(nzd as - varchar -), '') || '-' || coalesce(cast(usd as - varchar -), '') - - as - varchar -)) as _airbyte_exchange_rate_hashid -from "postgres"._airbyte_test_normalization."exchange_rate_ab2" --- exchange_rate - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql deleted file mode 100644 index a15d7c286441..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stre__nto_long_names_hashid, - jsonb_extract_path("partition", 'double_array_data') as double_array_data, - jsonb_extract_path("partition", 'DATA') as "DATA", - jsonb_extract_path("partition", 'column`_''with"_quotes') as "column`_'with""_quotes", - _airbyte_emitted_at -from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names" as table_alias -where "partition" is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql deleted file mode 100644 index 8beca5ca9421..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stre__nto_long_names_hashid, - double_array_data, - "DATA", - "column`_'with""_quotes", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab1" --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql deleted file mode 100644 index 9b8d014e5d78..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql +++ /dev/null @@ -1,24 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_nested_stre__nto_long_names_hashid as - varchar -), '') || '-' || coalesce(cast(double_array_data as - varchar -), '') || '-' || coalesce(cast("DATA" as - varchar -), '') || '-' || coalesce(cast("column`_'with""_quotes" as - varchar -), '') - - as - varchar -)) as _airbyte_partition_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab2" --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql deleted file mode 100644 index 7257a111900c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - jsonb_extract_path_text(_airbyte_nested_data, 'currency') as currency, - _airbyte_emitted_at -from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias -cross join jsonb_array_elements( - case jsonb_typeof("DATA") - when 'array' then "DATA" - else '[]' end - ) as _airbyte_nested_data -where "DATA" is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql deleted file mode 100644 index 190e0bc7efdc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as - varchar -) as currency, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab1" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql deleted file mode 100644 index 58ff5cfc7e82..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as - varchar -), '') || '-' || coalesce(cast(currency as - varchar -), '') - - as - varchar -)) as _airbyte_data_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab2" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql deleted file mode 100644 index 4f5262e747d7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - jsonb_extract_path_text(_airbyte_nested_data, 'currency') as currency, - _airbyte_emitted_at -from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias -cross join jsonb_array_elements( - case jsonb_typeof("column`_'with""_quotes") - when 'array' then "column`_'with""_quotes" - else '[]' end - ) as _airbyte_nested_data -where "column`_'with""_quotes" is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql deleted file mode 100644 index 6731a64c8070..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as - varchar -) as currency, - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab1" --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql deleted file mode 100644 index 6c6c1603b79f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as - varchar -), '') || '-' || coalesce(cast(currency as - varchar -), '') - - as - varchar -)) as _airbyte_column___with__quotes_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab2" --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql deleted file mode 100644 index e6cab758b3bd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _airbyte_partition_hashid, - jsonb_extract_path_text(_airbyte_nested_data, 'id') as "id", - _airbyte_emitted_at -from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias -cross join jsonb_array_elements( - case jsonb_typeof(double_array_data) - when 'array' then double_array_data - else '[]' end - ) as _airbyte_nested_data -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql deleted file mode 100644 index dab5ccb08a17..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast("id" as - varchar -) as "id", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab1" --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql deleted file mode 100644 index 8c47eda0f932..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as - varchar -), '') || '-' || coalesce(cast("id" as - varchar -), '') - - as - varchar -)) as _airbyte_double_array_data_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab2" --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql deleted file mode 100644 index 90dadf5dd098..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - varchar -) as "id", - cast("date" as - varchar -) as "date", - cast("partition" as - jsonb -) as "partition", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab1" --- nested_stream_with_c__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql deleted file mode 100644 index 06d876930592..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,22 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast("date" as - varchar -), '') || '-' || coalesce(cast("partition" as - varchar -), '') - - as - varchar -)) as _airbyte_nested_stre__nto_long_names_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab2" --- nested_stream_with_c__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql deleted file mode 100644 index bb6432e71127..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab4__dbt_tmp" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stre__nto_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab3" --- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql deleted file mode 100644 index 27fd33e91cea..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'date') as "date", - _airbyte_emitted_at -from "postgres".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias --- non_nested_stream_wi__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql deleted file mode 100644 index 648f2c41da70..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - varchar -) as "id", - cast("date" as - varchar -) as "date", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab1" --- non_nested_stream_wi__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql deleted file mode 100644 index caf423880e25..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast("date" as - varchar -), '') - - as - varchar -)) as _airbyte_non_nested___nto_long_names_hashid -from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab2" --- non_nested_stream_wi__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql deleted file mode 100644 index c2357389f4d2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab1__dbt_tmp" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - jsonb_extract_path_text(_airbyte_data, 'id') as "id", - jsonb_extract_path_text(_airbyte_data, 'date') as "date", - _airbyte_emitted_at -from "postgres".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias --- simple_stream_with_n__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql deleted file mode 100644 index 9beefb4a2609..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab2__dbt_tmp" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast("id" as - varchar -) as "id", - cast("date" as - varchar -) as "date", - _airbyte_emitted_at -from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab1" --- simple_stream_with_n__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql deleted file mode 100644 index a3179bf4347a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab3__dbt_tmp" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast("id" as - varchar -), '') || '-' || coalesce(cast("date" as - varchar -), '') - - as - varchar -)) as _airbyte_simple_stre__nto_long_names_hashid -from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab2" --- simple_stream_with_n__lting_into_long_names - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 82df6d490af6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_array__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_array_ab3" --- conflict_stream_array from "postgres".test_normalization._airbyte_raw_conflict_stream_array - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 2621ce2ba6eb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_name__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name_ab3" --- conflict_stream_name from "postgres".test_normalization._airbyte_raw_conflict_stream_name - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql deleted file mode 100644 index 42f7228477cb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_name___conflict_stream_name__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - groups, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab3" --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "postgres".test_normalization."conflict_stream_name_conflict_stream_name" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index d78bcb97cd2a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_name_conflict_stream_name__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab3" --- conflict_stream_name at conflict_stream_name/conflict_stream_name from "postgres".test_normalization."conflict_stream_name" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index a1fa74a3691d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."conflict_stream_scalar__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab3" --- conflict_stream_scalar from "postgres".test_normalization._airbyte_raw_conflict_stream_scalar - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 2c2f7d2d5774..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create table "postgres".test_normalization."dedup_cdc_excluded__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - "name", - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from "postgres".test_normalization."dedup_cdc_excluded_scd" --- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 67d1dc16edbe..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,27 +0,0 @@ - - - create table "postgres".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - "id", - "name", - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by "id" - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by "id" - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab4" --- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index b78e23f05e8e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,21 +0,0 @@ - - - create table "postgres".test_normalization."dedup_exchange_rate__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - currency, - "date", - timestamp_col, - "HKD@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from "postgres".test_normalization."dedup_exchange_rate_scd" --- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index de79b6d359e4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,34 +0,0 @@ - - - create table "postgres".test_normalization."dedup_exchange_rate_scd__dbt_tmp" - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - "id", - currency, - "date", - timestamp_col, - "HKD@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - "date" as _airbyte_start_at, - lag("date") over ( - partition by "id", currency, cast(nzd as - varchar -) - order by "date" is null asc, "date" desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag("date") over ( - partition by "id", currency, cast(nzd as - varchar -) - order by "date" is null asc, "date" desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab4" --- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index aa65fa214765..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create table "postgres".test_normalization."exchange_rate__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - currency, - "date", - timestamp_col, - "HKD@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from "postgres"._airbyte_test_normalization."exchange_rate_ab3" --- exchange_rate from "postgres".test_normalization._airbyte_raw_exchange_rate - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql deleted file mode 100644 index 05b5585f6de3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c___long_names_partition__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_nested_stre__nto_long_names_hashid, - double_array_data, - "DATA", - "column`_'with""_quotes", - _airbyte_emitted_at, - _airbyte_partition_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab3" --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql deleted file mode 100644 index 8a5b484f27c8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c___names_partition_data__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab3" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "postgres".test_normalization."nested_stream_with_c___long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql deleted file mode 100644 index 357223729efc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c__column___with__quotes__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab3" --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "postgres".test_normalization."nested_stream_with_c___long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql deleted file mode 100644 index a1ee4e50790b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c__ion_double_array_data__dbt_tmp" - as ( - --- Final base SQL model -select - _airbyte_partition_hashid, - "id", - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab3" --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "postgres".test_normalization."nested_stream_with_c___long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql deleted file mode 100644 index 8f474cacc3f5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c__lting_into_long_names__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - "date", - "partition", - _airbyte_emitted_at, - _airbyte_nested_stre__nto_long_names_hashid -from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names_scd" --- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql deleted file mode 100644 index c5a25a9e3c14..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql +++ /dev/null @@ -1,25 +0,0 @@ - - - create table "postgres".test_normalization."nested_stream_with_c__lting_into_long_names_scd__dbt_tmp" - as ( - --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - "id", - "date", - "partition", - "date" as _airbyte_start_at, - lag("date") over ( - partition by "id" - order by "date" is null asc, "date" desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag("date") over ( - partition by "id" - order by "date" is null asc, "date" desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stre__nto_long_names_hashid -from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab4" --- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql deleted file mode 100644 index f3d8553a5893..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization."non_nested_stream_wi__lting_into_long_names__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - "date", - _airbyte_emitted_at, - _airbyte_non_nested___nto_long_names_hashid -from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab3" --- non_nested_stream_wi__lting_into_long_names from "postgres".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql deleted file mode 100644 index 87e70a69c3e6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create table "postgres".test_normalization_namespace."simple_stream_with_n__lting_into_long_names__dbt_tmp" - as ( - --- Final base SQL model -select - "id", - "date", - _airbyte_emitted_at, - _airbyte_simple_stre__nto_long_names_hashid -from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab3" --- simple_stream_with_n__lting_into_long_names from "postgres".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql deleted file mode 100644 index 77e7bd31c512..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as groups, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql deleted file mode 100644 index 683cf66727ac..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(groups as {{ dbt_utils.type_string() }}) as groups, - _airbyte_emitted_at -from {{ ref('conflict_stream_name___conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql deleted file mode 100644 index 16a089834117..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_2_hashid', - 'groups', - ]) }} as _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name___conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql deleted file mode 100644 index 1026b2100308..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index 020604d3bd83..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_ab1') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 54db283fd286..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab2') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index d6e2edb75ced..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 463a878933f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index b98fcff9e377..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_hashid', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index 95f08b861d80..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index cd0a70325db6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, - _airbyte_emitted_at -from {{ ref('conflict_stream_scalar_ab1') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index d80993da2177..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - 'conflict_stream_scalar', - ]) }} as _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab2') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index f0c218e7e7f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index 7dc4066c3d18..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, - cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ ref('dedup_cdc_excluded_ab1') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 8350a86ba290..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - adapter.quote('name'), - '_ab_cdc_lsn', - '_ab_cdc_updated_at', - '_ab_cdc_deleted_at', - ]) }} as _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab2') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index 4d4fe392fd7f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_cdc_excluded_ab3') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index 2703c06376ce..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index 20829aa2d465..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('dedup_exchange_rate_ab1') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index c345cd6dec77..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - 'currency', - adapter.quote('date'), - 'timestamp_col', - adapter.quote('HKD@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab2') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index f45c79d39e27..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_exchange_rate_ab3') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index a68cce687ef9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index ba1cfde6e9fc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('exchange_rate_ab1') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index 5933e055cdfe..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - 'currency', - adapter.quote('date'), - 'timestamp_col', - adapter.quote('HKD@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab2') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql deleted file mode 100644 index 11d7c57a019f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stre__nto_long_names_hashid, - {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, - {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as {{ adapter.quote('DATA') }}, - {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c__lting_into_long_names') }} as table_alias -where {{ adapter.quote('partition') }} is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql deleted file mode 100644 index d334fa9e3af9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stre__nto_long_names_hashid, - double_array_data, - {{ adapter.quote('DATA') }}, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c___long_names_partition_ab1') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql deleted file mode 100644 index 6bc58d187c30..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql +++ /dev/null @@ -1,13 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_nested_stre__nto_long_names_hashid', - array_to_string('double_array_data'), - array_to_string(adapter.quote('DATA')), - array_to_string(adapter.quote('column`_\'with""_quotes')), - ]) }} as _airbyte_partition_hashid -from {{ ref('nested_stream_with_c___long_names_partition_ab2') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql deleted file mode 100644 index 871d33d96ae1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', adapter.quote('DATA')) }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value(adapter.quote('DATA')), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', adapter.quote('DATA')) }} -where {{ adapter.quote('DATA') }} is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql deleted file mode 100644 index 4034a1495a09..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c___names_partition_data_ab1') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql deleted file mode 100644 index 6a037703c851..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_data_hashid -from {{ ref('nested_stream_with_c___names_partition_data_ab2') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql deleted file mode 100644 index 31ac76876f60..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', adapter.quote('column`_\'with""_quotes')) }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', adapter.quote('column`_\'with""_quotes')) }} -where {{ adapter.quote('column`_\'with""_quotes') }} is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql deleted file mode 100644 index 1f1d43c09a26..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c__column___with__quotes_ab1') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql deleted file mode 100644 index 0c1fce98e2fa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_c__column___with__quotes_ab2') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql deleted file mode 100644 index 83232f67277e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', 'double_array_data') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as {{ adapter.quote('id') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'double_array_data') }} -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql deleted file mode 100644 index bcaa8b5c53d5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c__ion_double_array_data_ab1') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql deleted file mode 100644 index c0d82b2cc088..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - adapter.quote('id'), - ]) }} as _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_c__ion_double_array_data_ab2') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql deleted file mode 100644 index 5888a043ab45..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias --- nested_stream_with_c__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql deleted file mode 100644 index 11d64cbafcba..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_c__lting_into_long_names_ab1') }} --- nested_stream_with_c__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql deleted file mode 100644 index cea3d1c14009..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - adapter.quote('date'), - adapter.quote('partition'), - ]) }} as _airbyte_nested_stre__nto_long_names_hashid -from {{ ref('nested_stream_with_c__lting_into_long_names_ab2') }} --- nested_stream_with_c__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql deleted file mode 100644 index c595e4843b36..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stre__nto_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('nested_stream_with_c__lting_into_long_names_ab3') }} --- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql deleted file mode 100644 index b844098ba9c0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias --- non_nested_stream_wi__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql deleted file mode 100644 index 5b3a3574bf40..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ ref('non_nested_stream_wi__lting_into_long_names_ab1') }} --- non_nested_stream_wi__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql deleted file mode 100644 index c85b860de737..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - adapter.quote('date'), - ]) }} as _airbyte_non_nested___nto_long_names_hashid -from {{ ref('non_nested_stream_wi__lting_into_long_names_ab2') }} --- non_nested_stream_wi__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql deleted file mode 100644 index 06a99b3588c8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias --- simple_stream_with_n__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql deleted file mode 100644 index 70077c18dbfc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, - cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, - _airbyte_emitted_at -from {{ ref('simple_stream_with_n__lting_into_long_names_ab1') }} --- simple_stream_with_n__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql deleted file mode 100644 index b4c949ec1447..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - adapter.quote('id'), - adapter.quote('date'), - ]) }} as _airbyte_simple_stre__nto_long_names_hashid -from {{ ref('simple_stream_with_n__lting_into_long_names_ab2') }} --- simple_stream_with_n__lting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index d174a85b7a46..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from {{ ref('conflict_stream_array_ab3') }} --- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 87a6ace1c885..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab3') }} --- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql deleted file mode 100644 index 7be580e5b59a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - groups, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name___conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 94a9dc3d0139..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index a36056903767..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab3') }} --- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 9e16abf78b39..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - {{ adapter.quote('name') }}, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_scd') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index e499de2f7614..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - {{ adapter.quote('id') }}, - {{ adapter.quote('name') }}, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by {{ adapter.quote('id') }} - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by {{ adapter.quote('id') }} - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab4') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 4079ce3f38ea..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_scd') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index 1a7f8e3bff5b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - {{ adapter.quote('id') }}, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - {{ adapter.quote('date') }} as _airbyte_start_at, - lag({{ adapter.quote('date') }}) over ( - partition by {{ adapter.quote('id') }}, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag({{ adapter.quote('date') }}) over ( - partition by {{ adapter.quote('id') }}, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab4') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index 886cca7c7e72..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,16 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - currency, - {{ adapter.quote('date') }}, - timestamp_col, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab3') }} --- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql deleted file mode 100644 index 32fac08a6d40..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_nested_stre__nto_long_names_hashid, - double_array_data, - {{ adapter.quote('DATA') }}, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at, - _airbyte_partition_hashid -from {{ ref('nested_stream_with_c___long_names_partition_ab3') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_c__lting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql deleted file mode 100644 index 9ba3d4c84f6e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from {{ ref('nested_stream_with_c___names_partition_data_ab3') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_c___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql deleted file mode 100644 index c5af87800f26..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_c__column___with__quotes_ab3') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_c___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql deleted file mode 100644 index 18d2b45b021d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - {{ adapter.quote('id') }}, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_c__ion_double_array_data_ab3') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_c___long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql deleted file mode 100644 index fb61f3ad1900..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - {{ adapter.quote('date') }}, - {{ adapter.quote('partition') }}, - _airbyte_emitted_at, - _airbyte_nested_stre__nto_long_names_hashid -from {{ ref('nested_stream_with_c__lting_into_long_names_scd') }} --- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql deleted file mode 100644 index 65a9d1507cdf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - {{ adapter.quote('id') }}, - {{ adapter.quote('date') }}, - {{ adapter.quote('partition') }}, - {{ adapter.quote('date') }} as _airbyte_start_at, - lag({{ adapter.quote('date') }}) over ( - partition by {{ adapter.quote('id') }} - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag({{ adapter.quote('date') }}) over ( - partition by {{ adapter.quote('id') }} - order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stre__nto_long_names_hashid -from {{ ref('nested_stream_with_c__lting_into_long_names_ab4') }} --- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql deleted file mode 100644 index f9fe1a5fdf4e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - {{ adapter.quote('date') }}, - _airbyte_emitted_at, - _airbyte_non_nested___nto_long_names_hashid -from {{ ref('non_nested_stream_wi__lting_into_long_names_ab3') }} --- non_nested_stream_wi__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql deleted file mode 100644 index 247047c0ec69..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} --- Final base SQL model -select - {{ adapter.quote('id') }}, - {{ adapter.quote('date') }}, - _airbyte_emitted_at, - _airbyte_simple_stre__nto_long_names_hashid -from {{ ref('simple_stream_with_n__lting_into_long_names_ab3') }} --- simple_stream_with_n__lting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml deleted file mode 100644 index 69352d59cdbb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -sources: -- name: test_normalization - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_conflict_stream_array - - name: _airbyte_raw_conflict_stream_name - - name: _airbyte_raw_conflict_stream_scalar - - name: _airbyte_raw_dedup_cdc_excluded - - name: _airbyte_raw_dedup_exchange_rate - - name: _airbyte_raw_exchange_rate - - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names -- name: test_normalization_namespace - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index f93f3e475165..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,48 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name_conflict_stream_name__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - case when json_extract_path_text(conflict_stream_name, 'groups', true) != '' then json_extract_path_text(conflict_stream_name, 'groups', true) end as groups, - _airbyte_emitted_at -from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(groups as varchar) as groups, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_conflict_stream_name_2_hashid as varchar), '') || '-' || coalesce(cast(groups as varchar), '') - - as varchar)) as _airbyte_conflict_stream_name_3_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name -)-- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - groups, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 4952f5f88bbf..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,49 +0,0 @@ - - - create table - "integrationtests".test_normalization."conflict_stream_scalar__dbt_tmp" - - - as ( - -with __dbt__CTE__conflict_stream_scalar_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) end as conflict_stream_scalar, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias --- conflict_stream_scalar -), __dbt__CTE__conflict_stream_scalar_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(conflict_stream_scalar as - bigint -) as conflict_stream_scalar, - _airbyte_emitted_at -from __dbt__CTE__conflict_stream_scalar_ab1 --- conflict_stream_scalar -), __dbt__CTE__conflict_stream_scalar_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_scalar as varchar), '') - - as varchar)) as _airbyte_conflict_stream_scalar_hashid -from __dbt__CTE__conflict_stream_scalar_ab2 --- conflict_stream_scalar -)-- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from __dbt__CTE__conflict_stream_scalar_ab3 --- conflict_stream_scalar from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 263022b9f315..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,21 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_cdc_excluded__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from "integrationtests".test_normalization."dedup_cdc_excluded_scd" --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index 41fdb87d9750..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,85 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" - - - as ( - -with __dbt__CTE__dedup_cdc_excluded_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'name', true) != '' then json_extract_path_text(_airbyte_data, 'name', true) end as name, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) end as _ab_cdc_lsn, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) end as _ab_cdc_updated_at, - case when json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) end as _ab_cdc_deleted_at, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(name as varchar) as name, - cast(_ab_cdc_lsn as - float -) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as - float -) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as - float -) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from __dbt__CTE__dedup_cdc_excluded_ab1 --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(name as varchar), '') || '-' || coalesce(cast(_ab_cdc_lsn as varchar), '') || '-' || coalesce(cast(_ab_cdc_updated_at as varchar), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as varchar), '') - - as varchar)) as _airbyte_dedup_cdc_excluded_hashid -from __dbt__CTE__dedup_cdc_excluded_ab2 --- dedup_cdc_excluded -), __dbt__CTE__dedup_cdc_excluded_ab4 as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from __dbt__CTE__dedup_cdc_excluded_ab3 --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from __dbt__CTE__dedup_cdc_excluded_ab4 --- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index 40056bcbbc47..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,24 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_exchange_rate__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from "integrationtests".test_normalization."dedup_exchange_rate_scd" --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index d9c4ccccbf8d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,98 +0,0 @@ - - - create table - "integrationtests".test_normalization."dedup_exchange_rate_scd__dbt_tmp" - - - as ( - -with __dbt__CTE__dedup_exchange_rate_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, - case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", - case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, - case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, - case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(currency as varchar) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("hkd@spéçiäl & characters" as - float -) as "hkd@spéçiäl & characters", - cast(hkd_special___characters as varchar) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from __dbt__CTE__dedup_exchange_rate_ab1 --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') - - as varchar)) as _airbyte_dedup_exchange_rate_hashid -from __dbt__CTE__dedup_exchange_rate_ab2 --- dedup_exchange_rate -), __dbt__CTE__dedup_exchange_rate_ab4 as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from __dbt__CTE__dedup_exchange_rate_ab3 --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - date as _airbyte_start_at, - lag(date) over ( - partition by id, currency, cast(nzd as varchar) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id, currency, cast(nzd as varchar) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from __dbt__CTE__dedup_exchange_rate_ab4 --- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate -where _airbyte_row_num = 1 - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index ef547faeed64..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,77 +0,0 @@ - - - create table - "integrationtests".test_normalization."exchange_rate__dbt_tmp" - - - as ( - -with __dbt__CTE__exchange_rate_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, - case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", - case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, - case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, - case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_exchange_rate as table_alias --- exchange_rate -), __dbt__CTE__exchange_rate_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as - bigint -) as id, - cast(currency as varchar) as currency, - cast(date as - date -) as date, - cast(timestamp_col as - timestamp with time zone -) as timestamp_col, - cast("hkd@spéçiäl & characters" as - float -) as "hkd@spéçiäl & characters", - cast(hkd_special___characters as varchar) as hkd_special___characters, - cast(nzd as - float -) as nzd, - cast(usd as - float -) as usd, - _airbyte_emitted_at -from __dbt__CTE__exchange_rate_ab1 --- exchange_rate -), __dbt__CTE__exchange_rate_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') - - as varchar)) as _airbyte_exchange_rate_hashid -from __dbt__CTE__exchange_rate_ab2 --- exchange_rate -)-- Final base SQL model -select - id, - currency, - date, - timestamp_col, - "hkd@spéçiäl & characters", - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from __dbt__CTE__exchange_rate_ab3 --- exchange_rate from "integrationtests".test_normalization._airbyte_raw_exchange_rate - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql deleted file mode 100644 index 7d2e8f10dc4e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql +++ /dev/null @@ -1,19 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names__dbt_tmp" - - - as ( - --- Final base SQL model -select - id, - date, - "partition", - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd" --- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names -where _airbyte_active_row = True - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql deleted file mode 100644 index 994439d9c0ea..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql +++ /dev/null @@ -1,54 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - json_extract_path_text("partition", 'double_array_data', true) as double_array_data, - json_extract_path_text("partition", 'DATA', true) as data, - json_extract_path_text("partition", 'column`_''with"_quotes', true) as "column`_'with""_quotes", - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" as table_alias -where "partition" is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - "column`_'with""_quotes", - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as varchar), '') || '-' || coalesce(cast(double_array_data as varchar), '') || '-' || coalesce(cast(data as varchar), '') || '-' || coalesce(cast("column`_'with""_quotes" as varchar), '') - - as varchar)) as _airbyte_partition_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition -)-- Final base SQL model -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - "column`_'with""_quotes", - _airbyte_emitted_at, - _airbyte_partition_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql deleted file mode 100644 index 909b535ee094..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text("column`_'with""_quotes", numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition."column`_'with""_quotes" - where numbers.generated_number <= json_array_length("column`_'with""_quotes", true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where "column`_'with""_quotes" is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as varchar) as currency, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') - - as varchar)) as _airbyte_column___with__quotes_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes -)-- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql deleted file mode 100644 index 4abaa0770943..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_data__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 1 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text(data, numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.data - where numbers.generated_number <= json_array_length(data, true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where data is not null --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as varchar) as currency, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') - - as varchar)) as _airbyte_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA -)-- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql deleted file mode 100644 index 34429d9d24f1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql +++ /dev/null @@ -1,93 +0,0 @@ - - - create table - "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data__dbt_tmp" - - - as ( - -with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -with numbers as ( - - - - - with p as ( - select 0 as generated_number union all select 1 - ), unioned as ( - - select - - - p0.generated_number * pow(2, 0) - - - + 1 - as generated_number - - from - - - p as p0 - - - - ) - - select * - from unioned - where generated_number <= 2 - order by generated_number - - -), -joined as ( - select - _airbyte_partition_hashid as _airbyte_hashid, - json_extract_array_element_text(double_array_data, numbers.generated_number::int - 1, true) as _airbyte_nested_data - from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - cross join numbers - -- only generate the number of records in the cross join that corresponds - -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.double_array_data - where numbers.generated_number <= json_array_length(double_array_data, true) -) -select - _airbyte_partition_hashid, - case when json_extract_path_text(_airbyte_nested_data, 'id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'id', true) end as id, - _airbyte_emitted_at -from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias -left join joined on _airbyte_partition_hashid = joined._airbyte_hashid -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as varchar) as id, - _airbyte_emitted_at -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(id as varchar), '') - - as varchar)) as _airbyte_double_array_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data -)-- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql deleted file mode 100644 index 3b7dd68e15e6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization."non_nested_stream_without_namespace_resulting_into_long_names__dbt_tmp" - - - as ( - -with __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - _airbyte_emitted_at -from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias --- non_nested_stream_without_namespace_resulting_into_long_names -), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(date as varchar) as date, - _airbyte_emitted_at -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 --- non_nested_stream_without_namespace_resulting_into_long_names -), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') - - as varchar)) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 --- non_nested_stream_without_namespace_resulting_into_long_names -)-- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 --- non_nested_stream_without_namespace_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql deleted file mode 100644 index adb67253b0a2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,47 +0,0 @@ - - - create table - "integrationtests".test_normalization_namespace."simple_stream_with_namespace_resulting_into_long_names__dbt_tmp" - - - as ( - -with __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, - case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, - _airbyte_emitted_at -from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias --- simple_stream_with_namespace_resulting_into_long_names -), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as varchar) as id, - cast(date as varchar) as date, - _airbyte_emitted_at -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 --- simple_stream_with_namespace_resulting_into_long_names -), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') - - as varchar)) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 --- simple_stream_with_namespace_resulting_into_long_names -)-- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 --- simple_stream_with_namespace_resulting_into_long_names from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names - ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql deleted file mode 100644 index 8556d7f50afb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql deleted file mode 100644 index a1d77f379bce..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_ab1') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql deleted file mode 100644 index 2592ce581df8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab2') }} --- conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index d6e2edb75ced..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_hashid, - {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 463a878933f8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_hashid, - cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index b98fcff9e377..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_hashid', - 'conflict_stream_name', - ]) }} as _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql deleted file mode 100644 index 77e7bd31c512..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_conflict_stream_name_2_hashid, - {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as groups, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias -where conflict_stream_name is not null --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql deleted file mode 100644 index 50d9169b110d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_conflict_stream_name_2_hashid, - cast(groups as {{ dbt_utils.type_string() }}) as groups, - _airbyte_emitted_at -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql deleted file mode 100644 index 3ac0805c02b6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_conflict_stream_name_2_hashid', - 'groups', - ]) }} as _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql deleted file mode 100644 index be57970e399e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql deleted file mode 100644 index cf0d9deb51cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, - _airbyte_emitted_at -from {{ ref('conflict_stream_scalar_ab1') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql deleted file mode 100644 index b718d36bb399..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'conflict_stream_scalar', - ]) }} as _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab2') }} --- conflict_stream_scalar - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql deleted file mode 100644 index 106a78e83df7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as name, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql deleted file mode 100644 index 1fe684c4026d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(name as {{ dbt_utils.type_string() }}) as name, - cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, - cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, - cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, - _airbyte_emitted_at -from {{ ref('dedup_cdc_excluded_ab1') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql deleted file mode 100644 index 3d994a17195d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'name', - '_ab_cdc_lsn', - '_ab_cdc_updated_at', - '_ab_cdc_deleted_at', - ]) }} as _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab2') }} --- dedup_cdc_excluded - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql deleted file mode 100644 index 4d4fe392fd7f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_cdc_excluded_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_cdc_excluded_ab3') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql deleted file mode 100644 index 5dcea3571341..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('hkd@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql deleted file mode 100644 index 832843fb80e4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(date as {{ type_date() }}) as date, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('hkd@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('hkd@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('dedup_exchange_rate_ab1') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql deleted file mode 100644 index 1e4e51d2d980..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - 'date', - 'timestamp_col', - adapter.quote('hkd@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab2') }} --- dedup_exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql deleted file mode 100644 index f45c79d39e27..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_dedup_exchange_rate_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('dedup_exchange_rate_ab3') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql deleted file mode 100644 index 70419151a6dc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('hkd@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql deleted file mode 100644 index f0ac7cba4911..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_bigint() }}) as id, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - cast(date as {{ type_date() }}) as date, - cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, - cast({{ adapter.quote('hkd@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('hkd@spéçiäl & characters') }}, - cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, - cast(nzd as {{ dbt_utils.type_float() }}) as nzd, - cast(usd as {{ dbt_utils.type_float() }}) as usd, - _airbyte_emitted_at -from {{ ref('exchange_rate_ab1') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql deleted file mode 100644 index 968f0388becb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'currency', - 'date', - 'timestamp_col', - adapter.quote('hkd@spéçiäl & characters'), - 'hkd_special___characters', - 'nzd', - 'usd', - ]) }} as _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab2') }} --- exchange_rate - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql deleted file mode 100644 index aaa4eb63f243..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql deleted file mode 100644 index 63bd774a716f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab1') }} --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql deleted file mode 100644 index 7d5fab4ab6a4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - adapter.quote('partition'), - ]) }} as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab2') }} --- nested_stream_with_complex_columns_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql deleted file mode 100644 index 8a2db82defcb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab3') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql deleted file mode 100644 index fb632de52d62..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, - {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as data, - {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias -where {{ adapter.quote('partition') }} is not null --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql deleted file mode 100644 index 7ade5b21f875..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql deleted file mode 100644 index b628b9dfa733..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql +++ /dev/null @@ -1,13 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid', - array_to_string('double_array_data'), - array_to_string('data'), - array_to_string(adapter.quote('column`_\'with""_quotes')), - ]) }} as _airbyte_partition_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql deleted file mode 100644 index 06114ee71d7e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', adapter.quote('column`_\'with""_quotes')) }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', adapter.quote('column`_\'with""_quotes')) }} -where {{ adapter.quote('column`_\'with""_quotes') }} is not null --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql deleted file mode 100644 index 076b4bfc975c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql deleted file mode 100644 index 36d43b45d0b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql deleted file mode 100644 index cfacb333734f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'data') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('data'), ['currency'], ['currency']) }} as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'data') }} -where data is not null --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql deleted file mode 100644 index b4092b9210a8..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(currency as {{ dbt_utils.type_string() }}) as currency, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1') }} --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql deleted file mode 100644 index 6fa8cfa6f06c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'currency', - ]) }} as _airbyte_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2') }} --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql deleted file mode 100644 index 48b7ea236ae1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'double_array_data') }} -select - _airbyte_partition_hashid, - {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias -{{ cross_join_unnest('partition', 'double_array_data') }} -where double_array_data is not null --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql deleted file mode 100644 index a3e29e92dfb7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _airbyte_partition_hashid, - cast(id as {{ dbt_utils.type_string() }}) as id, - _airbyte_emitted_at -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql deleted file mode 100644 index 269418d7250d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_airbyte_partition_hashid', - 'id', - ]) }} as _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index fd2fbdd54863..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - _airbyte_emitted_at -from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index e4ed8d075d22..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - _airbyte_emitted_at -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab1') }} --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index 55471ad5091e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - ]) }} as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab2') }} --- non_nested_stream_without_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql deleted file mode 100644 index e3ec7ffd2f82..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, - _airbyte_emitted_at -from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql deleted file mode 100644 index c437ca698089..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(id as {{ dbt_utils.type_string() }}) as id, - cast(date as {{ dbt_utils.type_string() }}) as date, - _airbyte_emitted_at -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab1') }} --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql deleted file mode 100644 index 05770b856f50..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'id', - 'date', - ]) }} as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab2') }} --- simple_stream_with_namespace_resulting_into_long_names - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql deleted file mode 100644 index 9ffda6086e35..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_array, - _airbyte_emitted_at, - _airbyte_conflict_stream_array_hashid -from {{ ref('conflict_stream_array_ab3') }} --- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql deleted file mode 100644 index 8a83ccc01e31..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_hashid -from {{ ref('conflict_stream_name_ab3') }} --- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 94a9dc3d0139..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_hashid, - conflict_stream_name, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_2_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql deleted file mode 100644 index 1a5bd998fa99..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_conflict_stream_name_2_hashid, - groups, - _airbyte_emitted_at, - _airbyte_conflict_stream_name_3_hashid -from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3') }} --- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql deleted file mode 100644 index 9d7acc846fd0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - conflict_stream_scalar, - _airbyte_emitted_at, - _airbyte_conflict_stream_scalar_hashid -from {{ ref('conflict_stream_scalar_ab3') }} --- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql deleted file mode 100644 index 87007e001559..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_scd') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql deleted file mode 100644 index f23636879592..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - name, - _ab_cdc_lsn, - _ab_cdc_updated_at, - _ab_cdc_deleted_at, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by id - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_cdc_excluded_hashid -from {{ ref('dedup_cdc_excluded_ab4') }} --- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql deleted file mode 100644 index f85b4a17e26e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - {{ adapter.quote('hkd@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_scd') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql deleted file mode 100644 index ea50b6fddefc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - currency, - date, - timestamp_col, - {{ adapter.quote('hkd@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - date as _airbyte_start_at, - lag(date) over ( - partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_dedup_exchange_rate_hashid -from {{ ref('dedup_exchange_rate_ab4') }} --- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql deleted file mode 100644 index ffe5cafe5e4b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql +++ /dev/null @@ -1,16 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - currency, - date, - timestamp_col, - {{ adapter.quote('hkd@spéçiäl & characters') }}, - hkd_special___characters, - nzd, - usd, - _airbyte_emitted_at, - _airbyte_exchange_rate_hashid -from {{ ref('exchange_rate_ab3') }} --- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql deleted file mode 100644 index d03125b32542..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - {{ adapter.quote('partition') }}, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_scd') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql deleted file mode 100644 index 8e228ffad1ab..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, - double_array_data, - data, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at, - _airbyte_partition_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3') }} --- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql deleted file mode 100644 index 2bd228318b0d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_column___with__quotes_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3') }} --- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql deleted file mode 100644 index bdcfcf86eb2e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - currency, - _airbyte_emitted_at, - _airbyte_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3') }} --- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql deleted file mode 100644 index 50b39ee05b38..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["nested"]) }} --- Final base SQL model -select - _airbyte_partition_hashid, - id, - _airbyte_emitted_at, - _airbyte_double_array_data_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3') }} --- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql deleted file mode 100644 index d9c12b8eb43a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - id, - date, - {{ adapter.quote('partition') }}, - date as _airbyte_start_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(date) over ( - partition by id - order by date is null asc, date desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid -from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab4') }} --- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql deleted file mode 100644 index 1004a9e2f4a4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid -from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab3') }} --- non_nested_stream_without_namespace_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql deleted file mode 100644 index ce74645f7864..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} --- Final base SQL model -select - id, - date, - _airbyte_emitted_at, - _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid -from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab3') }} --- simple_stream_with_namespace_resulting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml deleted file mode 100644 index 69352d59cdbb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -sources: -- name: test_normalization - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_conflict_stream_array - - name: _airbyte_raw_conflict_stream_name - - name: _airbyte_raw_conflict_stream_scalar - - name: _airbyte_raw_dedup_cdc_excluded - - name: _airbyte_raw_dedup_exchange_rate - - name: _airbyte_raw_exchange_rate - - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names -- name: test_normalization_namespace - quoting: - database: true - schema: false - identifier: false - tables: - - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql deleted file mode 100644 index 1624de361728..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(CONFLICT_STREAM_ARRAY as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB2" --- CONFLICT_STREAM_ARRAY - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index e16d92665cb6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - get_path(parse_json(table_alias._airbyte_data), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_NAME as table_alias --- CONFLICT_STREAM_NAME - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index dac8751ac0e0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - varchar -) as ID, - cast(CONFLICT_STREAM_NAME as - variant -) as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB1" --- CONFLICT_STREAM_NAME - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index 30c53fc98bdc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(CONFLICT_STREAM_NAME as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB2" --- CONFLICT_STREAM_NAME - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index 81c068e3bc7e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - get_path(parse_json(table_alias.CONFLICT_STREAM_NAME), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" as table_alias -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 94b8b0625d80..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - cast(CONFLICT_STREAM_NAME as - variant -) as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index 2f42a0e16d1f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_CONFLICT_STREAM_NAME_HASHID as - varchar -), '') || '-' || coalesce(cast(CONFLICT_STREAM_NAME as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index c2d398d9523f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - to_varchar(get_path(parse_json(CONFLICT_STREAM_NAME), '"groups"')) as GROUPS, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as table_alias -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 8ceb7e28a3d7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - cast(GROUPS as - varchar -) as GROUPS, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index d4410dd1c52a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID as - varchar -), '') || '-' || coalesce(cast(GROUPS as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql deleted file mode 100644 index 14044ac63567..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"conflict_stream_scalar"')) as CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_SCALAR as table_alias --- CONFLICT_STREAM_SCALAR - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql deleted file mode 100644 index e5afae550b7c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - varchar -) as ID, - cast(CONFLICT_STREAM_SCALAR as - bigint -) as CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB1" --- CONFLICT_STREAM_SCALAR - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql deleted file mode 100644 index 731b5e9551b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(CONFLICT_STREAM_SCALAR as - varchar -), '') - - as - varchar -)) as _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB2" --- CONFLICT_STREAM_SCALAR - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql deleted file mode 100644 index 72b91ec9ee4a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"name"')) as NAME, - to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_lsn"')) as _AB_CDC_LSN, - to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_updated_at"')) as _AB_CDC_UPDATED_AT, - to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_deleted_at"')) as _AB_CDC_DELETED_AT, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED as table_alias --- DEDUP_CDC_EXCLUDED - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql deleted file mode 100644 index efa7ccb027b4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql +++ /dev/null @@ -1,24 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - bigint -) as ID, - cast(NAME as - varchar -) as NAME, - cast(_AB_CDC_LSN as - float -) as _AB_CDC_LSN, - cast(_AB_CDC_UPDATED_AT as - float -) as _AB_CDC_UPDATED_AT, - cast(_AB_CDC_DELETED_AT as - float -) as _AB_CDC_DELETED_AT, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB1" --- DEDUP_CDC_EXCLUDED - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql deleted file mode 100644 index 2025282186cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql +++ /dev/null @@ -1,26 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(NAME as - varchar -), '') || '-' || coalesce(cast(_AB_CDC_LSN as - varchar -), '') || '-' || coalesce(cast(_AB_CDC_UPDATED_AT as - varchar -), '') || '-' || coalesce(cast(_AB_CDC_DELETED_AT as - varchar -), '') - - as - varchar -)) as _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB2" --- DEDUP_CDC_EXCLUDED - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql deleted file mode 100644 index 67d223a56b78..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB4" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB3" --- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql deleted file mode 100644 index 3fe55233ade2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql +++ /dev/null @@ -1,17 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"currency"')) as CURRENCY, - to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - to_varchar(get_path(parse_json(_airbyte_data), '"timestamp_col"')) as TIMESTAMP_COL, - to_varchar(get_path(parse_json(_airbyte_data), '"HKD@spéçiäl & characters"')) as "HKD@spéçiäl & characters", - to_varchar(get_path(parse_json(_airbyte_data), '"HKD_special___characters"')) as HKD_SPECIAL___CHARACTERS, - to_varchar(get_path(parse_json(_airbyte_data), '"NZD"')) as NZD, - to_varchar(get_path(parse_json(_airbyte_data), '"USD"')) as USD, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE as table_alias --- DEDUP_EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql deleted file mode 100644 index 374d277971b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql +++ /dev/null @@ -1,33 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - bigint -) as ID, - cast(CURRENCY as - varchar -) as CURRENCY, - cast(DATE as - date -) as DATE, - cast(TIMESTAMP_COL as - timestamp with time zone -) as TIMESTAMP_COL, - cast("HKD@spéçiäl & characters" as - float -) as "HKD@spéçiäl & characters", - cast(HKD_SPECIAL___CHARACTERS as - varchar -) as HKD_SPECIAL___CHARACTERS, - cast(NZD as - float -) as NZD, - cast(USD as - float -) as USD, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB1" --- DEDUP_EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql deleted file mode 100644 index dc6ae926c16e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql +++ /dev/null @@ -1,32 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(CURRENCY as - varchar -), '') || '-' || coalesce(cast(DATE as - varchar -), '') || '-' || coalesce(cast(TIMESTAMP_COL as - varchar -), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as - varchar -), '') || '-' || coalesce(cast(HKD_SPECIAL___CHARACTERS as - varchar -), '') || '-' || coalesce(cast(NZD as - varchar -), '') || '-' || coalesce(cast(USD as - varchar -), '') - - as - varchar -)) as _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB2" --- DEDUP_EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql deleted file mode 100644 index 2a37d2225993..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB4" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB3" --- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql deleted file mode 100644 index 6d937d699b77..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql +++ /dev/null @@ -1,17 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"currency"')) as CURRENCY, - to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - to_varchar(get_path(parse_json(_airbyte_data), '"timestamp_col"')) as TIMESTAMP_COL, - to_varchar(get_path(parse_json(_airbyte_data), '"HKD@spéçiäl & characters"')) as "HKD@spéçiäl & characters", - to_varchar(get_path(parse_json(_airbyte_data), '"HKD_special___characters"')) as HKD_SPECIAL___CHARACTERS, - to_varchar(get_path(parse_json(_airbyte_data), '"NZD"')) as NZD, - to_varchar(get_path(parse_json(_airbyte_data), '"USD"')) as USD, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_EXCHANGE_RATE as table_alias --- EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql deleted file mode 100644 index d7527385ea08..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql +++ /dev/null @@ -1,33 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - bigint -) as ID, - cast(CURRENCY as - varchar -) as CURRENCY, - cast(DATE as - date -) as DATE, - cast(TIMESTAMP_COL as - timestamp with time zone -) as TIMESTAMP_COL, - cast("HKD@spéçiäl & characters" as - float -) as "HKD@spéçiäl & characters", - cast(HKD_SPECIAL___CHARACTERS as - varchar -) as HKD_SPECIAL___CHARACTERS, - cast(NZD as - float -) as NZD, - cast(USD as - float -) as USD, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB1" --- EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql deleted file mode 100644 index 8b0695eac2f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql +++ /dev/null @@ -1,32 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(CURRENCY as - varchar -), '') || '-' || coalesce(cast(DATE as - varchar -), '') || '-' || coalesce(cast(TIMESTAMP_COL as - varchar -), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as - varchar -), '') || '-' || coalesce(cast(HKD_SPECIAL___CHARACTERS as - varchar -), '') || '-' || coalesce(cast(NZD as - varchar -), '') || '-' || coalesce(cast(USD as - varchar -), '') - - as - varchar -)) as _AIRBYTE_EXCHANGE_RATE_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" --- EXCHANGE_RATE - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index 3d098f58376f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - get_path(parse_json(table_alias._airbyte_data), '"partition"') as PARTITION, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES as table_alias --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index 17165d85e92a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,18 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - varchar -) as ID, - cast(DATE as - varchar -) as DATE, - cast(PARTITION as - variant -) as PARTITION, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1" --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index 4e0accb03871..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,22 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(DATE as - varchar -), '') || '-' || coalesce(cast(PARTITION as - varchar -), '') - - as - varchar -)) as _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2" --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql deleted file mode 100644 index e2edd4d14e6b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4" as ( - --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3" --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql deleted file mode 100644 index 182331f48034..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - get_path(parse_json(PARTITION), '"double_array_data"') as DOUBLE_ARRAY_DATA, - get_path(parse_json(PARTITION), '"DATA"') as DATA, - get_path(parse_json(PARTITION), '"column`_''with""_quotes"') as "column`_'with""_quotes", - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" as table_alias -where PARTITION is not null --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql deleted file mode 100644 index adbb85ffe41c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - DOUBLE_ARRAY_DATA, - DATA, - "column`_'with""_quotes", - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1" --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql deleted file mode 100644 index 06a2ebfd39af..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql +++ /dev/null @@ -1,24 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID as - varchar -), '') || '-' || coalesce(cast(DOUBLE_ARRAY_DATA as - varchar -), '') || '-' || coalesce(cast(DATA as - varchar -), '') || '-' || coalesce(cast("column`_'with""_quotes" as - varchar -), '') - - as - varchar -)) as _AIRBYTE_PARTITION_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2" --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql deleted file mode 100644 index b3e0c89e6fd6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _AIRBYTE_PARTITION_HASHID, - to_varchar(get_path(parse_json("column`_'with""_quotes".value), '"currency"')) as CURRENCY, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias -cross join table(flatten("column`_'with""_quotes")) as "column`_'with""_quotes" -where "column`_'with""_quotes" is not null --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql deleted file mode 100644 index 17f8d3cefc54..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(CURRENCY as - varchar -) as CURRENCY, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1" --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql deleted file mode 100644 index be6501519680..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_PARTITION_HASHID as - varchar -), '') || '-' || coalesce(cast(CURRENCY as - varchar -), '') - - as - varchar -)) as _AIRBYTE_COLUMN___WITH__QUOTES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2" --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql deleted file mode 100644 index c7c087d01f3a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _AIRBYTE_PARTITION_HASHID, - to_varchar(get_path(parse_json(DATA.value), '"currency"')) as CURRENCY, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias -cross join table(flatten(DATA)) as DATA -where DATA is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql deleted file mode 100644 index 0c2a5300ddc3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(CURRENCY as - varchar -) as CURRENCY, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql deleted file mode 100644 index d2ebb15e5656..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_PARTITION_HASHID as - varchar -), '') || '-' || coalesce(cast(CURRENCY as - varchar -), '') - - as - varchar -)) as _AIRBYTE_DATA_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql deleted file mode 100644 index 6f3d464004dd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql +++ /dev/null @@ -1,14 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema - -select - _AIRBYTE_PARTITION_HASHID, - to_varchar(get_path(parse_json(DOUBLE_ARRAY_DATA.value), '"id"')) as ID, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias -cross join table(flatten(DOUBLE_ARRAY_DATA)) as DOUBLE_ARRAY_DATA -where DOUBLE_ARRAY_DATA is not null --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql deleted file mode 100644 index e06ee3336358..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql +++ /dev/null @@ -1,13 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(ID as - varchar -) as ID, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1" --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql deleted file mode 100644 index 71594aa6f8c4..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(_AIRBYTE_PARTITION_HASHID as - varchar -), '') || '-' || coalesce(cast(ID as - varchar -), '') - - as - varchar -)) as _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2" --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index e01276131049..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES as table_alias --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index ed36be213b3d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - varchar -) as ID, - cast(DATE as - varchar -) as DATE, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index e2cf19b76da7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(DATE as - varchar -), '') - - as - varchar -)) as _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index 217823deae76..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,11 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" as ( - --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - _airbyte_emitted_at -from "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE._AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES as table_alias --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index 77f512a6761e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" as ( - --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as - varchar -) as ID, - cast(DATE as - varchar -) as DATE, - _airbyte_emitted_at -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index 8a8de3895594..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,20 +0,0 @@ - - create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" as ( - --- SQL model to build a hash column based on the values of this record -select - *, - md5(cast( - - coalesce(cast(ID as - varchar -), '') || '-' || coalesce(cast(DATE as - varchar -), '') - - as - varchar -)) as _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql deleted file mode 100644 index fda185b2d549..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY" as - ( --- Final base SQL model -select - ID, - CONFLICT_STREAM_ARRAY, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB3" --- CONFLICT_STREAM_ARRAY from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_ARRAY - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql deleted file mode 100644 index 8b22cad2ccaa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" as - ( --- Final base SQL model -select - ID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB3" --- CONFLICT_STREAM_NAME from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_NAME - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index 3798cfcf838b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as - ( --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index f187c1dbe4cb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as - ( --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - GROUPS, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql deleted file mode 100644 index 51416677781d..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR" as - ( --- Final base SQL model -select - ID, - CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB3" --- CONFLICT_STREAM_SCALAR from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_SCALAR - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql deleted file mode 100644 index ea5d0d3adb68..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql +++ /dev/null @@ -1,18 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED" as - ( --- Final base SQL model -select - ID, - NAME, - _AB_CDC_LSN, - _AB_CDC_UPDATED_AT, - _AB_CDC_DELETED_AT, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_SCD" --- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql deleted file mode 100644 index 81ec2c3f7564..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql +++ /dev/null @@ -1,27 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_SCD" as - ( --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - NAME, - _AB_CDC_LSN, - _AB_CDC_UPDATED_AT, - _AB_CDC_DELETED_AT, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by ID - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by ID - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB4" --- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql deleted file mode 100644 index 59483af860f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql +++ /dev/null @@ -1,21 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE" as - ( --- Final base SQL model -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - "HKD@spéçiäl & characters", - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_SCD" --- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql deleted file mode 100644 index 3c167da0db1a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql +++ /dev/null @@ -1,34 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_SCD" as - ( --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - "HKD@spéçiäl & characters", - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - DATE as _airbyte_start_at, - lag(DATE) over ( - partition by ID, CURRENCY, cast(NZD as - varchar -) - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(DATE) over ( - partition by ID, CURRENCY, cast(NZD as - varchar -) - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB4" --- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql deleted file mode 100644 index 67c88ae1732c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql +++ /dev/null @@ -1,20 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."EXCHANGE_RATE" as - ( --- Final base SQL model -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - "HKD@spéçiäl & characters", - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - _airbyte_emitted_at, - _AIRBYTE_EXCHANGE_RATE_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB3" --- EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_EXCHANGE_RATE - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index 51b796dafebe..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" as - ( --- Final base SQL model -select - ID, - DATE, - PARTITION, - _airbyte_emitted_at, - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD" --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES -where _airbyte_active_row = True - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql deleted file mode 100644 index 74c83e8d1b20..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql +++ /dev/null @@ -1,16 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as - ( --- Final base SQL model -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - DOUBLE_ARRAY_DATA, - DATA, - "column`_'with""_quotes", - _airbyte_emitted_at, - _AIRBYTE_PARTITION_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3" --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql deleted file mode 100644 index 3ac4fdb6fc1f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES" as - ( --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - CURRENCY, - _airbyte_emitted_at, - _AIRBYTE_COLUMN___WITH__QUOTES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3" --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql deleted file mode 100644 index 14e9123ace37..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA" as - ( --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - CURRENCY, - _airbyte_emitted_at, - _AIRBYTE_DATA_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3" --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql deleted file mode 100644 index 0981c7e78337..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA" as - ( --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - ID, - _airbyte_emitted_at, - _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3" --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql deleted file mode 100644 index 7bd28037cafd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql +++ /dev/null @@ -1,25 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD" as - ( --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - DATE, - PARTITION, - DATE as _airbyte_start_at, - lag(DATE) over ( - partition by ID - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(DATE) over ( - partition by ID - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4" --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES -where _airbyte_row_num = 1 - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index a32321dc5b2e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES" as - ( --- Final base SQL model -select - ID, - DATE, - _airbyte_emitted_at, - _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index aafa343a9aef..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,14 +0,0 @@ - - - create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES" as - ( --- Final base SQL model -select - ID, - DATE, - _airbyte_emitted_at, - _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE._AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - ); - \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index d9c3c5ece29b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_NAME') }} as table_alias --- CONFLICT_STREAM_NAME - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 658733e93e46..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(CONFLICT_STREAM_NAME as {{ type_json() }}) as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_NAME_AB1') }} --- CONFLICT_STREAM_NAME - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index dc6b7d0ac1b5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'CONFLICT_STREAM_NAME', - ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from {{ ref('CONFLICT_STREAM_NAME_AB2') }} --- CONFLICT_STREAM_NAME - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index 3d7ee0255419..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - {{ json_extract('table_alias', 'CONFLICT_STREAM_NAME', ['conflict_stream_name'], ['conflict_stream_name']) }} as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_NAME') }} as table_alias -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 1a07c44314dc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - cast(CONFLICT_STREAM_NAME as {{ type_json() }}) as CONFLICT_STREAM_NAME, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index 98a307107ce3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_CONFLICT_STREAM_NAME_HASHID', - 'CONFLICT_STREAM_NAME', - ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql deleted file mode 100644 index 57dac03cd7b5..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - {{ json_extract_scalar('CONFLICT_STREAM_NAME', ['groups'], ['groups']) }} as GROUPS, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME') }} as table_alias -where CONFLICT_STREAM_NAME is not null --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql deleted file mode 100644 index 45eb156dc9a7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - cast(GROUPS as {{ dbt_utils.type_string() }}) as GROUPS, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql deleted file mode 100644 index dfa05de7a7da..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID', - 'GROUPS', - ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql deleted file mode 100644 index 06063e7a657b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_SCALAR') }} as table_alias --- CONFLICT_STREAM_SCALAR - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql deleted file mode 100644 index 163caca1379f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(CONFLICT_STREAM_SCALAR as {{ dbt_utils.type_bigint() }}) as CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at -from {{ ref('CONFLICT_STREAM_SCALAR_AB1') }} --- CONFLICT_STREAM_SCALAR - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql deleted file mode 100644 index 8d0112afaabe..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'CONFLICT_STREAM_SCALAR', - ]) }} as _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID -from {{ ref('CONFLICT_STREAM_SCALAR_AB2') }} --- CONFLICT_STREAM_SCALAR - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql deleted file mode 100644 index 1633f41e1d43..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as NAME, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _AB_CDC_LSN, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _AB_CDC_UPDATED_AT, - {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _AB_CDC_DELETED_AT, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} as table_alias --- DEDUP_CDC_EXCLUDED - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql deleted file mode 100644 index e26f3899f3b1..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_bigint() }}) as ID, - cast(NAME as {{ dbt_utils.type_string() }}) as NAME, - cast(_AB_CDC_LSN as {{ dbt_utils.type_float() }}) as _AB_CDC_LSN, - cast(_AB_CDC_UPDATED_AT as {{ dbt_utils.type_float() }}) as _AB_CDC_UPDATED_AT, - cast(_AB_CDC_DELETED_AT as {{ dbt_utils.type_float() }}) as _AB_CDC_DELETED_AT, - _airbyte_emitted_at -from {{ ref('DEDUP_CDC_EXCLUDED_AB1') }} --- DEDUP_CDC_EXCLUDED - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql deleted file mode 100644 index 7117ccf7aca3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'NAME', - '_AB_CDC_LSN', - '_AB_CDC_UPDATED_AT', - '_AB_CDC_DELETED_AT', - ]) }} as _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from {{ ref('DEDUP_CDC_EXCLUDED_AB2') }} --- DEDUP_CDC_EXCLUDED - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql deleted file mode 100644 index 1a0739aabb35..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('DEDUP_CDC_EXCLUDED_AB3') }} --- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql deleted file mode 100644 index 36ca15afc1b3..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as CURRENCY, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as TIMESTAMP_COL, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_SPECIAL___CHARACTERS, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} as table_alias --- DEDUP_EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql deleted file mode 100644 index 11fc7357edcb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_bigint() }}) as ID, - cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, - cast(DATE as {{ type_date() }}) as DATE, - cast(TIMESTAMP_COL as {{ type_timestamp_with_timezone() }}) as TIMESTAMP_COL, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(HKD_SPECIAL___CHARACTERS as {{ dbt_utils.type_string() }}) as HKD_SPECIAL___CHARACTERS, - cast(NZD as {{ dbt_utils.type_float() }}) as NZD, - cast(USD as {{ dbt_utils.type_float() }}) as USD, - _airbyte_emitted_at -from {{ ref('DEDUP_EXCHANGE_RATE_AB1') }} --- DEDUP_EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql deleted file mode 100644 index 18fac26b5ae7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'CURRENCY', - 'DATE', - 'TIMESTAMP_COL', - adapter.quote('HKD@spéçiäl & characters'), - 'HKD_SPECIAL___CHARACTERS', - 'NZD', - 'USD', - ]) }} as _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from {{ ref('DEDUP_EXCHANGE_RATE_AB2') }} --- DEDUP_EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql deleted file mode 100644 index 2bbbd5c9012c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('DEDUP_EXCHANGE_RATE_AB3') }} --- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql deleted file mode 100644 index 18c8ddd97d14..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as CURRENCY, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, - {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as TIMESTAMP_COL, - {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, - {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_SPECIAL___CHARACTERS, - {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, - {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_EXCHANGE_RATE') }} as table_alias --- EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql deleted file mode 100644 index 050d2ac313ea..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql +++ /dev/null @@ -1,15 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_bigint() }}) as ID, - cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, - cast(DATE as {{ type_date() }}) as DATE, - cast(TIMESTAMP_COL as {{ type_timestamp_with_timezone() }}) as TIMESTAMP_COL, - cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, - cast(HKD_SPECIAL___CHARACTERS as {{ dbt_utils.type_string() }}) as HKD_SPECIAL___CHARACTERS, - cast(NZD as {{ dbt_utils.type_float() }}) as NZD, - cast(USD as {{ dbt_utils.type_float() }}) as USD, - _airbyte_emitted_at -from {{ ref('EXCHANGE_RATE_AB1') }} --- EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql deleted file mode 100644 index 02258b1e1a70..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'CURRENCY', - 'DATE', - 'TIMESTAMP_COL', - adapter.quote('HKD@spéçiäl & characters'), - 'HKD_SPECIAL___CHARACTERS', - 'NZD', - 'USD', - ]) }} as _AIRBYTE_EXCHANGE_RATE_HASHID -from {{ ref('EXCHANGE_RATE_AB2') }} --- EXCHANGE_RATE - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index 90adf07fca8c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, - {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as PARTITION, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} as table_alias --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index 16dd9a71075a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(DATE as {{ dbt_utils.type_string() }}) as DATE, - cast(PARTITION as {{ type_json() }}) as PARTITION, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1') }} --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index 058cdc04fb64..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'DATE', - 'PARTITION', - ]) }} as _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2') }} --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql deleted file mode 100644 index c8edcebe3b2b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to prepare for deduplicating records based on the hash record column -select - *, - row_number() over ( - partition by _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID - order by _airbyte_emitted_at asc - ) as _airbyte_row_num -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3') }} --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql deleted file mode 100644 index acf63e332f16..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - {{ json_extract_array('PARTITION', ['double_array_data'], ['double_array_data']) }} as DOUBLE_ARRAY_DATA, - {{ json_extract_array('PARTITION', ['DATA'], ['DATA']) }} as DATA, - {{ json_extract_array('PARTITION', ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} as table_alias -where PARTITION is not null --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql deleted file mode 100644 index ab9627d3858a..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - DOUBLE_ARRAY_DATA, - DATA, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1') }} --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql deleted file mode 100644 index 73434fcf1550..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql +++ /dev/null @@ -1,13 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID', - array_to_string('DOUBLE_ARRAY_DATA'), - array_to_string('DATA'), - array_to_string(adapter.quote('column`_\'with""_quotes')), - ]) }} as _AIRBYTE_PARTITION_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2') }} --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql deleted file mode 100644 index 30d6e347c219..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', adapter.quote('column`_\'with""_quotes')) }} -select - _AIRBYTE_PARTITION_HASHID, - {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as CURRENCY, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias -{{ cross_join_unnest('PARTITION', adapter.quote('column`_\'with""_quotes')) }} -where {{ adapter.quote('column`_\'with""_quotes') }} is not null --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql deleted file mode 100644 index 1f1eefc05b43..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1') }} --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql deleted file mode 100644 index 60b863aedf68..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_PARTITION_HASHID', - 'CURRENCY', - ]) }} as _AIRBYTE_COLUMN___WITH__QUOTES_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2') }} --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql deleted file mode 100644 index b66c21e831d9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', 'DATA') }} -select - _AIRBYTE_PARTITION_HASHID, - {{ json_extract_scalar(unnested_column_value('DATA'), ['currency'], ['currency']) }} as CURRENCY, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias -{{ cross_join_unnest('PARTITION', 'DATA') }} -where DATA is not null --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql deleted file mode 100644 index f4179f4eb1b6..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql deleted file mode 100644 index e06e62a24f2b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_PARTITION_HASHID', - 'CURRENCY', - ]) }} as _AIRBYTE_DATA_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql deleted file mode 100644 index 777160d23295..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', 'DOUBLE_ARRAY_DATA') }} -select - _AIRBYTE_PARTITION_HASHID, - {{ json_extract_scalar(unnested_column_value('DOUBLE_ARRAY_DATA'), ['id'], ['id']) }} as ID, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias -{{ cross_join_unnest('PARTITION', 'DOUBLE_ARRAY_DATA') }} -where DOUBLE_ARRAY_DATA is not null --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql deleted file mode 100644 index 0f3d482dd494..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - _AIRBYTE_PARTITION_HASHID, - cast(ID as {{ dbt_utils.type_string() }}) as ID, - _airbyte_emitted_at -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1') }} --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql deleted file mode 100644 index 97328bd1e7e9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - '_AIRBYTE_PARTITION_HASHID', - 'ID', - ]) }} as _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2') }} --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index b2b6ec858d46..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} as table_alias --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index 2ad3d5394114..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(DATE as {{ dbt_utils.type_string() }}) as DATE, - _airbyte_emitted_at -from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1') }} --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index b5212e7b74cd..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'DATE', - ]) }} as _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2') }} --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql deleted file mode 100644 index a1710dd78111..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} --- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema -select - {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, - {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, - _airbyte_emitted_at -from {{ source('TEST_NORMALIZATION_NAMESPACE', '_AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} as table_alias --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql deleted file mode 100644 index 26e3b008f2a7..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql +++ /dev/null @@ -1,9 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} --- SQL model to cast each column to its adequate SQL type converted from the JSON schema type -select - cast(ID as {{ dbt_utils.type_string() }}) as ID, - cast(DATE as {{ dbt_utils.type_string() }}) as DATE, - _airbyte_emitted_at -from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1') }} --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql deleted file mode 100644 index 0138534102f0..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql +++ /dev/null @@ -1,11 +0,0 @@ -{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} --- SQL model to build a hash column based on the values of this record -select - *, - {{ dbt_utils.surrogate_key([ - 'ID', - 'DATE', - ]) }} as _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2') }} --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql deleted file mode 100644 index 30a90024e7cc..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - CONFLICT_STREAM_ARRAY, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID -from {{ ref('CONFLICT_STREAM_ARRAY_AB3') }} --- CONFLICT_STREAM_ARRAY from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_ARRAY') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql deleted file mode 100644 index 84c242ac436b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID -from {{ ref('CONFLICT_STREAM_NAME_AB3') }} --- CONFLICT_STREAM_NAME from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_NAME') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index 899be47a89de..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - CONFLICT_STREAM_NAME, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name from {{ ref('CONFLICT_STREAM_NAME') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql deleted file mode 100644 index f133924a7f8b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, - GROUPS, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID -from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3') }} --- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql deleted file mode 100644 index aa3d8675468e..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - CONFLICT_STREAM_SCALAR, - _airbyte_emitted_at, - _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID -from {{ ref('CONFLICT_STREAM_SCALAR_AB3') }} --- CONFLICT_STREAM_SCALAR from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_SCALAR') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql deleted file mode 100644 index 50908622050f..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql +++ /dev/null @@ -1,14 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - NAME, - _AB_CDC_LSN, - _AB_CDC_UPDATED_AT, - _AB_CDC_DELETED_AT, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from {{ ref('DEDUP_CDC_EXCLUDED_SCD') }} --- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql deleted file mode 100644 index 8903da01bbcb..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql +++ /dev/null @@ -1,23 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - NAME, - _AB_CDC_LSN, - _AB_CDC_UPDATED_AT, - _AB_CDC_DELETED_AT, - _airbyte_emitted_at as _airbyte_start_at, - lag(_airbyte_emitted_at) over ( - partition by ID - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(_airbyte_emitted_at) over ( - partition by ID - order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc - ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID -from {{ ref('DEDUP_CDC_EXCLUDED_AB4') }} --- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql deleted file mode 100644 index a90e43b18289..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql +++ /dev/null @@ -1,17 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from {{ ref('DEDUP_EXCHANGE_RATE_SCD') }} --- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql deleted file mode 100644 index cba34b5a4d68..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql +++ /dev/null @@ -1,26 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - DATE as _airbyte_start_at, - lag(DATE) over ( - partition by ID, CURRENCY, cast(NZD as {{ dbt_utils.type_string() }}) - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(DATE) over ( - partition by ID, CURRENCY, cast(NZD as {{ dbt_utils.type_string() }}) - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID -from {{ ref('DEDUP_EXCHANGE_RATE_AB4') }} --- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql deleted file mode 100644 index 5bc9dea3e852..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql +++ /dev/null @@ -1,16 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - CURRENCY, - DATE, - TIMESTAMP_COL, - {{ adapter.quote('HKD@spéçiäl & characters') }}, - HKD_SPECIAL___CHARACTERS, - NZD, - USD, - _airbyte_emitted_at, - _AIRBYTE_EXCHANGE_RATE_HASHID -from {{ ref('EXCHANGE_RATE_AB3') }} --- EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_EXCHANGE_RATE') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index b10c8c44b5de..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - DATE, - PARTITION, - _airbyte_emitted_at, - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD') }} --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} -where _airbyte_active_row = True - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql deleted file mode 100644 index de15cf595a01..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql +++ /dev/null @@ -1,12 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, - DOUBLE_ARRAY_DATA, - DATA, - {{ adapter.quote('column`_\'with""_quotes') }}, - _airbyte_emitted_at, - _AIRBYTE_PARTITION_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3') }} --- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql deleted file mode 100644 index dcff3b866ca9..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - CURRENCY, - _airbyte_emitted_at, - _AIRBYTE_COLUMN___WITH__QUOTES_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3') }} --- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql deleted file mode 100644 index 14700526c1fa..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - CURRENCY, - _airbyte_emitted_at, - _AIRBYTE_DATA_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3') }} --- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql deleted file mode 100644 index b64c459afe6b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} --- Final base SQL model -select - _AIRBYTE_PARTITION_HASHID, - ID, - _airbyte_emitted_at, - _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3') }} --- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql deleted file mode 100644 index 48114a2a5c1c..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql +++ /dev/null @@ -1,21 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key -select - ID, - DATE, - PARTITION, - DATE as _airbyte_start_at, - lag(DATE) over ( - partition by ID - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) as _airbyte_end_at, - lag(DATE) over ( - partition by ID - order by DATE is null asc, DATE desc, _airbyte_emitted_at desc - ) is null as _airbyte_active_row, - _airbyte_emitted_at, - _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4') }} --- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} -where _airbyte_row_num = 1 - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index d15f285c3d8b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} --- Final base SQL model -select - ID, - DATE, - _airbyte_emitted_at, - _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3') }} --- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql deleted file mode 100644 index 717ec4afe68b..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql +++ /dev/null @@ -1,10 +0,0 @@ -{{ config(schema="TEST_NORMALIZATION_NAMESPACE", tags=["top-level"]) }} --- Final base SQL model -select - ID, - DATE, - _airbyte_emitted_at, - _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID -from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3') }} --- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION_NAMESPACE', '_AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} - diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml deleted file mode 100644 index fa6caae072f2..000000000000 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml +++ /dev/null @@ -1,23 +0,0 @@ -version: 2 -sources: -- name: TEST_NORMALIZATION - quoting: - database: true - schema: false - identifier: false - tables: - - name: _AIRBYTE_RAW_CONFLICT_STREAM_ARRAY - - name: _AIRBYTE_RAW_CONFLICT_STREAM_NAME - - name: _AIRBYTE_RAW_CONFLICT_STREAM_SCALAR - - name: _AIRBYTE_RAW_DEDUP_CDC_EXCLUDED - - name: _AIRBYTE_RAW_DEDUP_EXCHANGE_RATE - - name: _AIRBYTE_RAW_EXCHANGE_RATE - - name: _AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - - name: _AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES -- name: TEST_NORMALIZATION_NAMESPACE - quoting: - database: true - schema: false - identifier: false - tables: - - name: _AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES diff --git a/airbyte-workers/src/main/java/io/airbyte/workers/normalization/DefaultNormalizationRunner.java b/airbyte-workers/src/main/java/io/airbyte/workers/normalization/DefaultNormalizationRunner.java index 82e1b4a47723..59f8b9cd1922 100644 --- a/airbyte-workers/src/main/java/io/airbyte/workers/normalization/DefaultNormalizationRunner.java +++ b/airbyte-workers/src/main/java/io/airbyte/workers/normalization/DefaultNormalizationRunner.java @@ -47,7 +47,7 @@ public class DefaultNormalizationRunner implements NormalizationRunner { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultNormalizationRunner.class); - public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:0.1.41"; + public static final String NORMALIZATION_IMAGE_NAME = "airbyte/normalization:0.1.42"; private final DestinationType destinationType; private final ProcessFactory processFactory; From 9d8cad49b7a21bea1862e9935941ab1ff59f0110 Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Thu, 19 Aug 2021 14:34:11 -0300 Subject: [PATCH 7/8] add files --- .../macros/cross_db_utils/json_operations.sql | 12 ++- .../conflict_stream_name_ab1.sql | 13 +++ .../conflict_stream_name_ab2.sql | 17 ++++ .../conflict_stream_name_ab3.sql | 18 ++++ ...t_stream_name_conflict_stream_name_ab1.sql | 14 +++ ...t_stream_name_conflict_stream_name_ab2.sql | 15 +++ ...t_stream_name_conflict_stream_name_ab3.sql | 18 ++++ ...t_stream_name_conflict_stream_name_ab1.sql | 14 +++ ...t_stream_name_conflict_stream_name_ab2.sql | 15 +++ ...t_stream_name_conflict_stream_name_ab3.sql | 18 ++++ .../conflict_stream_scalar_ab1.sql | 13 +++ .../conflict_stream_scalar_ab2.sql | 17 ++++ .../conflict_stream_scalar_ab3.sql | 18 ++++ .../dedup_cdc_excluded_ab1.sql | 16 +++ .../dedup_cdc_excluded_ab2.sql | 26 +++++ .../dedup_cdc_excluded_ab3.sql | 24 +++++ .../dedup_cdc_excluded_ab4.sql | 15 +++ .../dedup_exchange_rate_ab1.sql | 19 ++++ .../dedup_exchange_rate_ab2.sql | 35 +++++++ .../dedup_exchange_rate_ab3.sql | 30 ++++++ .../dedup_exchange_rate_ab4.sql | 15 +++ .../test_normalization/exchange_rate_ab1.sql | 19 ++++ .../test_normalization/exchange_rate_ab2.sql | 35 +++++++ .../test_normalization/exchange_rate_ab3.sql | 30 ++++++ ..._columns_resulting_into_long_names_ab1.sql | 14 +++ ..._columns_resulting_into_long_names_ab2.sql | 20 ++++ ..._columns_resulting_into_long_names_ab3.sql | 20 ++++ ..._columns_resulting_into_long_names_ab4.sql | 15 +++ ...ing_into_long_names_partition_DATA_ab1.sql | 16 +++ ...ing_into_long_names_partition_DATA_ab2.sql | 15 +++ ...ing_into_long_names_partition_DATA_ab3.sql | 18 ++++ ...esulting_into_long_names_partition_ab1.sql | 16 +++ ...esulting_into_long_names_partition_ab2.sql | 15 +++ ...esulting_into_long_names_partition_ab3.sql | 22 +++++ ...es_partition_column___with__quotes_ab1.sql | 16 +++ ...es_partition_column___with__quotes_ab2.sql | 15 +++ ...es_partition_column___with__quotes_ab3.sql | 18 ++++ ..._names_partition_double_array_data_ab1.sql | 16 +++ ..._names_partition_double_array_data_ab2.sql | 15 +++ ..._names_partition_double_array_data_ab3.sql | 18 ++++ ...amespace_resulting_into_long_names_ab1.sql | 13 +++ ...amespace_resulting_into_long_names_ab2.sql | 17 ++++ ...amespace_resulting_into_long_names_ab3.sql | 18 ++++ ...amespace_resulting_into_long_names_ab1.sql | 13 +++ ...amespace_resulting_into_long_names_ab2.sql | 17 ++++ ...amespace_resulting_into_long_names_ab3.sql | 18 ++++ .../conflict_stream_array.sql | 18 ++++ .../conflict_stream_name.sql | 18 ++++ ...flict_stream_name_conflict_stream_name.sql | 18 ++++ ...flict_stream_name_conflict_stream_name.sql | 18 ++++ .../conflict_stream_scalar.sql | 18 ++++ .../test_normalization/dedup_cdc_excluded.sql | 22 +++++ .../dedup_cdc_excluded_scd.sql | 31 ++++++ .../dedup_exchange_rate.sql | 25 +++++ .../dedup_exchange_rate_scd.sql | 38 +++++++ .../test_normalization/exchange_rate.sql | 24 +++++ ...plex_columns_resulting_into_long_names.sql | 20 ++++ ...ns_resulting_into_long_names_partition.sql | 20 ++++ ...sulting_into_long_names_partition_DATA.sql | 18 ++++ ..._names_partition_column___with__quotes.sql | 18 ++++ ...long_names_partition_double_array_data.sql | 18 ++++ ..._columns_resulting_into_long_names_scd.sql | 29 ++++++ ...ut_namespace_resulting_into_long_names.sql | 18 ++++ ...th_namespace_resulting_into_long_names.sql | 18 ++++ .../conflict_stream_name_ab1.sql | 9 ++ .../conflict_stream_name_ab2.sql | 9 ++ .../conflict_stream_name_ab3.sql | 11 +++ ...t_stream_name_conflict_stream_name_ab1.sql | 10 ++ ...t_stream_name_conflict_stream_name_ab2.sql | 9 ++ ...t_stream_name_conflict_stream_name_ab3.sql | 11 +++ ...t_stream_name_conflict_stream_name_ab1.sql | 10 ++ ...t_stream_name_conflict_stream_name_ab2.sql | 9 ++ ...t_stream_name_conflict_stream_name_ab3.sql | 11 +++ .../conflict_stream_scalar_ab1.sql | 9 ++ .../conflict_stream_scalar_ab2.sql | 9 ++ .../conflict_stream_scalar_ab3.sql | 11 +++ .../dedup_cdc_excluded_ab1.sql | 12 +++ .../dedup_cdc_excluded_ab2.sql | 12 +++ .../dedup_cdc_excluded_ab3.sql | 14 +++ .../dedup_cdc_excluded_ab4.sql | 11 +++ .../dedup_exchange_rate_ab1.sql | 15 +++ .../dedup_exchange_rate_ab2.sql | 15 +++ .../dedup_exchange_rate_ab3.sql | 17 ++++ .../dedup_exchange_rate_ab4.sql | 11 +++ .../test_normalization/exchange_rate_ab1.sql | 15 +++ .../test_normalization/exchange_rate_ab2.sql | 15 +++ .../test_normalization/exchange_rate_ab3.sql | 17 ++++ ..._columns_resulting_into_long_names_ab1.sql | 10 ++ ..._columns_resulting_into_long_names_ab2.sql | 10 ++ ..._columns_resulting_into_long_names_ab3.sql | 12 +++ ..._columns_resulting_into_long_names_ab4.sql | 11 +++ ...ing_into_long_names_partition_DATA_ab1.sql | 12 +++ ...ing_into_long_names_partition_DATA_ab2.sql | 9 ++ ...ing_into_long_names_partition_DATA_ab3.sql | 11 +++ ...esulting_into_long_names_partition_ab1.sql | 12 +++ ...esulting_into_long_names_partition_ab2.sql | 11 +++ ...esulting_into_long_names_partition_ab3.sql | 13 +++ ...es_partition_column___with__quotes_ab1.sql | 12 +++ ...es_partition_column___with__quotes_ab2.sql | 9 ++ ...es_partition_column___with__quotes_ab3.sql | 11 +++ ..._names_partition_double_array_data_ab1.sql | 12 +++ ..._names_partition_double_array_data_ab2.sql | 9 ++ ..._names_partition_double_array_data_ab3.sql | 11 +++ ...amespace_resulting_into_long_names_ab1.sql | 9 ++ ...amespace_resulting_into_long_names_ab2.sql | 9 ++ ...amespace_resulting_into_long_names_ab3.sql | 11 +++ ...amespace_resulting_into_long_names_ab1.sql | 9 ++ ...amespace_resulting_into_long_names_ab2.sql | 9 ++ ...amespace_resulting_into_long_names_ab3.sql | 11 +++ .../conflict_stream_array.sql | 10 ++ .../conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ .../conflict_stream_scalar.sql | 10 ++ .../test_normalization/dedup_cdc_excluded.sql | 14 +++ .../dedup_cdc_excluded_scd.sql | 23 +++++ .../dedup_exchange_rate.sql | 17 ++++ .../dedup_exchange_rate_scd.sql | 26 +++++ .../test_normalization/exchange_rate.sql | 16 +++ ...plex_columns_resulting_into_long_names.sql | 12 +++ ...ns_resulting_into_long_names_partition.sql | 12 +++ ...sulting_into_long_names_partition_DATA.sql | 10 ++ ..._names_partition_column___with__quotes.sql | 10 ++ ...long_names_partition_double_array_data.sql | 10 ++ ..._columns_resulting_into_long_names_scd.sql | 21 ++++ ...ut_namespace_resulting_into_long_names.sql | 10 ++ ...th_namespace_resulting_into_long_names.sql | 10 ++ .../models/generated/sources.yml | 23 +++++ .../conflict_stream_array_ab3.sql | 10 ++ ...ct_stream_name__2flict_stream_name_ab2.sql | 11 +++ ...ct_stream_name__2flict_stream_name_ab3.sql | 10 ++ ...ct_stream_name__3flict_stream_name_ab1.sql | 13 +++ ...ct_stream_name__3flict_stream_name_ab2.sql | 11 +++ ...ct_stream_name__3flict_stream_name_ab3.sql | 10 ++ .../conflict_stream_name_ab2.sql | 11 +++ .../conflict_stream_name_ab3.sql | 10 ++ .../conflict_stream_scalar_ab1.sql | 13 +++ .../conflict_stream_scalar_ab2.sql | 13 +++ .../conflict_stream_scalar_ab3.sql | 10 ++ .../dedup_cdc_excluded_ab1.sql | 19 ++++ .../dedup_cdc_excluded_ab2.sql | 22 +++++ .../dedup_cdc_excluded_ab3.sql | 10 ++ .../dedup_cdc_excluded_ab4.sql | 13 +++ .../dedup_exchange_rate_ab1.sql | 25 +++++ .../dedup_exchange_rate_ab2.sql | 27 +++++ .../dedup_exchange_rate_ab3.sql | 10 ++ .../dedup_exchange_rate_ab4.sql | 13 +++ .../test_normalization/exchange_rate_ab1.sql | 25 +++++ .../test_normalization/exchange_rate_ab2.sql | 27 +++++ .../test_normalization/exchange_rate_ab3.sql | 10 ++ ..._stream_with_co_1g_into_long_names_ab2.sql | 12 +++ ..._stream_with_co_1g_into_long_names_ab3.sql | 10 ++ ..._stream_with_co_1g_into_long_names_ab4.sql | 13 +++ ..._stream_with_co_2g_names_partition_ab1.sql | 17 ++++ ..._stream_with_co_2g_names_partition_ab2.sql | 13 +++ ..._stream_with_co_2g_names_partition_ab3.sql | 10 ++ ..._stream_with_co_3double_array_data_ab1.sql | 59 +++++++++++ ..._stream_with_co_3double_array_data_ab2.sql | 11 +++ ..._stream_with_co_3double_array_data_ab3.sql | 10 ++ ..._stream_with_co_3es_partition_data_ab1.sql | 59 +++++++++++ ..._stream_with_co_3es_partition_data_ab2.sql | 11 +++ ..._stream_with_co_3es_partition_data_ab3.sql | 10 ++ ..._stream_with_co_3mn___with__quotes_ab1.sql | 59 +++++++++++ ..._stream_with_co_3mn___with__quotes_ab2.sql | 11 +++ ..._stream_with_co_3mn___with__quotes_ab3.sql | 10 ++ ...sted_stream_wit_1g_into_long_names_ab1.sql | 13 +++ ...sted_stream_wit_1g_into_long_names_ab2.sql | 11 +++ ...sted_stream_wit_1g_into_long_names_ab3.sql | 10 ++ ..._stream_with_na_1g_into_long_names_ab1.sql | 13 +++ ..._stream_with_na_1g_into_long_names_ab2.sql | 11 +++ ..._stream_with_na_1g_into_long_names_ab3.sql | 10 ++ .../conflict_stream_array.sql | 15 +++ .../conflict_stream_name.sql | 15 +++ ...ct_stream_name____conflict_stream_name.sql | 15 +++ ...flict_stream_name_conflict_stream_name.sql | 15 +++ .../conflict_stream_scalar.sql | 15 +++ .../test_normalization/dedup_cdc_excluded.sql | 19 ++++ .../dedup_cdc_excluded_scd.sql | 28 ++++++ .../dedup_exchange_rate.sql | 22 +++++ .../dedup_exchange_rate_scd.sql | 31 ++++++ .../test_normalization/exchange_rate.sql | 21 ++++ ..._stream_with_co_1g_into_long_names_scd.sql | 26 +++++ ..._stream_with_co___long_names_partition.sql | 17 ++++ ..._stream_with_co___names_partition_data.sql | 15 +++ ..._stream_with_co__column___with__quotes.sql | 15 +++ ..._stream_with_co__ion_double_array_data.sql | 15 +++ ..._stream_with_co__lting_into_long_names.sql | 17 ++++ ...sted_stream_wit__lting_into_long_names.sql | 15 +++ ..._stream_with_na__lting_into_long_names.sql | 15 +++ ...ct_stream_name__2flict_stream_name_ab1.sql | 10 ++ ...ct_stream_name__2flict_stream_name_ab2.sql | 9 ++ ...ct_stream_name__2flict_stream_name_ab3.sql | 11 +++ ...ct_stream_name__3flict_stream_name_ab1.sql | 10 ++ ...ct_stream_name__3flict_stream_name_ab2.sql | 9 ++ ...ct_stream_name__3flict_stream_name_ab3.sql | 11 +++ .../conflict_stream_name_ab1.sql | 9 ++ .../conflict_stream_name_ab2.sql | 9 ++ .../conflict_stream_name_ab3.sql | 11 +++ .../conflict_stream_scalar_ab1.sql | 9 ++ .../conflict_stream_scalar_ab2.sql | 9 ++ .../conflict_stream_scalar_ab3.sql | 11 +++ .../dedup_cdc_excluded_ab1.sql | 12 +++ .../dedup_cdc_excluded_ab2.sql | 12 +++ .../dedup_cdc_excluded_ab3.sql | 14 +++ .../dedup_cdc_excluded_ab4.sql | 11 +++ .../dedup_exchange_rate_ab1.sql | 15 +++ .../dedup_exchange_rate_ab2.sql | 15 +++ .../dedup_exchange_rate_ab3.sql | 17 ++++ .../dedup_exchange_rate_ab4.sql | 11 +++ .../test_normalization/exchange_rate_ab1.sql | 15 +++ .../test_normalization/exchange_rate_ab2.sql | 15 +++ .../test_normalization/exchange_rate_ab3.sql | 17 ++++ ..._stream_with_co_1g_into_long_names_ab1.sql | 10 ++ ..._stream_with_co_1g_into_long_names_ab2.sql | 10 ++ ..._stream_with_co_1g_into_long_names_ab3.sql | 12 +++ ..._stream_with_co_1g_into_long_names_ab4.sql | 11 +++ ..._stream_with_co_2g_names_partition_ab1.sql | 12 +++ ..._stream_with_co_2g_names_partition_ab2.sql | 11 +++ ..._stream_with_co_2g_names_partition_ab3.sql | 13 +++ ..._stream_with_co_3double_array_data_ab1.sql | 12 +++ ..._stream_with_co_3double_array_data_ab2.sql | 9 ++ ..._stream_with_co_3double_array_data_ab3.sql | 11 +++ ..._stream_with_co_3es_partition_data_ab1.sql | 12 +++ ..._stream_with_co_3es_partition_data_ab2.sql | 9 ++ ..._stream_with_co_3es_partition_data_ab3.sql | 11 +++ ..._stream_with_co_3mn___with__quotes_ab1.sql | 12 +++ ..._stream_with_co_3mn___with__quotes_ab2.sql | 9 ++ ..._stream_with_co_3mn___with__quotes_ab3.sql | 11 +++ ...sted_stream_wit_1g_into_long_names_ab1.sql | 9 ++ ...sted_stream_wit_1g_into_long_names_ab2.sql | 9 ++ ...sted_stream_wit_1g_into_long_names_ab3.sql | 11 +++ ..._stream_with_na_1g_into_long_names_ab1.sql | 9 ++ ..._stream_with_na_1g_into_long_names_ab2.sql | 9 ++ ..._stream_with_na_1g_into_long_names_ab3.sql | 11 +++ .../conflict_stream_array.sql | 10 ++ .../conflict_stream_name.sql | 10 ++ ...ct_stream_name____conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ .../conflict_stream_scalar.sql | 10 ++ .../test_normalization/dedup_cdc_excluded.sql | 14 +++ .../dedup_cdc_excluded_scd.sql | 23 +++++ .../dedup_exchange_rate.sql | 17 ++++ .../dedup_exchange_rate_scd.sql | 26 +++++ .../test_normalization/exchange_rate.sql | 16 +++ ..._stream_with_co_1g_into_long_names_scd.sql | 21 ++++ ..._stream_with_co___long_names_partition.sql | 12 +++ ..._stream_with_co___names_partition_data.sql | 10 ++ ..._stream_with_co__column___with__quotes.sql | 10 ++ ..._stream_with_co__ion_double_array_data.sql | 10 ++ ..._stream_with_co__lting_into_long_names.sql | 12 +++ ...sted_stream_wit__lting_into_long_names.sql | 10 ++ ..._stream_with_na__lting_into_long_names.sql | 10 ++ .../models/generated/sources.yml | 23 +++++ .../conflict_stream_array_ab3.sql | 20 ++++ ...stream_name___conflict_stream_name_ab1.sql | 12 +++ ...stream_name___conflict_stream_name_ab2.sql | 13 +++ ...stream_name___conflict_stream_name_ab3.sql | 20 ++++ .../conflict_stream_name_ab2.sql | 15 +++ .../conflict_stream_name_ab3.sql | 20 ++++ ...t_stream_name_conflict_stream_name_ab2.sql | 13 +++ ...t_stream_name_conflict_stream_name_ab3.sql | 20 ++++ .../conflict_stream_scalar_ab1.sql | 11 +++ .../conflict_stream_scalar_ab2.sql | 15 +++ .../conflict_stream_scalar_ab3.sql | 20 ++++ .../dedup_cdc_excluded_ab1.sql | 14 +++ .../dedup_cdc_excluded_ab2.sql | 24 +++++ .../dedup_cdc_excluded_ab3.sql | 26 +++++ .../dedup_cdc_excluded_ab4.sql | 13 +++ .../dedup_exchange_rate_ab1.sql | 17 ++++ .../dedup_exchange_rate_ab2.sql | 33 +++++++ .../dedup_exchange_rate_ab3.sql | 32 ++++++ .../dedup_exchange_rate_ab4.sql | 13 +++ .../test_normalization/exchange_rate_ab1.sql | 17 ++++ .../test_normalization/exchange_rate_ab2.sql | 33 +++++++ .../test_normalization/exchange_rate_ab3.sql | 32 ++++++ ...ream_with_c___long_names_partition_ab1.sql | 14 +++ ...ream_with_c___long_names_partition_ab2.sql | 13 +++ ...ream_with_c___long_names_partition_ab3.sql | 24 +++++ ...ream_with_c___names_partition_data_ab1.sql | 18 ++++ ...ream_with_c___names_partition_data_ab2.sql | 13 +++ ...ream_with_c___names_partition_data_ab3.sql | 20 ++++ ...ream_with_c__column___with__quotes_ab1.sql | 18 ++++ ...ream_with_c__column___with__quotes_ab2.sql | 13 +++ ...ream_with_c__column___with__quotes_ab3.sql | 20 ++++ ...ream_with_c__ion_double_array_data_ab1.sql | 18 ++++ ...ream_with_c__ion_double_array_data_ab2.sql | 13 +++ ...ream_with_c__ion_double_array_data_ab3.sql | 20 ++++ ...ream_with_c__lting_into_long_names_ab2.sql | 18 ++++ ...ream_with_c__lting_into_long_names_ab3.sql | 22 +++++ ...ream_with_c__lting_into_long_names_ab4.sql | 13 +++ ...d_stream_wi__lting_into_long_names_ab1.sql | 11 +++ ...d_stream_wi__lting_into_long_names_ab2.sql | 15 +++ ...d_stream_wi__lting_into_long_names_ab3.sql | 20 ++++ ...ream_with_n__lting_into_long_names_ab1.sql | 11 +++ ...ream_with_n__lting_into_long_names_ab2.sql | 15 +++ ...ream_with_n__lting_into_long_names_ab3.sql | 20 ++++ .../conflict_stream_array.sql | 14 +++ .../conflict_stream_name.sql | 14 +++ ...ict_stream_name___conflict_stream_name.sql | 14 +++ ...flict_stream_name_conflict_stream_name.sql | 14 +++ .../conflict_stream_scalar.sql | 14 +++ .../test_normalization/dedup_cdc_excluded.sql | 18 ++++ .../dedup_cdc_excluded_scd.sql | 27 +++++ .../dedup_exchange_rate.sql | 21 ++++ .../dedup_exchange_rate_scd.sql | 34 +++++++ .../test_normalization/exchange_rate.sql | 20 ++++ ...d_stream_with_c___long_names_partition.sql | 16 +++ ...d_stream_with_c___names_partition_data.sql | 14 +++ ...d_stream_with_c__column___with__quotes.sql | 14 +++ ...d_stream_with_c__ion_double_array_data.sql | 14 +++ ...d_stream_with_c__lting_into_long_names.sql | 16 +++ ...ream_with_c__lting_into_long_names_scd.sql | 25 +++++ ...ested_stream_wi__lting_into_long_names.sql | 14 +++ ...e_stream_with_n__lting_into_long_names.sql | 14 +++ ...stream_name___conflict_stream_name_ab1.sql | 10 ++ ...stream_name___conflict_stream_name_ab2.sql | 9 ++ ...stream_name___conflict_stream_name_ab3.sql | 11 +++ .../conflict_stream_name_ab1.sql | 9 ++ .../conflict_stream_name_ab2.sql | 9 ++ .../conflict_stream_name_ab3.sql | 11 +++ ...t_stream_name_conflict_stream_name_ab1.sql | 10 ++ ...t_stream_name_conflict_stream_name_ab2.sql | 9 ++ ...t_stream_name_conflict_stream_name_ab3.sql | 11 +++ .../conflict_stream_scalar_ab1.sql | 9 ++ .../conflict_stream_scalar_ab2.sql | 9 ++ .../conflict_stream_scalar_ab3.sql | 11 +++ .../dedup_cdc_excluded_ab1.sql | 12 +++ .../dedup_cdc_excluded_ab2.sql | 12 +++ .../dedup_cdc_excluded_ab3.sql | 14 +++ .../dedup_cdc_excluded_ab4.sql | 11 +++ .../dedup_exchange_rate_ab1.sql | 15 +++ .../dedup_exchange_rate_ab2.sql | 15 +++ .../dedup_exchange_rate_ab3.sql | 17 ++++ .../dedup_exchange_rate_ab4.sql | 11 +++ .../test_normalization/exchange_rate_ab1.sql | 15 +++ .../test_normalization/exchange_rate_ab2.sql | 15 +++ .../test_normalization/exchange_rate_ab3.sql | 17 ++++ ...ream_with_c___long_names_partition_ab1.sql | 12 +++ ...ream_with_c___long_names_partition_ab2.sql | 11 +++ ...ream_with_c___long_names_partition_ab3.sql | 13 +++ ...ream_with_c___names_partition_data_ab1.sql | 12 +++ ...ream_with_c___names_partition_data_ab2.sql | 9 ++ ...ream_with_c___names_partition_data_ab3.sql | 11 +++ ...ream_with_c__column___with__quotes_ab1.sql | 12 +++ ...ream_with_c__column___with__quotes_ab2.sql | 9 ++ ...ream_with_c__column___with__quotes_ab3.sql | 11 +++ ...ream_with_c__ion_double_array_data_ab1.sql | 12 +++ ...ream_with_c__ion_double_array_data_ab2.sql | 9 ++ ...ream_with_c__ion_double_array_data_ab3.sql | 11 +++ ...ream_with_c__lting_into_long_names_ab1.sql | 10 ++ ...ream_with_c__lting_into_long_names_ab2.sql | 10 ++ ...ream_with_c__lting_into_long_names_ab3.sql | 12 +++ ...ream_with_c__lting_into_long_names_ab4.sql | 11 +++ ...d_stream_wi__lting_into_long_names_ab1.sql | 9 ++ ...d_stream_wi__lting_into_long_names_ab2.sql | 9 ++ ...d_stream_wi__lting_into_long_names_ab3.sql | 11 +++ ...ream_with_n__lting_into_long_names_ab1.sql | 9 ++ ...ream_with_n__lting_into_long_names_ab2.sql | 9 ++ ...ream_with_n__lting_into_long_names_ab3.sql | 11 +++ .../conflict_stream_array.sql | 10 ++ .../conflict_stream_name.sql | 10 ++ ...ict_stream_name___conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ .../conflict_stream_scalar.sql | 10 ++ .../test_normalization/dedup_cdc_excluded.sql | 14 +++ .../dedup_cdc_excluded_scd.sql | 23 +++++ .../dedup_exchange_rate.sql | 17 ++++ .../dedup_exchange_rate_scd.sql | 26 +++++ .../test_normalization/exchange_rate.sql | 16 +++ ...d_stream_with_c___long_names_partition.sql | 12 +++ ...d_stream_with_c___names_partition_data.sql | 10 ++ ...d_stream_with_c__column___with__quotes.sql | 10 ++ ...d_stream_with_c__ion_double_array_data.sql | 10 ++ ...d_stream_with_c__lting_into_long_names.sql | 12 +++ ...ream_with_c__lting_into_long_names_scd.sql | 21 ++++ ...ested_stream_wi__lting_into_long_names.sql | 10 ++ ...e_stream_with_n__lting_into_long_names.sql | 10 ++ .../models/generated/sources.yml | 23 +++++ ...flict_stream_name_conflict_stream_name.sql | 48 +++++++++ .../conflict_stream_scalar.sql | 49 ++++++++++ .../test_normalization/dedup_cdc_excluded.sql | 21 ++++ .../dedup_cdc_excluded_scd.sql | 85 ++++++++++++++++ .../dedup_exchange_rate.sql | 24 +++++ .../dedup_exchange_rate_scd.sql | 98 +++++++++++++++++++ .../test_normalization/exchange_rate.sql | 77 +++++++++++++++ ...plex_columns_resulting_into_long_names.sql | 19 ++++ ...ns_resulting_into_long_names_partition.sql | 54 ++++++++++ ..._names_partition_column___with__quotes.sql | 93 ++++++++++++++++++ ...sulting_into_long_names_partition_data.sql | 93 ++++++++++++++++++ ...long_names_partition_double_array_data.sql | 93 ++++++++++++++++++ ...ut_namespace_resulting_into_long_names.sql | 47 +++++++++ ...th_namespace_resulting_into_long_names.sql | 47 +++++++++ .../conflict_stream_name_ab1.sql | 9 ++ .../conflict_stream_name_ab2.sql | 9 ++ .../conflict_stream_name_ab3.sql | 11 +++ ...t_stream_name_conflict_stream_name_ab1.sql | 10 ++ ...t_stream_name_conflict_stream_name_ab2.sql | 9 ++ ...t_stream_name_conflict_stream_name_ab3.sql | 11 +++ ...t_stream_name_conflict_stream_name_ab1.sql | 10 ++ ...t_stream_name_conflict_stream_name_ab2.sql | 9 ++ ...t_stream_name_conflict_stream_name_ab3.sql | 11 +++ .../conflict_stream_scalar_ab1.sql | 9 ++ .../conflict_stream_scalar_ab2.sql | 9 ++ .../conflict_stream_scalar_ab3.sql | 11 +++ .../dedup_cdc_excluded_ab1.sql | 12 +++ .../dedup_cdc_excluded_ab2.sql | 12 +++ .../dedup_cdc_excluded_ab3.sql | 14 +++ .../dedup_cdc_excluded_ab4.sql | 11 +++ .../dedup_exchange_rate_ab1.sql | 15 +++ .../dedup_exchange_rate_ab2.sql | 15 +++ .../dedup_exchange_rate_ab3.sql | 17 ++++ .../dedup_exchange_rate_ab4.sql | 11 +++ .../test_normalization/exchange_rate_ab1.sql | 15 +++ .../test_normalization/exchange_rate_ab2.sql | 15 +++ .../test_normalization/exchange_rate_ab3.sql | 17 ++++ ..._columns_resulting_into_long_names_ab1.sql | 10 ++ ..._columns_resulting_into_long_names_ab2.sql | 10 ++ ..._columns_resulting_into_long_names_ab3.sql | 12 +++ ..._columns_resulting_into_long_names_ab4.sql | 11 +++ ...esulting_into_long_names_partition_ab1.sql | 12 +++ ...esulting_into_long_names_partition_ab2.sql | 11 +++ ...esulting_into_long_names_partition_ab3.sql | 13 +++ ...es_partition_column___with__quotes_ab1.sql | 12 +++ ...es_partition_column___with__quotes_ab2.sql | 9 ++ ...es_partition_column___with__quotes_ab3.sql | 11 +++ ...ing_into_long_names_partition_data_ab1.sql | 12 +++ ...ing_into_long_names_partition_data_ab2.sql | 9 ++ ...ing_into_long_names_partition_data_ab3.sql | 11 +++ ..._names_partition_double_array_data_ab1.sql | 12 +++ ..._names_partition_double_array_data_ab2.sql | 9 ++ ..._names_partition_double_array_data_ab3.sql | 11 +++ ...amespace_resulting_into_long_names_ab1.sql | 9 ++ ...amespace_resulting_into_long_names_ab2.sql | 9 ++ ...amespace_resulting_into_long_names_ab3.sql | 11 +++ ...amespace_resulting_into_long_names_ab1.sql | 9 ++ ...amespace_resulting_into_long_names_ab2.sql | 9 ++ ...amespace_resulting_into_long_names_ab3.sql | 11 +++ .../conflict_stream_array.sql | 10 ++ .../conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ ...flict_stream_name_conflict_stream_name.sql | 10 ++ .../conflict_stream_scalar.sql | 10 ++ .../test_normalization/dedup_cdc_excluded.sql | 14 +++ .../dedup_cdc_excluded_scd.sql | 23 +++++ .../dedup_exchange_rate.sql | 17 ++++ .../dedup_exchange_rate_scd.sql | 26 +++++ .../test_normalization/exchange_rate.sql | 16 +++ ...plex_columns_resulting_into_long_names.sql | 12 +++ ...ns_resulting_into_long_names_partition.sql | 12 +++ ..._names_partition_column___with__quotes.sql | 10 ++ ...sulting_into_long_names_partition_data.sql | 10 ++ ...long_names_partition_double_array_data.sql | 10 ++ ..._columns_resulting_into_long_names_scd.sql | 21 ++++ ...ut_namespace_resulting_into_long_names.sql | 10 ++ ...th_namespace_resulting_into_long_names.sql | 10 ++ .../models/generated/sources.yml | 23 +++++ .../CONFLICT_STREAM_ARRAY_AB3.sql | 20 ++++ .../CONFLICT_STREAM_NAME_AB1.sql | 11 +++ .../CONFLICT_STREAM_NAME_AB2.sql | 15 +++ .../CONFLICT_STREAM_NAME_AB3.sql | 20 ++++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 12 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 13 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 20 ++++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 12 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 13 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 20 ++++ .../CONFLICT_STREAM_SCALAR_AB1.sql | 11 +++ .../CONFLICT_STREAM_SCALAR_AB2.sql | 15 +++ .../CONFLICT_STREAM_SCALAR_AB3.sql | 20 ++++ .../DEDUP_CDC_EXCLUDED_AB1.sql | 14 +++ .../DEDUP_CDC_EXCLUDED_AB2.sql | 24 +++++ .../DEDUP_CDC_EXCLUDED_AB3.sql | 26 +++++ .../DEDUP_CDC_EXCLUDED_AB4.sql | 13 +++ .../DEDUP_EXCHANGE_RATE_AB1.sql | 17 ++++ .../DEDUP_EXCHANGE_RATE_AB2.sql | 33 +++++++ .../DEDUP_EXCHANGE_RATE_AB3.sql | 32 ++++++ .../DEDUP_EXCHANGE_RATE_AB4.sql | 13 +++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql | 17 ++++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql | 33 +++++++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql | 32 ++++++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql | 12 +++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql | 18 ++++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql | 22 +++++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql | 13 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql | 14 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql | 13 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql | 24 +++++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql | 14 +++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql | 13 +++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql | 20 ++++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql | 14 +++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql | 13 +++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql | 20 ++++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql | 14 +++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql | 13 +++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql | 20 ++++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 11 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 15 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 20 ++++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 11 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 15 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 20 ++++ .../CONFLICT_STREAM_ARRAY.sql | 14 +++ .../CONFLICT_STREAM_NAME.sql | 14 +++ ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 14 +++ ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 14 +++ .../CONFLICT_STREAM_SCALAR.sql | 14 +++ .../TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql | 18 ++++ .../DEDUP_CDC_EXCLUDED_SCD.sql | 27 +++++ .../DEDUP_EXCHANGE_RATE.sql | 21 ++++ .../DEDUP_EXCHANGE_RATE_SCD.sql | 34 +++++++ .../TEST_NORMALIZATION/EXCHANGE_RATE.sql | 20 ++++ ...PLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql | 16 +++ ...NS_RESULTING_INTO_LONG_NAMES_PARTITION.sql | 16 +++ ..._NAMES_PARTITION_COLUMN___WITH__QUOTES.sql | 14 +++ ...SULTING_INTO_LONG_NAMES_PARTITION_DATA.sql | 14 +++ ...LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql | 14 +++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql | 25 +++++ ...UT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 14 +++ ...TH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 14 +++ .../CONFLICT_STREAM_NAME_AB1.sql | 9 ++ .../CONFLICT_STREAM_NAME_AB2.sql | 9 ++ .../CONFLICT_STREAM_NAME_AB3.sql | 11 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 10 ++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 9 ++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 11 +++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 10 ++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql | 9 ++ ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql | 11 +++ .../CONFLICT_STREAM_SCALAR_AB1.sql | 9 ++ .../CONFLICT_STREAM_SCALAR_AB2.sql | 9 ++ .../CONFLICT_STREAM_SCALAR_AB3.sql | 11 +++ .../DEDUP_CDC_EXCLUDED_AB1.sql | 12 +++ .../DEDUP_CDC_EXCLUDED_AB2.sql | 12 +++ .../DEDUP_CDC_EXCLUDED_AB3.sql | 14 +++ .../DEDUP_CDC_EXCLUDED_AB4.sql | 11 +++ .../DEDUP_EXCHANGE_RATE_AB1.sql | 15 +++ .../DEDUP_EXCHANGE_RATE_AB2.sql | 15 +++ .../DEDUP_EXCHANGE_RATE_AB3.sql | 17 ++++ .../DEDUP_EXCHANGE_RATE_AB4.sql | 11 +++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql | 15 +++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql | 15 +++ .../TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql | 17 ++++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql | 10 ++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql | 10 ++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql | 12 +++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql | 11 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql | 12 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql | 11 +++ ...ESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql | 13 +++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql | 12 +++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql | 9 ++ ...ES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql | 11 +++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql | 12 +++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql | 9 ++ ...ING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql | 11 +++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql | 12 +++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql | 9 ++ ..._NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql | 11 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 9 ++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 9 ++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 11 +++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql | 9 ++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql | 9 ++ ...AMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql | 11 +++ .../CONFLICT_STREAM_ARRAY.sql | 10 ++ .../CONFLICT_STREAM_NAME.sql | 10 ++ ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 10 ++ ...FLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql | 10 ++ .../CONFLICT_STREAM_SCALAR.sql | 10 ++ .../TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql | 14 +++ .../DEDUP_CDC_EXCLUDED_SCD.sql | 23 +++++ .../DEDUP_EXCHANGE_RATE.sql | 17 ++++ .../DEDUP_EXCHANGE_RATE_SCD.sql | 26 +++++ .../TEST_NORMALIZATION/EXCHANGE_RATE.sql | 16 +++ ...PLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql | 12 +++ ...NS_RESULTING_INTO_LONG_NAMES_PARTITION.sql | 12 +++ ..._NAMES_PARTITION_COLUMN___WITH__QUOTES.sql | 10 ++ ...SULTING_INTO_LONG_NAMES_PARTITION_DATA.sql | 10 ++ ...LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql | 10 ++ ..._COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql | 21 ++++ ...UT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 10 ++ ...TH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql | 10 ++ .../models/generated/sources.yml | 23 +++++ .../transform_catalog/stream_processor.py | 17 +--- 585 files changed, 9174 insertions(+), 14 deletions(-) create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml diff --git a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql index a6748f325db1..af25356424cf 100644 --- a/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql +++ b/airbyte-integrations/bases/base-normalization/dbt-project-template/macros/cross_db_utils/json_operations.sql @@ -64,7 +64,11 @@ {%- endmacro %} {% macro bigquery__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - json_extract({{ from_table}}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {%- if from_table|string() == '' %} + json_extract({{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {% else %} + json_extract({{ from_table}}.{{ json_column }}, {{ format_json_path(normalized_json_path) }}) + {% endif -%} {%- endmacro %} {% macro postgres__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} @@ -92,7 +96,11 @@ {%- endmacro %} {% macro snowflake__json_extract(from_table, json_column, json_path_list, normalized_json_path) -%} - get_path(parse_json({{ from_table }}.{{ json_column }}), {{ format_json_path(json_path_list) }}) + {%- if from_table|string() == '' %} + get_path(parse_json({{ json_column }}), {{ format_json_path(json_path_list) }}) + {% else %} + get_path(parse_json({{ from_table }}.{{ json_column }}), {{ format_json_path(json_path_list) }}) + {% endif -%} {%- endmacro %} {# json_extract_scalar ------------------------------------------------- #} diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..d5c87b768333 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -0,0 +1,13 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract(table_alias._airbyte_data, "$['conflict_stream_name']") as conflict_stream_name, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_name as table_alias +-- conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..0e880d8d1132 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,17 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + string +) as id, + cast(conflict_stream_name as + string +) as conflict_stream_name, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab1` +-- conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..7861911c1e51 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(conflict_stream_name as + string +), '')) as + string +))) as _airbyte_conflict_stream_name_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab2` +-- conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..6bc79f20076c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,14 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + json_extract(table_alias.conflict_stream_name, "$['conflict_stream_name']") as conflict_stream_name, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`conflict_stream_name` as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..17e8df654774 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as + string +) as conflict_stream_name, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab1` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..c381c247f1f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_hashid as + string +), ''), '-', coalesce(cast(conflict_stream_name as + string +), '')) as + string +))) as _airbyte_conflict_stream_name_2_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab2` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..43ebdecf36c4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,14 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + json_extract_scalar(conflict_stream_name, "$['groups']") as `groups`, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..b1674b6fb1cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(`groups` as + string +) as `groups`, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..74aff2b2d922 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_2_hashid as + string +), ''), '-', coalesce(cast(`groups` as + string +), '')) as + string +))) as _airbyte_conflict_stream_name_3_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..bd1d66a5840f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,13 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['conflict_stream_scalar']") as conflict_stream_scalar, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_scalar as table_alias +-- conflict_stream_scalar; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..2a3441329550 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,17 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + string +) as id, + cast(conflict_stream_scalar as + int64 +) as conflict_stream_scalar, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab1` +-- conflict_stream_scalar; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..4423fb726b78 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(conflict_stream_scalar as + string +), '')) as + string +))) as _airbyte_conflict_stream_scalar_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab2` +-- conflict_stream_scalar; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..81d31a55de73 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,16 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['name']") as name, + json_extract_scalar(_airbyte_data, "$['_ab_cdc_lsn']") as _ab_cdc_lsn, + json_extract_scalar(_airbyte_data, "$['_ab_cdc_updated_at']") as _ab_cdc_updated_at, + json_extract_scalar(_airbyte_data, "$['_ab_cdc_deleted_at']") as _ab_cdc_deleted_at, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias +-- dedup_cdc_excluded; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..cc52d282b18c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,26 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + int64 +) as id, + cast(name as + string +) as name, + cast(_ab_cdc_lsn as + float64 +) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as + float64 +) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as + float64 +) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab1` +-- dedup_cdc_excluded; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..597f858f6ae2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,24 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(name as + string +), ''), '-', coalesce(cast(_ab_cdc_lsn as + string +), ''), '-', coalesce(cast(_ab_cdc_updated_at as + string +), ''), '-', coalesce(cast(_ab_cdc_deleted_at as + string +), '')) as + string +))) as _airbyte_dedup_cdc_excluded_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab2` +-- dedup_cdc_excluded; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..b6dcffec9d42 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab4` + OPTIONS() + as +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab3` +-- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..75554c2c95f6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,19 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['currency']") as currency, + json_extract_scalar(_airbyte_data, "$['date']") as date, + json_extract_scalar(_airbyte_data, "$['timestamp_col']") as timestamp_col, + json_extract_scalar(_airbyte_data, "$['HKD@spéçiäl & characters']") as HKD_special___characters, + json_extract_scalar(_airbyte_data, "$['HKD_special___characters']") as HKD_special___characters_1, + json_extract_scalar(_airbyte_data, "$['NZD']") as NZD, + json_extract_scalar(_airbyte_data, "$['USD']") as USD, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate as table_alias +-- dedup_exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..e23544e7ec74 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,35 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + int64 +) as id, + cast(currency as + string +) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp +) as timestamp_col, + cast(HKD_special___characters as + float64 +) as HKD_special___characters, + cast(HKD_special___characters_1 as + string +) as HKD_special___characters_1, + cast(NZD as + float64 +) as NZD, + cast(USD as + float64 +) as USD, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab1` +-- dedup_exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..3e66e916af46 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,30 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(currency as + string +), ''), '-', coalesce(cast(date as + string +), ''), '-', coalesce(cast(timestamp_col as + string +), ''), '-', coalesce(cast(HKD_special___characters as + string +), ''), '-', coalesce(cast(HKD_special___characters_1 as + string +), ''), '-', coalesce(cast(NZD as + string +), ''), '-', coalesce(cast(USD as + string +), '')) as + string +))) as _airbyte_dedup_exchange_rate_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab2` +-- dedup_exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..5f1888a5871a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab4` + OPTIONS() + as +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab3` +-- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..a7ed234497d7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,19 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['currency']") as currency, + json_extract_scalar(_airbyte_data, "$['date']") as date, + json_extract_scalar(_airbyte_data, "$['timestamp_col']") as timestamp_col, + json_extract_scalar(_airbyte_data, "$['HKD@spéçiäl & characters']") as HKD_special___characters, + json_extract_scalar(_airbyte_data, "$['HKD_special___characters']") as HKD_special___characters_1, + json_extract_scalar(_airbyte_data, "$['NZD']") as NZD, + json_extract_scalar(_airbyte_data, "$['USD']") as USD, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_exchange_rate as table_alias +-- exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..4fa388e61017 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,35 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + int64 +) as id, + cast(currency as + string +) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp +) as timestamp_col, + cast(HKD_special___characters as + float64 +) as HKD_special___characters, + cast(HKD_special___characters_1 as + string +) as HKD_special___characters_1, + cast(NZD as + float64 +) as NZD, + cast(USD as + float64 +) as USD, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab1` +-- exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..2618577830ac --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,30 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(currency as + string +), ''), '-', coalesce(cast(date as + string +), ''), '-', coalesce(cast(timestamp_col as + string +), ''), '-', coalesce(cast(HKD_special___characters as + string +), ''), '-', coalesce(cast(HKD_special___characters_1 as + string +), ''), '-', coalesce(cast(NZD as + string +), ''), '-', coalesce(cast(USD as + string +), '')) as + string +))) as _airbyte_exchange_rate_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab2` +-- exchange_rate; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..b8f7ef23dfe6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql @@ -0,0 +1,14 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['date']") as date, + json_extract(table_alias._airbyte_data, "$['partition']") as `partition`, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias +-- nested_stream_with_complex_columns_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..ed49b9abf584 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql @@ -0,0 +1,20 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + string +) as id, + cast(date as + string +) as date, + cast(`partition` as + string +) as `partition`, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab1` +-- nested_stream_with_complex_columns_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..4550c95545bf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql @@ -0,0 +1,20 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(date as + string +), ''), '-', coalesce(cast(`partition` as + string +), '')) as + string +))) as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab2` +-- nested_stream_with_complex_columns_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql new file mode 100644 index 000000000000..015591a90fa6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab4` + OPTIONS() + as +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab3` +-- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql new file mode 100644 index 000000000000..ffc273b03241 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql @@ -0,0 +1,16 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + json_extract_scalar(DATA, "$['currency']") as currency, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias +cross join unnest(DATA) as DATA +where DATA is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql new file mode 100644 index 000000000000..31ee702ba3ec --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as + string +) as currency, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql new file mode 100644 index 000000000000..3f1d3246288c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as + string +), ''), '-', coalesce(cast(currency as + string +), '')) as + string +))) as _airbyte_DATA_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql new file mode 100644 index 000000000000..fae58456c350 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql @@ -0,0 +1,16 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + json_extract_array(`partition`, "$['double_array_data']") as double_array_data, + json_extract_array(`partition`, "$['DATA']") as DATA, + json_extract_array(`partition`, "$['column___with__quotes']") as column___with__quotes, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` as table_alias +where `partition` is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql new file mode 100644 index 000000000000..a0eeb3ef422b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + DATA, + column___with__quotes, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql new file mode 100644 index 000000000000..6ca3de83be50 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql @@ -0,0 +1,22 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as + string +), ''), '-', coalesce(cast(array_to_string(double_array_data, "|", "") as + string +), ''), '-', coalesce(cast(array_to_string(DATA, "|", "") as + string +), ''), '-', coalesce(cast(array_to_string(column___with__quotes, "|", "") as + string +), '')) as + string +))) as _airbyte_partition_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql new file mode 100644 index 000000000000..1e59ead141ba --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql @@ -0,0 +1,16 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + json_extract_scalar(column___with__quotes, "$['currency']") as currency, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias +cross join unnest(column___with__quotes) as column___with__quotes +where column___with__quotes is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql new file mode 100644 index 000000000000..be9eef8648af --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as + string +) as currency, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql new file mode 100644 index 000000000000..abeb4664ea7e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as + string +), ''), '-', coalesce(cast(currency as + string +), '')) as + string +))) as _airbyte_column___with__quotes_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql new file mode 100644 index 000000000000..bc13ba7f2783 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql @@ -0,0 +1,16 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + json_extract_scalar(double_array_data, "$['id']") as id, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` as table_alias +cross join unnest(double_array_data) as double_array_data +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql new file mode 100644 index 000000000000..8de95f382eb3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as + string +) as id, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql new file mode 100644 index 000000000000..e42a8aa35963 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as + string +), ''), '-', coalesce(cast(id as + string +), '')) as + string +))) as _airbyte_double_array_data_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..d00f9c167c3a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,13 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['date']") as date, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias +-- non_nested_stream_without_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..e653ba297d30 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,17 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + string +) as id, + cast(date as + string +) as date, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab1` +-- non_nested_stream_without_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..a072611c0bef --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(date as + string +), '')) as + string +))) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab2` +-- non_nested_stream_without_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..c7e36ed1112d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,13 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_scalar(_airbyte_data, "$['date']") as date, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias +-- simple_stream_with_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..d7cebc4de520 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,17 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + string +) as id, + cast(date as + string +) as date, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab1` +-- simple_stream_with_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..10f8af300953 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(date as + string +), '')) as + string +))) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab2` +-- simple_stream_with_namespace_resulting_into_long_names; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..efb1c7223ca9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_array` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_array_ab3` +-- conflict_stream_array from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_array + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..c660adb89754 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_ab3` +-- conflict_stream_name from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_name + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..1083f66f46a0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_ab3` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from `dataline-integration-testing`.test_normalization.`conflict_stream_name` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..573cfc4a54fb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + `groups`, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from `dataline-integration-testing`.test_normalization.`conflict_stream_name_conflict_stream_name` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..40652d62ec2c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`conflict_stream_scalar` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`conflict_stream_scalar_ab3` +-- conflict_stream_scalar from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_scalar + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..6789714e4646 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,22 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded_scd` +-- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..4af4e800ea7e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,31 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`dedup_cdc_excluded_scd` + + + OPTIONS() + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_cdc_excluded_ab4` +-- dedup_cdc_excluded from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..08416cc3cb4a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,25 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`dedup_exchange_rate` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from `dataline-integration-testing`.test_normalization.`dedup_exchange_rate_scd` +-- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..9ad6c0902f5e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,38 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`dedup_exchange_rate_scd` + + + OPTIONS() + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + date as _airbyte_start_at, + lag(date) over ( + partition by id, currency, cast(NZD as + string +) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id, currency, cast(NZD as + string +) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`dedup_exchange_rate_ab4` +-- dedup_exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..364bdfec888d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,24 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`exchange_rate` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`exchange_rate_ab3` +-- exchange_rate from `dataline-integration-testing`.test_normalization._airbyte_raw_exchange_rate + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql new file mode 100644 index 000000000000..0f4ca9548ef1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql @@ -0,0 +1,20 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + date, + `partition`, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_scd` +-- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql new file mode 100644 index 000000000000..c5cfbbd0b526 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql @@ -0,0 +1,20 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + DATA, + column___with__quotes, + _airbyte_emitted_at, + _airbyte_partition_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql new file mode 100644 index 000000000000..42cacd429408 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_DATA_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql new file mode 100644 index 000000000000..ef3a1635a6e4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql new file mode 100644 index 000000000000..088994fc6fc1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_partition` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql new file mode 100644 index 000000000000..33a8a28f33bd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -0,0 +1,29 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_scd` + + + OPTIONS() + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + date, + `partition`, + date as _airbyte_start_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`nested_stream_with_complex_columns_resulting_into_long_names_ab4` +-- nested_stream_with_complex_columns_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..271d231a59f9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`non_nested_stream_without_namespace_resulting_into_long_names_ab3` +-- non_nested_stream_without_namespace_resulting_into_long_names from `dataline-integration-testing`.test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..cf45f438b2ec --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from `dataline-integration-testing`._airbyte_test_normalization_namespace.`simple_stream_with_namespace_resulting_into_long_names_ab3` +-- simple_stream_with_namespace_resulting_into_long_names from `dataline-integration-testing`.test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..8556d7f50afb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..a1d77f379bce --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_ab1') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..2592ce581df8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab2') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..d6e2edb75ced --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..463a878933f8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..b98fcff9e377 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_hashid', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..e29eff6b3c01 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as {{ adapter.quote('groups') }}, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..759e3a18d132 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast({{ adapter.quote('groups') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('groups') }}, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..51035eb0946d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_2_hashid', + adapter.quote('groups'), + ]) }} as _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..be57970e399e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..cf0d9deb51cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, + _airbyte_emitted_at +from {{ ref('conflict_stream_scalar_ab1') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..b718d36bb399 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_scalar', + ]) }} as _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab2') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..106a78e83df7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as name, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..1fe684c4026d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(name as {{ dbt_utils.type_string() }}) as name, + cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ ref('dedup_cdc_excluded_ab1') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..3d994a17195d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,14 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'name', + '_ab_cdc_lsn', + '_ab_cdc_updated_at', + '_ab_cdc_deleted_at', + ]) }} as _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab2') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..4d4fe392fd7f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_cdc_excluded_ab3') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..2e5c76354fb8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as HKD_special___characters, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_special___characters_1, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..964b2903bbd1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast(date as {{ type_date() }}) as date, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast(HKD_special___characters as {{ dbt_utils.type_float() }}) as HKD_special___characters, + cast(HKD_special___characters_1 as {{ dbt_utils.type_string() }}) as HKD_special___characters_1, + cast(NZD as {{ dbt_utils.type_float() }}) as NZD, + cast(USD as {{ dbt_utils.type_float() }}) as USD, + _airbyte_emitted_at +from {{ ref('dedup_exchange_rate_ab1') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..5777735df222 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + 'date', + 'timestamp_col', + 'HKD_special___characters', + 'HKD_special___characters_1', + 'NZD', + 'USD', + ]) }} as _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab2') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..f45c79d39e27 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_exchange_rate_ab3') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..0cac51cb1e9c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as HKD_special___characters, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_special___characters_1, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..491934c06852 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast(date as {{ type_date() }}) as date, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast(HKD_special___characters as {{ dbt_utils.type_float() }}) as HKD_special___characters, + cast(HKD_special___characters_1 as {{ dbt_utils.type_string() }}) as HKD_special___characters_1, + cast(NZD as {{ dbt_utils.type_float() }}) as NZD, + cast(USD as {{ dbt_utils.type_float() }}) as USD, + _airbyte_emitted_at +from {{ ref('exchange_rate_ab1') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..a66fa4a7c245 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + 'date', + 'timestamp_col', + 'HKD_special___characters', + 'HKD_special___characters_1', + 'NZD', + 'USD', + ]) }} as _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab2') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..aaa4eb63f243 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..63bd774a716f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab1') }} +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..7d5fab4ab6a4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + adapter.quote('partition'), + ]) }} as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab2') }} +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql new file mode 100644 index 000000000000..8a2db82defcb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab3') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql new file mode 100644 index 000000000000..055fa0fd6186 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'DATA') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('DATA'), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'DATA') }} +where DATA is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql new file mode 100644 index 000000000000..be7b0d9e999d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab1') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql new file mode 100644 index 000000000000..d84ac21d8f82 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_DATA_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab2') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql new file mode 100644 index 000000000000..dbe34c46db5e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, + {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as DATA, + {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as column___with__quotes, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias +where {{ adapter.quote('partition') }} is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql new file mode 100644 index 000000000000..7c2087a397f4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + DATA, + column___with__quotes, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql new file mode 100644 index 000000000000..e63dd843831e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid', + array_to_string('double_array_data'), + array_to_string('DATA'), + array_to_string('column___with__quotes'), + ]) }} as _airbyte_partition_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql new file mode 100644 index 000000000000..4202a1cef1c6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'column___with__quotes') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('column___with__quotes'), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'column___with__quotes') }} +where column___with__quotes is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql new file mode 100644 index 000000000000..076b4bfc975c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql new file mode 100644 index 000000000000..36d43b45d0b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql new file mode 100644 index 000000000000..48b7ea236ae1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'double_array_data') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'double_array_data') }} +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql new file mode 100644 index 000000000000..a3e29e92dfb7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as {{ dbt_utils.type_string() }}) as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql new file mode 100644 index 000000000000..269418d7250d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'id', + ]) }} as _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..fd2fbdd54863 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..e4ed8d075d22 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + _airbyte_emitted_at +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab1') }} +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..55471ad5091e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + ]) }} as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab2') }} +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..e3ec7ffd2f82 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + _airbyte_emitted_at +from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..c437ca698089 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + _airbyte_emitted_at +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab1') }} +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..05770b856f50 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + ]) }} as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab2') }} +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..9ffda6086e35 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from {{ ref('conflict_stream_array_ab3') }} +-- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..8a83ccc01e31 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab3') }} +-- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..94a9dc3d0139 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..36c23b81b82d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + {{ adapter.quote('groups') }}, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..9d7acc846fd0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab3') }} +-- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..87007e001559 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,14 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_scd') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..f23636879592 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,23 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab4') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..605f71b2c4a5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,17 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_scd') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..040edf6efb32 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,26 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + date as _airbyte_start_at, + lag(date) over ( + partition by id, currency, cast(NZD as {{ dbt_utils.type_string() }}) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id, currency, cast(NZD as {{ dbt_utils.type_string() }}) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab4') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..49c0da07de8e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,16 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + HKD_special___characters, + HKD_special___characters_1, + NZD, + USD, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab3') }} +-- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql new file mode 100644 index 000000000000..d03125b32542 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + {{ adapter.quote('partition') }}, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_scd') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql new file mode 100644 index 000000000000..8461ffb2cabd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + DATA, + column___with__quotes, + _airbyte_emitted_at, + _airbyte_partition_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql new file mode 100644 index 000000000000..4e7bf4841bd5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_DATA_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_DATA_ab3') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql new file mode 100644 index 000000000000..2bd228318b0d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql new file mode 100644 index 000000000000..50b39ee05b38 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql new file mode 100644 index 000000000000..d9c12b8eb43a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -0,0 +1,21 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + date, + {{ adapter.quote('partition') }}, + date as _airbyte_start_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab4') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..1004a9e2f4a4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab3') }} +-- non_nested_stream_without_namespace_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..ce74645f7864 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab3') }} +-- simple_stream_with_namespace_resulting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml new file mode 100644 index 000000000000..69352d59cdbb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml @@ -0,0 +1,23 @@ +version: 2 +sources: +- name: test_normalization + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_conflict_stream_array + - name: _airbyte_raw_conflict_stream_name + - name: _airbyte_raw_conflict_stream_scalar + - name: _airbyte_raw_dedup_cdc_excluded + - name: _airbyte_raw_dedup_exchange_rate + - name: _airbyte_raw_exchange_rate + - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names + - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names +- name: test_normalization_namespace + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql new file mode 100644 index 000000000000..137d362d5e81 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`conflict_stream_array_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_array as char), '')) as char)) as _airbyte_conflict_stream_array_hashid +from _airbyte_test_normalization.`conflict_stream_array_ab2` +-- conflict_stream_array + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql new file mode 100644 index 000000000000..7a25f59f18f0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as json) as conflict_stream_name, + _airbyte_emitted_at +from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab1` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql new file mode 100644 index 000000000000..7606530234f4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_hashid as char), ''), '-', coalesce(cast(conflict_stream_name as char), '')) as char)) as _airbyte_conflict_stream_name_2_hashid +from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab2` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql new file mode 100644 index 000000000000..d786dfa4a89e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + json_value(conflict_stream_name, + '$."groups"') as `groups`, + _airbyte_emitted_at +from test_normalization.`conflict_stream_name_conflict_stream_name` as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql new file mode 100644 index 000000000000..3393dde64ef8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(`groups` as char) as `groups`, + _airbyte_emitted_at +from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab1` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql new file mode 100644 index 000000000000..ccf23dd250f3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_conflict_stream_name_2_hashid as char), ''), '-', coalesce(cast(`groups` as char), '')) as char)) as _airbyte_conflict_stream_name_3_hashid +from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab2` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..f9ad98a47215 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`conflict_stream_name_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as char) as id, + cast(conflict_stream_name as json) as conflict_stream_name, + _airbyte_emitted_at +from _airbyte_test_normalization.`conflict_stream_name_ab1` +-- conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..2d6eaa141987 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`conflict_stream_name_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_name as char), '')) as char)) as _airbyte_conflict_stream_name_hashid +from _airbyte_test_normalization.`conflict_stream_name_ab2` +-- conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..c97c708d399b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`conflict_stream_scalar_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."conflict_stream_scalar"') as conflict_stream_scalar, + _airbyte_emitted_at +from test_normalization._airbyte_raw_conflict_stream_scalar as table_alias +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..fc08f53590d0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`conflict_stream_scalar_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as char) as id, + cast(conflict_stream_scalar as + signed +) as conflict_stream_scalar, + _airbyte_emitted_at +from _airbyte_test_normalization.`conflict_stream_scalar_ab1` +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..46a35a436e7d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`conflict_stream_scalar_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(conflict_stream_scalar as char), '')) as char)) as _airbyte_conflict_stream_scalar_hashid +from _airbyte_test_normalization.`conflict_stream_scalar_ab2` +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..7778e7680509 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,19 @@ + + create view _airbyte_test_normalization.`dedup_cdc_excluded_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."name"') as `name`, + json_value(_airbyte_data, + '$."_ab_cdc_lsn"') as _ab_cdc_lsn, + json_value(_airbyte_data, + '$."_ab_cdc_updated_at"') as _ab_cdc_updated_at, + json_value(_airbyte_data, + '$."_ab_cdc_deleted_at"') as _ab_cdc_deleted_at, + _airbyte_emitted_at +from test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..f6294978ae38 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,22 @@ + + create view _airbyte_test_normalization.`dedup_cdc_excluded_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + signed +) as id, + cast(`name` as char) as `name`, + cast(_ab_cdc_lsn as + float +) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as + float +) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as + float +) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from _airbyte_test_normalization.`dedup_cdc_excluded_ab1` +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..2e9eb48cdef6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`dedup_cdc_excluded_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`name` as char), ''), '-', coalesce(cast(_ab_cdc_lsn as char), ''), '-', coalesce(cast(_ab_cdc_updated_at as char), ''), '-', coalesce(cast(_ab_cdc_deleted_at as char), '')) as char)) as _airbyte_dedup_cdc_excluded_hashid +from _airbyte_test_normalization.`dedup_cdc_excluded_ab2` +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..b96afb221807 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`dedup_cdc_excluded_ab4__dbt_tmp` as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from _airbyte_test_normalization.`dedup_cdc_excluded_ab3` +-- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..dae5bd72e4ab --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,25 @@ + + create view _airbyte_test_normalization.`dedup_exchange_rate_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."currency"') as currency, + json_value(_airbyte_data, + '$."date"') as `date`, + json_value(_airbyte_data, + '$."timestamp_col"') as timestamp_col, + json_value(_airbyte_data, + '$."HKD@spéçiäl & characters"') as `HKD@spéçiäl & characters`, + json_value(_airbyte_data, + '$."HKD_special___characters"') as hkd_special___characters, + json_value(_airbyte_data, + '$."NZD"') as nzd, + json_value(_airbyte_data, + '$."USD"') as usd, + _airbyte_emitted_at +from test_normalization._airbyte_raw_dedup_exchange_rate as table_alias +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..e14989d5c7a9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,27 @@ + + create view _airbyte_test_normalization.`dedup_exchange_rate_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + signed +) as id, + cast(currency as char) as currency, + cast(`date` as + date +) as `date`, + cast(timestamp_col as char) as timestamp_col, + cast(`HKD@spéçiäl & characters` as + float +) as `HKD@spéçiäl & characters`, + cast(hkd_special___characters as char) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from _airbyte_test_normalization.`dedup_exchange_rate_ab1` +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..866e607f1f80 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`dedup_exchange_rate_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(currency as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(timestamp_col as char), ''), '-', coalesce(cast(`HKD@spéçiäl & characters` as char), ''), '-', coalesce(cast(hkd_special___characters as char), ''), '-', coalesce(cast(nzd as char), ''), '-', coalesce(cast(usd as char), '')) as char)) as _airbyte_dedup_exchange_rate_hashid +from _airbyte_test_normalization.`dedup_exchange_rate_ab2` +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..0a30470b439a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`dedup_exchange_rate_ab4__dbt_tmp` as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from _airbyte_test_normalization.`dedup_exchange_rate_ab3` +-- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..b8662205d239 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,25 @@ + + create view _airbyte_test_normalization.`exchange_rate_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."currency"') as currency, + json_value(_airbyte_data, + '$."date"') as `date`, + json_value(_airbyte_data, + '$."timestamp_col"') as timestamp_col, + json_value(_airbyte_data, + '$."HKD@spéçiäl & characters"') as `HKD@spéçiäl & characters`, + json_value(_airbyte_data, + '$."HKD_special___characters"') as hkd_special___characters, + json_value(_airbyte_data, + '$."NZD"') as nzd, + json_value(_airbyte_data, + '$."USD"') as usd, + _airbyte_emitted_at +from test_normalization._airbyte_raw_exchange_rate as table_alias +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..7596a0158e24 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,27 @@ + + create view _airbyte_test_normalization.`exchange_rate_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + signed +) as id, + cast(currency as char) as currency, + cast(`date` as + date +) as `date`, + cast(timestamp_col as char) as timestamp_col, + cast(`HKD@spéçiäl & characters` as + float +) as `HKD@spéçiäl & characters`, + cast(hkd_special___characters as char) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from _airbyte_test_normalization.`exchange_rate_ab1` +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..d9340feb7057 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`exchange_rate_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(currency as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(timestamp_col as char), ''), '-', coalesce(cast(`HKD@spéçiäl & characters` as char), ''), '-', coalesce(cast(hkd_special___characters as char), ''), '-', coalesce(cast(nzd as char), ''), '-', coalesce(cast(usd as char), '')) as char)) as _airbyte_exchange_rate_hashid +from _airbyte_test_normalization.`exchange_rate_ab2` +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..23b64ee8f8e5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql @@ -0,0 +1,12 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as char) as id, + cast(`date` as char) as `date`, + cast(`partition` as json) as `partition`, + _airbyte_emitted_at +from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab1` +-- nested_stream_with_co__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..7aa6a87fea7d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), ''), '-', coalesce(cast(`partition` as char), '')) as char)) as _airbyte_nested_strea__nto_long_names_hashid +from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab2` +-- nested_stream_with_co__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql new file mode 100644 index 000000000000..83c81d9fc861 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab4__dbt_tmp` as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_strea__nto_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab3` +-- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql new file mode 100644 index 000000000000..5ba25fb20ebc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql @@ -0,0 +1,17 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_strea__nto_long_names_hashid, + json_extract(`partition`, + '$."double_array_data"') as double_array_data, + json_extract(`partition`, + '$."DATA"') as `DATA`, + json_extract(`partition`, + '$."column___with__quotes"') as `column__'with"_quotes`, + _airbyte_emitted_at +from test_normalization.`nested_stream_with_co__lting_into_long_names` as table_alias +where `partition` is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql new file mode 100644 index 000000000000..56a4acbc626d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_strea__nto_long_names_hashid, + double_array_data, + `DATA`, + `column__'with"_quotes`, + _airbyte_emitted_at +from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab1` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql new file mode 100644 index 000000000000..0c110f939152 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_nested_strea__nto_long_names_hashid as char), ''), '-', coalesce(cast(double_array_data as char), ''), '-', coalesce(cast(`DATA` as char), ''), '-', coalesce(cast(`column__'with"_quotes` as char), '')) as char)) as _airbyte_partition_hashid +from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab2` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql new file mode 100644 index 000000000000..6bb578315008 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql @@ -0,0 +1,59 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 2 + order by generated_number + + + ), + joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + + json_extract(double_array_data, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data + from test_normalization.`nested_stream_with_co___long_names_partition` + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_co___long_names_partition.double_array_data + where numbers.generated_number <= json_length(double_array_data) + ) +select + _airbyte_partition_hashid, + json_value(_airbyte_nested_data, + '$."id"') as id, + _airbyte_emitted_at +from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql new file mode 100644 index 000000000000..43a2faa29900 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as char) as id, + _airbyte_emitted_at +from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab1` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql new file mode 100644 index 000000000000..d7261b03b49c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(id as char), '')) as char)) as _airbyte_double_array_data_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab2` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql new file mode 100644 index 000000000000..a532d3e22f8f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql @@ -0,0 +1,59 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + + ), + joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + + json_extract(`DATA`, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data + from test_normalization.`nested_stream_with_co___long_names_partition` + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_co___long_names_partition.`DATA` + where numbers.generated_number <= json_length(`DATA`) + ) +select + _airbyte_partition_hashid, + json_value(_airbyte_nested_data, + '$."currency"') as currency, + _airbyte_emitted_at +from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where `DATA` is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql new file mode 100644 index 000000000000..4c7968e3c11d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as char) as currency, + _airbyte_emitted_at +from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab1` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql new file mode 100644 index 000000000000..01d00378e139 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(currency as char), '')) as char)) as _airbyte_data_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab2` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql new file mode 100644 index 000000000000..4f3b7632f1b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql @@ -0,0 +1,59 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + + ), + joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + + json_extract(`column__'with"_quotes`, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data + from test_normalization.`nested_stream_with_co___long_names_partition` + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_co___long_names_partition.`column__'with"_quotes` + where numbers.generated_number <= json_length(`column__'with"_quotes`) + ) +select + _airbyte_partition_hashid, + json_value(_airbyte_nested_data, + '$."currency"') as currency, + _airbyte_emitted_at +from test_normalization.`nested_stream_with_co___long_names_partition` as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where `column__'with"_quotes` is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql new file mode 100644 index 000000000000..097f8b5b835e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as char) as currency, + _airbyte_emitted_at +from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab1` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql new file mode 100644 index 000000000000..5f3ee64ee324 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_partition_hashid as char), ''), '-', coalesce(cast(currency as char), '')) as char)) as _airbyte_column___with__quotes_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab2` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql new file mode 100644 index 000000000000..590bb28948ca --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."date"') as `date`, + _airbyte_emitted_at +from test_normalization._airbyte_raw_non_nest__lting_into_long_names as table_alias +-- non_nested_stream_wit__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..8c37318b3d29 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as char) as id, + cast(`date` as char) as `date`, + _airbyte_emitted_at +from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab1` +-- non_nested_stream_wit__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..5108eb39e24d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), '')) as char)) as _airbyte_non_nested_s__nto_long_names_hashid +from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab2` +-- non_nested_stream_wit__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql new file mode 100644 index 000000000000..52aa78db11bd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_value(_airbyte_data, + '$."date"') as `date`, + _airbyte_emitted_at +from test_normalization_namespace._airbyte_raw_simple_s__lting_into_long_names as table_alias +-- simple_stream_with_na__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..679f88767d21 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql @@ -0,0 +1,11 @@ + + create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as char) as id, + cast(`date` as char) as `date`, + _airbyte_emitted_at +from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab1` +-- simple_stream_with_na__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..b6cf2f3be51b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(`date` as char), '')) as char)) as _airbyte_simple_strea__nto_long_names_hashid +from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab2` +-- simple_stream_with_na__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..2c1eed7331a4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`conflict_stream_array__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from _airbyte_test_normalization.`conflict_stream_array_ab3` +-- conflict_stream_array from test_normalization._airbyte_raw_conflict_stream_array + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..d341fcab11c6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`conflict_stream_name__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from _airbyte_test_normalization.`conflict_stream_name_ab3` +-- conflict_stream_name from test_normalization._airbyte_raw_conflict_stream_name + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql new file mode 100644 index 000000000000..c55a5e3a62ed --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`conflict_stream_name____conflict_stream_name__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + `groups`, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from _airbyte_test_normalization.`conflict_stream_name__3flict_stream_name_ab3` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from test_normalization.`conflict_stream_name_conflict_stream_name` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..8cf88cc99275 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`conflict_stream_name_conflict_stream_name__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from _airbyte_test_normalization.`conflict_stream_name__2flict_stream_name_ab3` +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from test_normalization.`conflict_stream_name` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..aad49db6aa81 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`conflict_stream_scalar__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from _airbyte_test_normalization.`conflict_stream_scalar_ab3` +-- conflict_stream_scalar from test_normalization._airbyte_raw_conflict_stream_scalar + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..25ac49405092 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,19 @@ + + + create table + test_normalization.`dedup_cdc_excluded__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + `name`, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from test_normalization.`dedup_cdc_excluded_scd` +-- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_active_row = True + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..6872e6885312 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,28 @@ + + + create table + test_normalization.`dedup_cdc_excluded_scd__dbt_tmp` + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + `name`, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from _airbyte_test_normalization.`dedup_cdc_excluded_ab4` +-- dedup_cdc_excluded from test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_row_num = 1 + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..4c2d410588c1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,22 @@ + + + create table + test_normalization.`dedup_exchange_rate__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + currency, + `date`, + timestamp_col, + `HKD@spéçiäl & characters`, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from test_normalization.`dedup_exchange_rate_scd` +-- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_active_row = True + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..e1f99c510d00 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,31 @@ + + + create table + test_normalization.`dedup_exchange_rate_scd__dbt_tmp` + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + `date`, + timestamp_col, + `HKD@spéçiäl & characters`, + hkd_special___characters, + nzd, + usd, + `date` as _airbyte_start_at, + lag(`date`) over ( + partition by id, currency, cast(nzd as char) + order by `date` is null asc, `date` desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(`date`) over ( + partition by id, currency, cast(nzd as char) + order by `date` is null asc, `date` desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from _airbyte_test_normalization.`dedup_exchange_rate_ab4` +-- dedup_exchange_rate from test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_row_num = 1 + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..e24cf0e7d279 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,21 @@ + + + create table + test_normalization.`exchange_rate__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + currency, + `date`, + timestamp_col, + `HKD@spéçiäl & characters`, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from _airbyte_test_normalization.`exchange_rate_ab3` +-- exchange_rate from test_normalization._airbyte_raw_exchange_rate + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql new file mode 100644 index 000000000000..4e0270422a03 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql @@ -0,0 +1,26 @@ + + + create table + test_normalization.`nested_stream_with_co_1g_into_long_names_scd__dbt_tmp` + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + `date`, + `partition`, + `date` as _airbyte_start_at, + lag(`date`) over ( + partition by id + order by `date` is null asc, `date` desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(`date`) over ( + partition by id + order by `date` is null asc, `date` desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_strea__nto_long_names_hashid +from _airbyte_test_normalization.`nested_stream_with_co_1g_into_long_names_ab4` +-- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names +where _airbyte_row_num = 1 + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql new file mode 100644 index 000000000000..a796e4bec478 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql @@ -0,0 +1,17 @@ + + + create table + test_normalization.`nested_stream_with_co___long_names_partition__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_nested_strea__nto_long_names_hashid, + double_array_data, + `DATA`, + `column__'with"_quotes`, + _airbyte_emitted_at, + _airbyte_partition_hashid +from _airbyte_test_normalization.`nested_stream_with_co_2g_names_partition_ab3` +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from test_normalization.`nested_stream_with_co__lting_into_long_names` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql new file mode 100644 index 000000000000..829800f026b8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`nested_stream_with_co___names_partition_data__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3es_partition_data_ab3` +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from test_normalization.`nested_stream_with_co___long_names_partition` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql new file mode 100644 index 000000000000..c65521b6b2c2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`nested_stream_with_co__column___with__quotes__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3mn___with__quotes_ab3` +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from test_normalization.`nested_stream_with_co___long_names_partition` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql new file mode 100644 index 000000000000..e0795e0c729c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`nested_stream_with_co__ion_double_array_data__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from _airbyte_test_normalization.`nested_stream_with_co_3double_array_data_ab3` +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from test_normalization.`nested_stream_with_co___long_names_partition` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql new file mode 100644 index 000000000000..f74292f7598c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql @@ -0,0 +1,17 @@ + + + create table + test_normalization.`nested_stream_with_co__lting_into_long_names__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + `date`, + `partition`, + _airbyte_emitted_at, + _airbyte_nested_strea__nto_long_names_hashid +from test_normalization.`nested_stream_with_co_1g_into_long_names_scd` +-- nested_stream_with_co__lting_into_long_names from test_normalization._airbyte_raw_nested_s__lting_into_long_names +where _airbyte_active_row = True + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql new file mode 100644 index 000000000000..d80970404ecf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`non_nested_stream_wit__lting_into_long_names__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + `date`, + _airbyte_emitted_at, + _airbyte_non_nested_s__nto_long_names_hashid +from _airbyte_test_normalization.`non_nested_stream_wit_1g_into_long_names_ab3` +-- non_nested_stream_wit__lting_into_long_names from test_normalization._airbyte_raw_non_nest__lting_into_long_names + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql new file mode 100644 index 000000000000..c7220f05c387 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization_namespace.`simple_stream_with_na__lting_into_long_names__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + `date`, + _airbyte_emitted_at, + _airbyte_simple_strea__nto_long_names_hashid +from _airbyte_test_normalization_namespace.`simple_stream_with_na_1g_into_long_names_ab3` +-- simple_stream_with_na__lting_into_long_names from test_normalization_namespace._airbyte_raw_simple_s__lting_into_long_names + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql new file mode 100644 index 000000000000..d6e2edb75ced --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql new file mode 100644 index 000000000000..d31ae94a8814 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name__2flict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql new file mode 100644 index 000000000000..b7b7a73a467d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__2flict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_hashid', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name__2flict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql new file mode 100644 index 000000000000..e29eff6b3c01 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as {{ adapter.quote('groups') }}, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql new file mode 100644 index 000000000000..e131f0fc01c1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast({{ adapter.quote('groups') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('groups') }}, + _airbyte_emitted_at +from {{ ref('conflict_stream_name__3flict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql new file mode 100644 index 000000000000..f68eaea79d22 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name__3flict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_2_hashid', + adapter.quote('groups'), + ]) }} as _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name__3flict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..8556d7f50afb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..a1d77f379bce --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_ab1') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..2592ce581df8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab2') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..be57970e399e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..cf0d9deb51cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, + _airbyte_emitted_at +from {{ ref('conflict_stream_scalar_ab1') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..b718d36bb399 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_scalar', + ]) }} as _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab2') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..55bf95295a24 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..ce757361bd0a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, + cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ ref('dedup_cdc_excluded_ab1') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..f508b2211f14 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,14 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + adapter.quote('name'), + '_ab_cdc_lsn', + '_ab_cdc_updated_at', + '_ab_cdc_deleted_at', + ]) }} as _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab2') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..4d4fe392fd7f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_cdc_excluded_ab3') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..c9a6865ef7fd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..07a1a6cade5a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('dedup_exchange_rate_ab1') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..c198740dc7b2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + adapter.quote('date'), + 'timestamp_col', + adapter.quote('HKD@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab2') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..f45c79d39e27 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_exchange_rate_ab3') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..3e66f6d0b4fc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..cd1a48278828 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('exchange_rate_ab1') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..11997b31c804 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + adapter.quote('date'), + 'timestamp_col', + adapter.quote('HKD@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab2') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql new file mode 100644 index 000000000000..8f7cabd6d907 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} as table_alias +-- nested_stream_with_co__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..6b268cccc087 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co_1g_into_long_names_ab1') }} +-- nested_stream_with_co__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..fbeeeedfd617 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + adapter.quote('date'), + adapter.quote('partition'), + ]) }} as _airbyte_nested_strea__nto_long_names_hashid +from {{ ref('nested_stream_with_co_1g_into_long_names_ab2') }} +-- nested_stream_with_co__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql new file mode 100644 index 000000000000..87b9a5bbfa1f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_1g_into_long_names_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_strea__nto_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('nested_stream_with_co_1g_into_long_names_ab3') }} +-- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql new file mode 100644 index 000000000000..31f6b6a06672 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_strea__nto_long_names_hashid, + {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, + {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as {{ adapter.quote('DATA') }}, + {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column__\'with"_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co__lting_into_long_names') }} as table_alias +where {{ adapter.quote('partition') }} is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql new file mode 100644 index 000000000000..81aae267055d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab2.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_strea__nto_long_names_hashid, + double_array_data, + {{ adapter.quote('DATA') }}, + {{ adapter.quote('column__\'with"_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co_2g_names_partition_ab1') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql new file mode 100644 index 000000000000..47333f92a2c9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_2g_names_partition_ab3.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_nested_strea__nto_long_names_hashid', + array_to_string('double_array_data'), + array_to_string(adapter.quote('DATA')), + array_to_string(adapter.quote('column__\'with"_quotes')), + ]) }} as _airbyte_partition_hashid +from {{ ref('nested_stream_with_co_2g_names_partition_ab2') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql new file mode 100644 index 000000000000..5b3a0601175b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', 'double_array_data') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'double_array_data') }} +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql new file mode 100644 index 000000000000..b4357e9d1f1e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as {{ dbt_utils.type_string() }}) as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co_3double_array_data_ab1') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql new file mode 100644 index 000000000000..eb092411884f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3double_array_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'id', + ]) }} as _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_co_3double_array_data_ab2') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql new file mode 100644 index 000000000000..d5c4708f7e07 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', adapter.quote('DATA')) }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value(adapter.quote('DATA')), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', adapter.quote('DATA')) }} +where {{ adapter.quote('DATA') }} is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql new file mode 100644 index 000000000000..baad4bbf0f14 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co_3es_partition_data_ab1') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql new file mode 100644 index 000000000000..1bcd5df3b9a8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3es_partition_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_data_hashid +from {{ ref('nested_stream_with_co_3es_partition_data_ab2') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql new file mode 100644 index 000000000000..f8b1f55fc4df --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_co___long_names_partition', 'partition', adapter.quote('column__\'with"_quotes')) }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value(adapter.quote('column__\'with"_quotes')), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', adapter.quote('column__\'with"_quotes')) }} +where {{ adapter.quote('column__\'with"_quotes') }} is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql new file mode 100644 index 000000000000..32acb349e636 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_co_3mn___with__quotes_ab1') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql new file mode 100644 index 000000000000..38b83239564d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_co_3mn___with__quotes_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_co_3mn___with__quotes_ab2') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql new file mode 100644 index 000000000000..6575f5003ddf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_non_nest__lting_into_long_names') }} as table_alias +-- non_nested_stream_wit__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..d8d262e97685 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ ref('non_nested_stream_wit_1g_into_long_names_ab1') }} +-- non_nested_stream_wit__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..184c3858c4c2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wit_1g_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + adapter.quote('date'), + ]) }} as _airbyte_non_nested_s__nto_long_names_hashid +from {{ ref('non_nested_stream_wit_1g_into_long_names_ab2') }} +-- non_nested_stream_wit__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql new file mode 100644 index 000000000000..ab36933bcef0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ source('test_normalization_namespace', '_airbyte_raw_simple_s__lting_into_long_names') }} as table_alias +-- simple_stream_with_na__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql new file mode 100644 index 000000000000..0cd875e93da8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ ref('simple_stream_with_na_1g_into_long_names_ab1') }} +-- simple_stream_with_na__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql new file mode 100644 index 000000000000..b22a624397a5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_na_1g_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + adapter.quote('date'), + ]) }} as _airbyte_simple_strea__nto_long_names_hashid +from {{ ref('simple_stream_with_na_1g_into_long_names_ab2') }} +-- simple_stream_with_na__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..9ffda6086e35 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from {{ ref('conflict_stream_array_ab3') }} +-- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..8a83ccc01e31 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab3') }} +-- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql new file mode 100644 index 000000000000..ac40e0861b86 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name____conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + {{ adapter.quote('groups') }}, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name__3flict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..ea20646f8121 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name__2flict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..9d7acc846fd0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab3') }} +-- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..986edf9cec20 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,14 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + {{ adapter.quote('name') }}, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_scd') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..6f958b9b0405 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,23 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + {{ adapter.quote('name') }}, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab4') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..6a36d1914bb9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,17 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_scd') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..e92415dd94b7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,26 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + {{ adapter.quote('date') }} as _airbyte_start_at, + lag({{ adapter.quote('date') }}) over ( + partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag({{ adapter.quote('date') }}) over ( + partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab4') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..147399e6739d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,16 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab3') }} +-- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql new file mode 100644 index 000000000000..f66d317eba17 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co_1g_into_long_names_scd.sql @@ -0,0 +1,21 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + {{ adapter.quote('date') }}, + {{ adapter.quote('partition') }}, + {{ adapter.quote('date') }} as _airbyte_start_at, + lag({{ adapter.quote('date') }}) over ( + partition by id + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag({{ adapter.quote('date') }}) over ( + partition by id + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_strea__nto_long_names_hashid +from {{ ref('nested_stream_with_co_1g_into_long_names_ab4') }} +-- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql new file mode 100644 index 000000000000..b64a0b856c0e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___long_names_partition.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_nested_strea__nto_long_names_hashid, + double_array_data, + {{ adapter.quote('DATA') }}, + {{ adapter.quote('column__\'with"_quotes') }}, + _airbyte_emitted_at, + _airbyte_partition_hashid +from {{ ref('nested_stream_with_co_2g_names_partition_ab3') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_co__lting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql new file mode 100644 index 000000000000..eec219cee615 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co___names_partition_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from {{ ref('nested_stream_with_co_3es_partition_data_ab3') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_co___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql new file mode 100644 index 000000000000..b7c647643b54 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__column___with__quotes.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_co_3mn___with__quotes_ab3') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_co___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql new file mode 100644 index 000000000000..eb0f195e2786 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__ion_double_array_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_co_3double_array_data_ab3') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_co___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql new file mode 100644 index 000000000000..acb26a1d1689 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_co__lting_into_long_names.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + {{ adapter.quote('date') }}, + {{ adapter.quote('partition') }}, + _airbyte_emitted_at, + _airbyte_nested_strea__nto_long_names_hashid +from {{ ref('nested_stream_with_co_1g_into_long_names_scd') }} +-- nested_stream_with_co__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_s__lting_into_long_names') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql new file mode 100644 index 000000000000..12fcd9b638fa --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wit__lting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + {{ adapter.quote('date') }}, + _airbyte_emitted_at, + _airbyte_non_nested_s__nto_long_names_hashid +from {{ ref('non_nested_stream_wit_1g_into_long_names_ab3') }} +-- non_nested_stream_wit__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nest__lting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql new file mode 100644 index 000000000000..fdd42e4ce199 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_na__lting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} +-- Final base SQL model +select + id, + {{ adapter.quote('date') }}, + _airbyte_emitted_at, + _airbyte_simple_strea__nto_long_names_hashid +from {{ ref('simple_stream_with_na_1g_into_long_names_ab3') }} +-- simple_stream_with_na__lting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_s__lting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml new file mode 100644 index 000000000000..50c2d2f68ee8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml @@ -0,0 +1,23 @@ +version: 2 +sources: +- name: test_normalization + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_conflict_stream_array + - name: _airbyte_raw_conflict_stream_name + - name: _airbyte_raw_conflict_stream_scalar + - name: _airbyte_raw_dedup_cdc_excluded + - name: _airbyte_raw_dedup_exchange_rate + - name: _airbyte_raw_exchange_rate + - name: _airbyte_raw_nested_s__lting_into_long_names + - name: _airbyte_raw_non_nest__lting_into_long_names +- name: test_normalization_namespace + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_simple_s__lting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql new file mode 100644 index 000000000000..8500eff53443 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_array_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_array_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(conflict_stream_array as + varchar +), '') + + as + varchar +)) as _airbyte_conflict_stream_array_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_array_ab2" +-- conflict_stream_array + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..6269ba0ab954 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql @@ -0,0 +1,12 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + jsonb_extract_path_text(conflict_stream_name, 'groups') as groups, + _airbyte_emitted_at +from "postgres".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..671aa9e8df7d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(groups as + varchar +) as groups, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab1" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..e69069730d4e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_conflict_stream_name_2_hashid as + varchar +), '') || '-' || coalesce(cast(groups as + varchar +), '') + + as + varchar +)) as _airbyte_conflict_stream_name_3_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab2" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..5bbbb58c1832 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,15 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + varchar +) as "id", + cast(conflict_stream_name as + jsonb +) as conflict_stream_name, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."conflict_stream_name_ab1" +-- conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..7c40908fb2c9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(conflict_stream_name as + varchar +), '') + + as + varchar +)) as _airbyte_conflict_stream_name_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name_ab2" +-- conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..3df5e1f853fa --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as + jsonb +) as conflict_stream_name, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab1" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..b235f3bc52a8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_conflict_stream_name_hashid as + varchar +), '') || '-' || coalesce(cast(conflict_stream_name as + varchar +), '') + + as + varchar +)) as _airbyte_conflict_stream_name_2_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab2" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..c6c3552e6f57 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,11 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'conflict_stream_scalar') as conflict_stream_scalar, + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..06644717b27d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,15 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + varchar +) as "id", + cast(conflict_stream_scalar as + bigint +) as conflict_stream_scalar, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab1" +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..e7f113930022 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(conflict_stream_scalar as + varchar +), '') + + as + varchar +)) as _airbyte_conflict_stream_scalar_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab2" +-- conflict_stream_scalar + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..baee172f729c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,14 @@ + + create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'name') as "name", + jsonb_extract_path_text(_airbyte_data, '_ab_cdc_lsn') as _ab_cdc_lsn, + jsonb_extract_path_text(_airbyte_data, '_ab_cdc_updated_at') as _ab_cdc_updated_at, + jsonb_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at') as _ab_cdc_deleted_at, + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..4475c2007662 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,24 @@ + + create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + bigint +) as "id", + cast("name" as + varchar +) as "name", + cast(_ab_cdc_lsn as + float +) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as + float +) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as + float +) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab1" +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..5a2f3b8ed151 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,26 @@ + + create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast("name" as + varchar +), '') || '-' || coalesce(cast(_ab_cdc_lsn as + varchar +), '') || '-' || coalesce(cast(_ab_cdc_updated_at as + varchar +), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as + varchar +), '') + + as + varchar +)) as _airbyte_dedup_cdc_excluded_hashid +from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab2" +-- dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..10fcc0fdcf89 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab4__dbt_tmp" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab3" +-- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..46e7afe4f771 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,17 @@ + + create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'currency') as currency, + jsonb_extract_path_text(_airbyte_data, 'date') as "date", + jsonb_extract_path_text(_airbyte_data, 'timestamp_col') as timestamp_col, + jsonb_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters') as "HKD@spéçiäl & characters", + jsonb_extract_path_text(_airbyte_data, 'HKD_special___characters') as hkd_special___characters, + jsonb_extract_path_text(_airbyte_data, 'NZD') as nzd, + jsonb_extract_path_text(_airbyte_data, 'USD') as usd, + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..ac3cb3c5c83e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,33 @@ + + create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + bigint +) as "id", + cast(currency as + varchar +) as currency, + cast("date" as + date +) as "date", + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("HKD@spéçiäl & characters" as + float +) as "HKD@spéçiäl & characters", + cast(hkd_special___characters as + varchar +) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab1" +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..6a15113888d2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,32 @@ + + create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(currency as + varchar +), '') || '-' || coalesce(cast("date" as + varchar +), '') || '-' || coalesce(cast(timestamp_col as + varchar +), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as + varchar +), '') || '-' || coalesce(cast(hkd_special___characters as + varchar +), '') || '-' || coalesce(cast(nzd as + varchar +), '') || '-' || coalesce(cast(usd as + varchar +), '') + + as + varchar +)) as _airbyte_dedup_exchange_rate_hashid +from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab2" +-- dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..ca05d1103742 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab4__dbt_tmp" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab3" +-- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..a9de573688ab --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,17 @@ + + create view "postgres"._airbyte_test_normalization."exchange_rate_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'currency') as currency, + jsonb_extract_path_text(_airbyte_data, 'date') as "date", + jsonb_extract_path_text(_airbyte_data, 'timestamp_col') as timestamp_col, + jsonb_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters') as "HKD@spéçiäl & characters", + jsonb_extract_path_text(_airbyte_data, 'HKD_special___characters') as hkd_special___characters, + jsonb_extract_path_text(_airbyte_data, 'NZD') as nzd, + jsonb_extract_path_text(_airbyte_data, 'USD') as usd, + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_exchange_rate as table_alias +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..689928644db7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,33 @@ + + create view "postgres"._airbyte_test_normalization."exchange_rate_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + bigint +) as "id", + cast(currency as + varchar +) as currency, + cast("date" as + date +) as "date", + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("HKD@spéçiäl & characters" as + float +) as "HKD@spéçiäl & characters", + cast(hkd_special___characters as + varchar +) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."exchange_rate_ab1" +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..ae2d7c56dba0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,32 @@ + + create view "postgres"._airbyte_test_normalization."exchange_rate_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(currency as + varchar +), '') || '-' || coalesce(cast("date" as + varchar +), '') || '-' || coalesce(cast(timestamp_col as + varchar +), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as + varchar +), '') || '-' || coalesce(cast(hkd_special___characters as + varchar +), '') || '-' || coalesce(cast(nzd as + varchar +), '') || '-' || coalesce(cast(usd as + varchar +), '') + + as + varchar +)) as _airbyte_exchange_rate_hashid +from "postgres"._airbyte_test_normalization."exchange_rate_ab2" +-- exchange_rate + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql new file mode 100644 index 000000000000..a15d7c286441 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql @@ -0,0 +1,14 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stre__nto_long_names_hashid, + jsonb_extract_path("partition", 'double_array_data') as double_array_data, + jsonb_extract_path("partition", 'DATA') as "DATA", + jsonb_extract_path("partition", 'column`_''with"_quotes') as "column`_'with""_quotes", + _airbyte_emitted_at +from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names" as table_alias +where "partition" is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql new file mode 100644 index 000000000000..8beca5ca9421 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stre__nto_long_names_hashid, + double_array_data, + "DATA", + "column`_'with""_quotes", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab1" +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql new file mode 100644 index 000000000000..9b8d014e5d78 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql @@ -0,0 +1,24 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_nested_stre__nto_long_names_hashid as + varchar +), '') || '-' || coalesce(cast(double_array_data as + varchar +), '') || '-' || coalesce(cast("DATA" as + varchar +), '') || '-' || coalesce(cast("column`_'with""_quotes" as + varchar +), '') + + as + varchar +)) as _airbyte_partition_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab2" +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql new file mode 100644 index 000000000000..7257a111900c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql @@ -0,0 +1,18 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + jsonb_extract_path_text(_airbyte_nested_data, 'currency') as currency, + _airbyte_emitted_at +from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias +cross join jsonb_array_elements( + case jsonb_typeof("DATA") + when 'array' then "DATA" + else '[]' end + ) as _airbyte_nested_data +where "DATA" is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql new file mode 100644 index 000000000000..190e0bc7efdc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as + varchar +) as currency, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab1" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql new file mode 100644 index 000000000000..58ff5cfc7e82 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as + varchar +), '') || '-' || coalesce(cast(currency as + varchar +), '') + + as + varchar +)) as _airbyte_data_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab2" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql new file mode 100644 index 000000000000..4f5262e747d7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql @@ -0,0 +1,18 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + jsonb_extract_path_text(_airbyte_nested_data, 'currency') as currency, + _airbyte_emitted_at +from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias +cross join jsonb_array_elements( + case jsonb_typeof("column`_'with""_quotes") + when 'array' then "column`_'with""_quotes" + else '[]' end + ) as _airbyte_nested_data +where "column`_'with""_quotes" is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql new file mode 100644 index 000000000000..6731a64c8070 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as + varchar +) as currency, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab1" +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql new file mode 100644 index 000000000000..6c6c1603b79f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as + varchar +), '') || '-' || coalesce(cast(currency as + varchar +), '') + + as + varchar +)) as _airbyte_column___with__quotes_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab2" +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql new file mode 100644 index 000000000000..e6cab758b3bd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql @@ -0,0 +1,18 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_partition_hashid, + jsonb_extract_path_text(_airbyte_nested_data, 'id') as "id", + _airbyte_emitted_at +from "postgres".test_normalization."nested_stream_with_c___long_names_partition" as table_alias +cross join jsonb_array_elements( + case jsonb_typeof(double_array_data) + when 'array' then double_array_data + else '[]' end + ) as _airbyte_nested_data +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql new file mode 100644 index 000000000000..dab5ccb08a17 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast("id" as + varchar +) as "id", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab1" +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql new file mode 100644 index 000000000000..8c47eda0f932 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as + varchar +), '') || '-' || coalesce(cast("id" as + varchar +), '') + + as + varchar +)) as _airbyte_double_array_data_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab2" +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..90dadf5dd098 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql @@ -0,0 +1,18 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + varchar +) as "id", + cast("date" as + varchar +) as "date", + cast("partition" as + jsonb +) as "partition", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab1" +-- nested_stream_with_c__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..06d876930592 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql @@ -0,0 +1,22 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast("date" as + varchar +), '') || '-' || coalesce(cast("partition" as + varchar +), '') + + as + varchar +)) as _airbyte_nested_stre__nto_long_names_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab2" +-- nested_stream_with_c__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql new file mode 100644 index 000000000000..bb6432e71127 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab4__dbt_tmp" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stre__nto_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab3" +-- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql new file mode 100644 index 000000000000..27fd33e91cea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql @@ -0,0 +1,11 @@ + + create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'date') as "date", + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias +-- non_nested_stream_wi__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..648f2c41da70 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql @@ -0,0 +1,15 @@ + + create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + varchar +) as "id", + cast("date" as + varchar +) as "date", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab1" +-- non_nested_stream_wi__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..caf423880e25 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast("date" as + varchar +), '') + + as + varchar +)) as _airbyte_non_nested___nto_long_names_hashid +from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab2" +-- non_nested_stream_wi__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql new file mode 100644 index 000000000000..c2357389f4d2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql @@ -0,0 +1,11 @@ + + create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path_text(_airbyte_data, 'date') as "date", + _airbyte_emitted_at +from "postgres".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias +-- simple_stream_with_n__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..9beefb4a2609 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql @@ -0,0 +1,15 @@ + + create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + varchar +) as "id", + cast("date" as + varchar +) as "date", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab1" +-- simple_stream_with_n__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..a3179bf4347a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast("date" as + varchar +), '') + + as + varchar +)) as _airbyte_simple_stre__nto_long_names_hashid +from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab2" +-- simple_stream_with_n__lting_into_long_names + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..82df6d490af6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."conflict_stream_array__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_array_ab3" +-- conflict_stream_array from "postgres".test_normalization._airbyte_raw_conflict_stream_array + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..2621ce2ba6eb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."conflict_stream_name__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name_ab3" +-- conflict_stream_name from "postgres".test_normalization._airbyte_raw_conflict_stream_name + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql new file mode 100644 index 000000000000..42f7228477cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."conflict_stream_name___conflict_stream_name__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + groups, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name___conflict_stream_name_ab3" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "postgres".test_normalization."conflict_stream_name_conflict_stream_name" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..d78bcb97cd2a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."conflict_stream_name_conflict_stream_name__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_name_conflict_stream_name_ab3" +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from "postgres".test_normalization."conflict_stream_name" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..a1fa74a3691d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."conflict_stream_scalar__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from "postgres"._airbyte_test_normalization."conflict_stream_scalar_ab3" +-- conflict_stream_scalar from "postgres".test_normalization._airbyte_raw_conflict_stream_scalar + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..2c2f7d2d5774 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,18 @@ + + + create table "postgres".test_normalization."dedup_cdc_excluded__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + "name", + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from "postgres".test_normalization."dedup_cdc_excluded_scd" +-- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..67d1dc16edbe --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,27 @@ + + + create table "postgres".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + "id", + "name", + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by "id" + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by "id" + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from "postgres"._airbyte_test_normalization."dedup_cdc_excluded_ab4" +-- dedup_cdc_excluded from "postgres".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..b78e23f05e8e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,21 @@ + + + create table "postgres".test_normalization."dedup_exchange_rate__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + currency, + "date", + timestamp_col, + "HKD@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from "postgres".test_normalization."dedup_exchange_rate_scd" +-- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..de79b6d359e4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,34 @@ + + + create table "postgres".test_normalization."dedup_exchange_rate_scd__dbt_tmp" + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + "id", + currency, + "date", + timestamp_col, + "HKD@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + "date" as _airbyte_start_at, + lag("date") over ( + partition by "id", currency, cast(nzd as + varchar +) + order by "date" is null asc, "date" desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag("date") over ( + partition by "id", currency, cast(nzd as + varchar +) + order by "date" is null asc, "date" desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from "postgres"._airbyte_test_normalization."dedup_exchange_rate_ab4" +-- dedup_exchange_rate from "postgres".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..aa65fa214765 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,20 @@ + + + create table "postgres".test_normalization."exchange_rate__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + currency, + "date", + timestamp_col, + "HKD@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from "postgres"._airbyte_test_normalization."exchange_rate_ab3" +-- exchange_rate from "postgres".test_normalization._airbyte_raw_exchange_rate + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql new file mode 100644 index 000000000000..05b5585f6de3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql @@ -0,0 +1,16 @@ + + + create table "postgres".test_normalization."nested_stream_with_c___long_names_partition__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_nested_stre__nto_long_names_hashid, + double_array_data, + "DATA", + "column`_'with""_quotes", + _airbyte_emitted_at, + _airbyte_partition_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c___long_names_partition_ab3" +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql new file mode 100644 index 000000000000..8a5b484f27c8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."nested_stream_with_c___names_partition_data__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c___names_partition_data_ab3" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "postgres".test_normalization."nested_stream_with_c___long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql new file mode 100644 index 000000000000..357223729efc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."nested_stream_with_c__column___with__quotes__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__column___with__quotes_ab3" +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "postgres".test_normalization."nested_stream_with_c___long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql new file mode 100644 index 000000000000..a1ee4e50790b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."nested_stream_with_c__ion_double_array_data__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_partition_hashid, + "id", + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__ion_double_array_data_ab3" +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "postgres".test_normalization."nested_stream_with_c___long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql new file mode 100644 index 000000000000..8f474cacc3f5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql @@ -0,0 +1,16 @@ + + + create table "postgres".test_normalization."nested_stream_with_c__lting_into_long_names__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + "date", + "partition", + _airbyte_emitted_at, + _airbyte_nested_stre__nto_long_names_hashid +from "postgres".test_normalization."nested_stream_with_c__lting_into_long_names_scd" +-- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql new file mode 100644 index 000000000000..c5a25a9e3c14 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql @@ -0,0 +1,25 @@ + + + create table "postgres".test_normalization."nested_stream_with_c__lting_into_long_names_scd__dbt_tmp" + as ( + +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + "id", + "date", + "partition", + "date" as _airbyte_start_at, + lag("date") over ( + partition by "id" + order by "date" is null asc, "date" desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag("date") over ( + partition by "id" + order by "date" is null asc, "date" desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stre__nto_long_names_hashid +from "postgres"._airbyte_test_normalization."nested_stream_with_c__lting_into_long_names_ab4" +-- nested_stream_with_c__lting_into_long_names from "postgres".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql new file mode 100644 index 000000000000..f3d8553a5893 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."non_nested_stream_wi__lting_into_long_names__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + "date", + _airbyte_emitted_at, + _airbyte_non_nested___nto_long_names_hashid +from "postgres"._airbyte_test_normalization."non_nested_stream_wi__lting_into_long_names_ab3" +-- non_nested_stream_wi__lting_into_long_names from "postgres".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql new file mode 100644 index 000000000000..87e70a69c3e6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization_namespace."simple_stream_with_n__lting_into_long_names__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + "date", + _airbyte_emitted_at, + _airbyte_simple_stre__nto_long_names_hashid +from "postgres"._airbyte_test_normalization_namespace."simple_stream_with_n__lting_into_long_names_ab3" +-- simple_stream_with_n__lting_into_long_names from "postgres".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..77e7bd31c512 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as groups, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..683cf66727ac --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(groups as {{ dbt_utils.type_string() }}) as groups, + _airbyte_emitted_at +from {{ ref('conflict_stream_name___conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..16a089834117 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name___conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_2_hashid', + 'groups', + ]) }} as _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name___conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..1026b2100308 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..020604d3bd83 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_ab1') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..54db283fd286 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab2') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..d6e2edb75ced --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..463a878933f8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..b98fcff9e377 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_hashid', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..95f08b861d80 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..cd0a70325db6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, + _airbyte_emitted_at +from {{ ref('conflict_stream_scalar_ab1') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..d80993da2177 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + 'conflict_stream_scalar', + ]) }} as _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab2') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..f0c218e7e7f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as {{ adapter.quote('name') }}, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..7dc4066c3d18 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, + cast({{ adapter.quote('name') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('name') }}, + cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ ref('dedup_cdc_excluded_ab1') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..8350a86ba290 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,14 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + adapter.quote('name'), + '_ab_cdc_lsn', + '_ab_cdc_updated_at', + '_ab_cdc_deleted_at', + ]) }} as _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab2') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..4d4fe392fd7f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_cdc_excluded_ab3') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..2703c06376ce --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..20829aa2d465 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('dedup_exchange_rate_ab1') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..c345cd6dec77 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + 'currency', + adapter.quote('date'), + 'timestamp_col', + adapter.quote('HKD@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab2') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..f45c79d39e27 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_exchange_rate_ab3') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..a68cce687ef9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..ba1cfde6e9fc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast({{ adapter.quote('date') }} as {{ type_date() }}) as {{ adapter.quote('date') }}, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('exchange_rate_ab1') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..5933e055cdfe --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + 'currency', + adapter.quote('date'), + 'timestamp_col', + adapter.quote('HKD@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab2') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql new file mode 100644 index 000000000000..11d7c57a019f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stre__nto_long_names_hashid, + {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, + {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as {{ adapter.quote('DATA') }}, + {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c__lting_into_long_names') }} as table_alias +where {{ adapter.quote('partition') }} is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql new file mode 100644 index 000000000000..d334fa9e3af9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab2.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stre__nto_long_names_hashid, + double_array_data, + {{ adapter.quote('DATA') }}, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c___long_names_partition_ab1') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql new file mode 100644 index 000000000000..6bc58d187c30 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___long_names_partition_ab3.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_nested_stre__nto_long_names_hashid', + array_to_string('double_array_data'), + array_to_string(adapter.quote('DATA')), + array_to_string(adapter.quote('column`_\'with""_quotes')), + ]) }} as _airbyte_partition_hashid +from {{ ref('nested_stream_with_c___long_names_partition_ab2') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql new file mode 100644 index 000000000000..871d33d96ae1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', adapter.quote('DATA')) }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value(adapter.quote('DATA')), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', adapter.quote('DATA')) }} +where {{ adapter.quote('DATA') }} is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql new file mode 100644 index 000000000000..4034a1495a09 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c___names_partition_data_ab1') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql new file mode 100644 index 000000000000..6a037703c851 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c___names_partition_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_data_hashid +from {{ ref('nested_stream_with_c___names_partition_data_ab2') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql new file mode 100644 index 000000000000..31ac76876f60 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', adapter.quote('column`_\'with""_quotes')) }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', adapter.quote('column`_\'with""_quotes')) }} +where {{ adapter.quote('column`_\'with""_quotes') }} is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql new file mode 100644 index 000000000000..1f1d43c09a26 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c__column___with__quotes_ab1') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql new file mode 100644 index 000000000000..0c1fce98e2fa --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__column___with__quotes_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_c__column___with__quotes_ab2') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql new file mode 100644 index 000000000000..83232f67277e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_c___long_names_partition', 'partition', 'double_array_data') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as {{ adapter.quote('id') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c___long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'double_array_data') }} +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql new file mode 100644 index 000000000000..bcaa8b5c53d5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c__ion_double_array_data_ab1') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql new file mode 100644 index 000000000000..c0d82b2cc088 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__ion_double_array_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + adapter.quote('id'), + ]) }} as _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_c__ion_double_array_data_ab2') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql new file mode 100644 index 000000000000..5888a043ab45 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias +-- nested_stream_with_c__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..11d64cbafcba --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_c__lting_into_long_names_ab1') }} +-- nested_stream_with_c__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..cea3d1c14009 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + adapter.quote('date'), + adapter.quote('partition'), + ]) }} as _airbyte_nested_stre__nto_long_names_hashid +from {{ ref('nested_stream_with_c__lting_into_long_names_ab2') }} +-- nested_stream_with_c__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql new file mode 100644 index 000000000000..c595e4843b36 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_c__lting_into_long_names_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stre__nto_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('nested_stream_with_c__lting_into_long_names_ab3') }} +-- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql new file mode 100644 index 000000000000..b844098ba9c0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias +-- non_nested_stream_wi__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..5b3a3574bf40 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ ref('non_nested_stream_wi__lting_into_long_names_ab1') }} +-- non_nested_stream_wi__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..c85b860de737 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_wi__lting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + adapter.quote('date'), + ]) }} as _airbyte_non_nested___nto_long_names_hashid +from {{ ref('non_nested_stream_wi__lting_into_long_names_ab2') }} +-- non_nested_stream_wi__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql new file mode 100644 index 000000000000..06a99b3588c8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias +-- simple_stream_with_n__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql new file mode 100644 index 000000000000..70077c18dbfc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('id') }}, + cast({{ adapter.quote('date') }} as {{ dbt_utils.type_string() }}) as {{ adapter.quote('date') }}, + _airbyte_emitted_at +from {{ ref('simple_stream_with_n__lting_into_long_names_ab1') }} +-- simple_stream_with_n__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql new file mode 100644 index 000000000000..b4c949ec1447 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_n__lting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + adapter.quote('date'), + ]) }} as _airbyte_simple_stre__nto_long_names_hashid +from {{ ref('simple_stream_with_n__lting_into_long_names_ab2') }} +-- simple_stream_with_n__lting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..d174a85b7a46 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from {{ ref('conflict_stream_array_ab3') }} +-- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..87a6ace1c885 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab3') }} +-- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql new file mode 100644 index 000000000000..7be580e5b59a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name___conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + groups, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name___conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..94a9dc3d0139 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..a36056903767 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab3') }} +-- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..9e16abf78b39 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,14 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + {{ adapter.quote('name') }}, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_scd') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..e499de2f7614 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,23 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + {{ adapter.quote('id') }}, + {{ adapter.quote('name') }}, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by {{ adapter.quote('id') }} + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by {{ adapter.quote('id') }} + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab4') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..4079ce3f38ea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,17 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_scd') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..1a7f8e3bff5b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,26 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + {{ adapter.quote('id') }}, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + {{ adapter.quote('date') }} as _airbyte_start_at, + lag({{ adapter.quote('date') }}) over ( + partition by {{ adapter.quote('id') }}, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag({{ adapter.quote('date') }}) over ( + partition by {{ adapter.quote('id') }}, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab4') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..886cca7c7e72 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,16 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + currency, + {{ adapter.quote('date') }}, + timestamp_col, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab3') }} +-- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql new file mode 100644 index 000000000000..32fac08a6d40 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___long_names_partition.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_nested_stre__nto_long_names_hashid, + double_array_data, + {{ adapter.quote('DATA') }}, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at, + _airbyte_partition_hashid +from {{ ref('nested_stream_with_c___long_names_partition_ab3') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_c__lting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql new file mode 100644 index 000000000000..9ba3d4c84f6e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c___names_partition_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from {{ ref('nested_stream_with_c___names_partition_data_ab3') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_c___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql new file mode 100644 index 000000000000..c5af87800f26 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__column___with__quotes.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_c__column___with__quotes_ab3') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_c___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql new file mode 100644 index 000000000000..18d2b45b021d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__ion_double_array_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + {{ adapter.quote('id') }}, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_c__ion_double_array_data_ab3') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_c___long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql new file mode 100644 index 000000000000..fb61f3ad1900 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + {{ adapter.quote('date') }}, + {{ adapter.quote('partition') }}, + _airbyte_emitted_at, + _airbyte_nested_stre__nto_long_names_hashid +from {{ ref('nested_stream_with_c__lting_into_long_names_scd') }} +-- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql new file mode 100644 index 000000000000..65a9d1507cdf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_c__lting_into_long_names_scd.sql @@ -0,0 +1,21 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + {{ adapter.quote('id') }}, + {{ adapter.quote('date') }}, + {{ adapter.quote('partition') }}, + {{ adapter.quote('date') }} as _airbyte_start_at, + lag({{ adapter.quote('date') }}) over ( + partition by {{ adapter.quote('id') }} + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag({{ adapter.quote('date') }}) over ( + partition by {{ adapter.quote('id') }} + order by {{ adapter.quote('date') }} is null asc, {{ adapter.quote('date') }} desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stre__nto_long_names_hashid +from {{ ref('nested_stream_with_c__lting_into_long_names_ab4') }} +-- nested_stream_with_c__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql new file mode 100644 index 000000000000..f9fe1a5fdf4e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_wi__lting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + {{ adapter.quote('date') }}, + _airbyte_emitted_at, + _airbyte_non_nested___nto_long_names_hashid +from {{ ref('non_nested_stream_wi__lting_into_long_names_ab3') }} +-- non_nested_stream_wi__lting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql new file mode 100644 index 000000000000..247047c0ec69 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_n__lting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + {{ adapter.quote('date') }}, + _airbyte_emitted_at, + _airbyte_simple_stre__nto_long_names_hashid +from {{ ref('simple_stream_with_n__lting_into_long_names_ab3') }} +-- simple_stream_with_n__lting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml new file mode 100644 index 000000000000..69352d59cdbb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml @@ -0,0 +1,23 @@ +version: 2 +sources: +- name: test_normalization + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_conflict_stream_array + - name: _airbyte_raw_conflict_stream_name + - name: _airbyte_raw_conflict_stream_scalar + - name: _airbyte_raw_dedup_cdc_excluded + - name: _airbyte_raw_dedup_exchange_rate + - name: _airbyte_raw_exchange_rate + - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names + - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names +- name: test_normalization_namespace + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..f93f3e475165 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,48 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name_conflict_stream_name__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + case when json_extract_path_text(conflict_stream_name, 'groups', true) != '' then json_extract_path_text(conflict_stream_name, 'groups', true) end as groups, + _airbyte_emitted_at +from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(groups as varchar) as groups, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +), __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_conflict_stream_name_2_hashid as varchar), '') || '-' || coalesce(cast(groups as varchar), '') + + as varchar)) as _airbyte_conflict_stream_name_3_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name +)-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + groups, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from __dbt__CTE__conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3 +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from "integrationtests".test_normalization."conflict_stream_name_conflict_stream_name" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..4952f5f88bbf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,49 @@ + + + create table + "integrationtests".test_normalization."conflict_stream_scalar__dbt_tmp" + + + as ( + +with __dbt__CTE__conflict_stream_scalar_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) != '' then json_extract_path_text(_airbyte_data, 'conflict_stream_scalar', true) end as conflict_stream_scalar, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar as table_alias +-- conflict_stream_scalar +), __dbt__CTE__conflict_stream_scalar_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(conflict_stream_scalar as + bigint +) as conflict_stream_scalar, + _airbyte_emitted_at +from __dbt__CTE__conflict_stream_scalar_ab1 +-- conflict_stream_scalar +), __dbt__CTE__conflict_stream_scalar_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(conflict_stream_scalar as varchar), '') + + as varchar)) as _airbyte_conflict_stream_scalar_hashid +from __dbt__CTE__conflict_stream_scalar_ab2 +-- conflict_stream_scalar +)-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from __dbt__CTE__conflict_stream_scalar_ab3 +-- conflict_stream_scalar from "integrationtests".test_normalization._airbyte_raw_conflict_stream_scalar + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..263022b9f315 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,21 @@ + + + create table + "integrationtests".test_normalization."dedup_cdc_excluded__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from "integrationtests".test_normalization."dedup_cdc_excluded_scd" +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..41fdb87d9750 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,85 @@ + + + create table + "integrationtests".test_normalization."dedup_cdc_excluded_scd__dbt_tmp" + + + as ( + +with __dbt__CTE__dedup_cdc_excluded_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'name', true) != '' then json_extract_path_text(_airbyte_data, 'name', true) end as name, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_lsn', true) end as _ab_cdc_lsn, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_updated_at', true) end as _ab_cdc_updated_at, + case when json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) != '' then json_extract_path_text(_airbyte_data, '_ab_cdc_deleted_at', true) end as _ab_cdc_deleted_at, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded as table_alias +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(name as varchar) as name, + cast(_ab_cdc_lsn as + float +) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as + float +) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as + float +) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from __dbt__CTE__dedup_cdc_excluded_ab1 +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(name as varchar), '') || '-' || coalesce(cast(_ab_cdc_lsn as varchar), '') || '-' || coalesce(cast(_ab_cdc_updated_at as varchar), '') || '-' || coalesce(cast(_ab_cdc_deleted_at as varchar), '') + + as varchar)) as _airbyte_dedup_cdc_excluded_hashid +from __dbt__CTE__dedup_cdc_excluded_ab2 +-- dedup_cdc_excluded +), __dbt__CTE__dedup_cdc_excluded_ab4 as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from __dbt__CTE__dedup_cdc_excluded_ab3 +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from __dbt__CTE__dedup_cdc_excluded_ab4 +-- dedup_cdc_excluded from "integrationtests".test_normalization._airbyte_raw_dedup_cdc_excluded +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..40056bcbbc47 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,24 @@ + + + create table + "integrationtests".test_normalization."dedup_exchange_rate__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from "integrationtests".test_normalization."dedup_exchange_rate_scd" +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..d9c4ccccbf8d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,98 @@ + + + create table + "integrationtests".test_normalization."dedup_exchange_rate_scd__dbt_tmp" + + + as ( + +with __dbt__CTE__dedup_exchange_rate_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, + case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", + case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, + case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, + case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate as table_alias +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(currency as varchar) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("hkd@spéçiäl & characters" as + float +) as "hkd@spéçiäl & characters", + cast(hkd_special___characters as varchar) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from __dbt__CTE__dedup_exchange_rate_ab1 +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') + + as varchar)) as _airbyte_dedup_exchange_rate_hashid +from __dbt__CTE__dedup_exchange_rate_ab2 +-- dedup_exchange_rate +), __dbt__CTE__dedup_exchange_rate_ab4 as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from __dbt__CTE__dedup_exchange_rate_ab3 +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +)-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + date as _airbyte_start_at, + lag(date) over ( + partition by id, currency, cast(nzd as varchar) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id, currency, cast(nzd as varchar) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from __dbt__CTE__dedup_exchange_rate_ab4 +-- dedup_exchange_rate from "integrationtests".test_normalization._airbyte_raw_dedup_exchange_rate +where _airbyte_row_num = 1 + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..ef547faeed64 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,77 @@ + + + create table + "integrationtests".test_normalization."exchange_rate__dbt_tmp" + + + as ( + +with __dbt__CTE__exchange_rate_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'currency', true) != '' then json_extract_path_text(_airbyte_data, 'currency', true) end as currency, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + case when json_extract_path_text(_airbyte_data, 'timestamp_col', true) != '' then json_extract_path_text(_airbyte_data, 'timestamp_col', true) end as timestamp_col, + case when json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD@spéçiäl & characters', true) end as "hkd@spéçiäl & characters", + case when json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) != '' then json_extract_path_text(_airbyte_data, 'HKD_special___characters', true) end as hkd_special___characters, + case when json_extract_path_text(_airbyte_data, 'NZD', true) != '' then json_extract_path_text(_airbyte_data, 'NZD', true) end as nzd, + case when json_extract_path_text(_airbyte_data, 'USD', true) != '' then json_extract_path_text(_airbyte_data, 'USD', true) end as usd, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_exchange_rate as table_alias +-- exchange_rate +), __dbt__CTE__exchange_rate_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + cast(currency as varchar) as currency, + cast(date as + date +) as date, + cast(timestamp_col as + timestamp with time zone +) as timestamp_col, + cast("hkd@spéçiäl & characters" as + float +) as "hkd@spéçiäl & characters", + cast(hkd_special___characters as varchar) as hkd_special___characters, + cast(nzd as + float +) as nzd, + cast(usd as + float +) as usd, + _airbyte_emitted_at +from __dbt__CTE__exchange_rate_ab1 +-- exchange_rate +), __dbt__CTE__exchange_rate_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(currency as varchar), '') || '-' || coalesce(cast(date as varchar), '') || '-' || coalesce(cast(timestamp_col as varchar), '') || '-' || coalesce(cast("hkd@spéçiäl & characters" as varchar), '') || '-' || coalesce(cast(hkd_special___characters as varchar), '') || '-' || coalesce(cast(nzd as varchar), '') || '-' || coalesce(cast(usd as varchar), '') + + as varchar)) as _airbyte_exchange_rate_hashid +from __dbt__CTE__exchange_rate_ab2 +-- exchange_rate +)-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + "hkd@spéçiäl & characters", + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from __dbt__CTE__exchange_rate_ab3 +-- exchange_rate from "integrationtests".test_normalization._airbyte_raw_exchange_rate + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql new file mode 100644 index 000000000000..7d2e8f10dc4e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql @@ -0,0 +1,19 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names__dbt_tmp" + + + as ( + +-- Final base SQL model +select + id, + date, + "partition", + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_scd" +-- nested_stream_with_complex_columns_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names +where _airbyte_active_row = True + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql new file mode 100644 index 000000000000..994439d9c0ea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql @@ -0,0 +1,54 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + json_extract_path_text("partition", 'double_array_data', true) as double_array_data, + json_extract_path_text("partition", 'DATA', true) as data, + json_extract_path_text("partition", 'column`_''with"_quotes', true) as "column`_'with""_quotes", + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" as table_alias +where "partition" is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + "column`_'with""_quotes", + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid as varchar), '') || '-' || coalesce(cast(double_array_data as varchar), '') || '-' || coalesce(cast(data as varchar), '') || '-' || coalesce(cast("column`_'with""_quotes" as varchar), '') + + as varchar)) as _airbyte_partition_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition +)-- Final base SQL model +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + "column`_'with""_quotes", + _airbyte_emitted_at, + _airbyte_partition_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3 +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql new file mode 100644 index 000000000000..909b535ee094 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text("column`_'with""_quotes", numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition."column`_'with""_quotes" + where numbers.generated_number <= json_array_length("column`_'with""_quotes", true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where "column`_'with""_quotes" is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as varchar) as currency, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') + + as varchar)) as _airbyte_column___with__quotes_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes +)-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3 +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql new file mode 100644 index 000000000000..4abaa0770943 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_data__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 1 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text(data, numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.data + where numbers.generated_number <= json_array_length(data, true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'currency', true) != '' then json_extract_path_text(_airbyte_nested_data, 'currency', true) end as currency, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where data is not null +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as varchar) as currency, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(currency as varchar), '') + + as varchar)) as _airbyte_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA +)-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3 +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql new file mode 100644 index 000000000000..34429d9d24f1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql @@ -0,0 +1,93 @@ + + + create table + "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data__dbt_tmp" + + + as ( + +with __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 2 + order by generated_number + + +), +joined as ( + select + _airbyte_partition_hashid as _airbyte_hashid, + json_extract_array_element_text(double_array_data, numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in nested_stream_with_complex_columns_resulting_into_long_names_partition.double_array_data + where numbers.generated_number <= json_array_length(double_array_data, true) +) +select + _airbyte_partition_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'id', true) end as id, + _airbyte_emitted_at +from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" as table_alias +left join joined on _airbyte_partition_hashid = joined._airbyte_hashid +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as varchar) as id, + _airbyte_emitted_at +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +), __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_partition_hashid as varchar), '') || '-' || coalesce(cast(id as varchar), '') + + as varchar)) as _airbyte_double_array_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data +)-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from __dbt__CTE__nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3 +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "integrationtests".test_normalization."nested_stream_with_complex_columns_resulting_into_long_names_partition" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..3b7dd68e15e6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql @@ -0,0 +1,47 @@ + + + create table + "integrationtests".test_normalization."non_nested_stream_without_namespace_resulting_into_long_names__dbt_tmp" + + + as ( + +with __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names as table_alias +-- non_nested_stream_without_namespace_resulting_into_long_names +), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(date as varchar) as date, + _airbyte_emitted_at +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab1 +-- non_nested_stream_without_namespace_resulting_into_long_names +), __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') + + as varchar)) as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab2 +-- non_nested_stream_without_namespace_resulting_into_long_names +)-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from __dbt__CTE__non_nested_stream_without_namespace_resulting_into_long_names_ab3 +-- non_nested_stream_without_namespace_resulting_into_long_names from "integrationtests".test_normalization._airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..adb67253b0a2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql @@ -0,0 +1,47 @@ + + + create table + "integrationtests".test_normalization_namespace."simple_stream_with_namespace_resulting_into_long_names__dbt_tmp" + + + as ( + +with __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + case when json_extract_path_text(_airbyte_data, 'date', true) != '' then json_extract_path_text(_airbyte_data, 'date', true) end as date, + _airbyte_emitted_at +from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names as table_alias +-- simple_stream_with_namespace_resulting_into_long_names +), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as varchar) as id, + cast(date as varchar) as date, + _airbyte_emitted_at +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab1 +-- simple_stream_with_namespace_resulting_into_long_names +), __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(date as varchar), '') + + as varchar)) as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab2 +-- simple_stream_with_namespace_resulting_into_long_names +)-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from __dbt__CTE__simple_stream_with_namespace_resulting_into_long_names_ab3 +-- simple_stream_with_namespace_resulting_into_long_names from "integrationtests".test_normalization_namespace._airbyte_raw_simple_stream_with_namespace_resulting_into_long_names + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..8556d7f50afb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} as table_alias +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..a1d77f379bce --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_ab1') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..2592ce581df8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab2') }} +-- conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..d6e2edb75ced --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_hashid, + {{ json_extract('table_alias', 'conflict_stream_name', ['conflict_stream_name'], ['conflict_stream_name']) }} as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..463a878933f8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_hashid, + cast(conflict_stream_name as {{ type_json() }}) as conflict_stream_name, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..b98fcff9e377 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_hashid', + 'conflict_stream_name', + ]) }} as _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql new file mode 100644 index 000000000000..77e7bd31c512 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_conflict_stream_name_2_hashid, + {{ json_extract_scalar('conflict_stream_name', ['groups'], ['groups']) }} as groups, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name') }} as table_alias +where conflict_stream_name is not null +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql new file mode 100644 index 000000000000..50d9169b110d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_conflict_stream_name_2_hashid, + cast(groups as {{ dbt_utils.type_string() }}) as groups, + _airbyte_emitted_at +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab1') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql new file mode 100644 index 000000000000..3ac0805c02b6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_conflict_stream_name_2_hashid', + 'groups', + ]) }} as _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab2') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql new file mode 100644 index 000000000000..be57970e399e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as conflict_stream_scalar, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} as table_alias +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql new file mode 100644 index 000000000000..cf0d9deb51cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(conflict_stream_scalar as {{ dbt_utils.type_bigint() }}) as conflict_stream_scalar, + _airbyte_emitted_at +from {{ ref('conflict_stream_scalar_ab1') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql new file mode 100644 index 000000000000..b718d36bb399 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/conflict_stream_scalar_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'conflict_stream_scalar', + ]) }} as _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab2') }} +-- conflict_stream_scalar + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql new file mode 100644 index 000000000000..106a78e83df7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as name, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _ab_cdc_lsn, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _ab_cdc_updated_at, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} as table_alias +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql new file mode 100644 index 000000000000..1fe684c4026d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab2.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(name as {{ dbt_utils.type_string() }}) as name, + cast(_ab_cdc_lsn as {{ dbt_utils.type_float() }}) as _ab_cdc_lsn, + cast(_ab_cdc_updated_at as {{ dbt_utils.type_float() }}) as _ab_cdc_updated_at, + cast(_ab_cdc_deleted_at as {{ dbt_utils.type_float() }}) as _ab_cdc_deleted_at, + _airbyte_emitted_at +from {{ ref('dedup_cdc_excluded_ab1') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql new file mode 100644 index 000000000000..3d994a17195d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab3.sql @@ -0,0 +1,14 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'name', + '_ab_cdc_lsn', + '_ab_cdc_updated_at', + '_ab_cdc_deleted_at', + ]) }} as _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab2') }} +-- dedup_cdc_excluded + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql new file mode 100644 index 000000000000..4d4fe392fd7f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_cdc_excluded_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_cdc_excluded_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_cdc_excluded_ab3') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql new file mode 100644 index 000000000000..5dcea3571341 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('hkd@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} as table_alias +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql new file mode 100644 index 000000000000..832843fb80e4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast(date as {{ type_date() }}) as date, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('hkd@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('hkd@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('dedup_exchange_rate_ab1') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql new file mode 100644 index 000000000000..1e4e51d2d980 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + 'date', + 'timestamp_col', + adapter.quote('hkd@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab2') }} +-- dedup_exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql new file mode 100644 index 000000000000..f45c79d39e27 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/dedup_exchange_rate_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_dedup_exchange_rate_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('dedup_exchange_rate_ab3') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql new file mode 100644 index 000000000000..70419151a6dc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as currency, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as timestamp_col, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('hkd@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as hkd_special___characters, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as nzd, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as usd, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} as table_alias +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql new file mode 100644 index 000000000000..f0ac7cba4911 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + cast(date as {{ type_date() }}) as date, + cast(timestamp_col as {{ type_timestamp_with_timezone() }}) as timestamp_col, + cast({{ adapter.quote('hkd@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('hkd@spéçiäl & characters') }}, + cast(hkd_special___characters as {{ dbt_utils.type_string() }}) as hkd_special___characters, + cast(nzd as {{ dbt_utils.type_float() }}) as nzd, + cast(usd as {{ dbt_utils.type_float() }}) as usd, + _airbyte_emitted_at +from {{ ref('exchange_rate_ab1') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql new file mode 100644 index 000000000000..968f0388becb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/exchange_rate_ab3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'currency', + 'date', + 'timestamp_col', + adapter.quote('hkd@spéçiäl & characters'), + 'hkd_special___characters', + 'nzd', + 'usd', + ]) }} as _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab2') }} +-- exchange_rate + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..aaa4eb63f243 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..63bd774a716f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + cast({{ adapter.quote('partition') }} as {{ type_json() }}) as {{ adapter.quote('partition') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab1') }} +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..7d5fab4ab6a4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + adapter.quote('partition'), + ]) }} as _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab2') }} +-- nested_stream_with_complex_columns_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql new file mode 100644 index 000000000000..8a2db82defcb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab3') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql new file mode 100644 index 000000000000..fb632de52d62 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + {{ json_extract_array(adapter.quote('partition'), ['double_array_data'], ['double_array_data']) }} as double_array_data, + {{ json_extract_array(adapter.quote('partition'), ['DATA'], ['DATA']) }} as data, + {{ json_extract_array(adapter.quote('partition'), ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} as table_alias +where {{ adapter.quote('partition') }} is not null +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql new file mode 100644 index 000000000000..7ade5b21f875 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab1') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql new file mode 100644 index 000000000000..b628b9dfa733 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid', + array_to_string('double_array_data'), + array_to_string('data'), + array_to_string(adapter.quote('column`_\'with""_quotes')), + ]) }} as _airbyte_partition_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab2') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql new file mode 100644 index 000000000000..06114ee71d7e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', adapter.quote('column`_\'with""_quotes')) }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', adapter.quote('column`_\'with""_quotes')) }} +where {{ adapter.quote('column`_\'with""_quotes') }} is not null +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql new file mode 100644 index 000000000000..076b4bfc975c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab1') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql new file mode 100644 index 000000000000..36d43b45d0b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab2') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql new file mode 100644 index 000000000000..cfacb333734f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'data') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('data'), ['currency'], ['currency']) }} as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'data') }} +where data is not null +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql new file mode 100644 index 000000000000..b4092b9210a8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(currency as {{ dbt_utils.type_string() }}) as currency, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab1') }} +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql new file mode 100644 index 000000000000..6fa8cfa6f06c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'currency', + ]) }} as _airbyte_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab2') }} +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql new file mode 100644 index 000000000000..48b7ea236ae1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('nested_stream_with_complex_columns_resulting_into_long_names_partition', 'partition', 'double_array_data') }} +select + _airbyte_partition_hashid, + {{ json_extract_scalar(unnested_column_value('double_array_data'), ['id'], ['id']) }} as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} as table_alias +{{ cross_join_unnest('partition', 'double_array_data') }} +where double_array_data is not null +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql new file mode 100644 index 000000000000..a3e29e92dfb7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_partition_hashid, + cast(id as {{ dbt_utils.type_string() }}) as id, + _airbyte_emitted_at +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab1') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql new file mode 100644 index 000000000000..269418d7250d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_partition_hashid', + 'id', + ]) }} as _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab2') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..fd2fbdd54863 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} as table_alias +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..e4ed8d075d22 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + _airbyte_emitted_at +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab1') }} +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..55471ad5091e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + ]) }} as _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab2') }} +-- non_nested_stream_without_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql new file mode 100644 index 000000000000..e3ec7ffd2f82 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as date, + _airbyte_emitted_at +from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} as table_alias +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql new file mode 100644 index 000000000000..c437ca698089 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_string() }}) as id, + cast(date as {{ dbt_utils.type_string() }}) as date, + _airbyte_emitted_at +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab1') }} +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql new file mode 100644 index 000000000000..05770b856f50 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization_namespace", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + 'date', + ]) }} as _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab2') }} +-- simple_stream_with_namespace_resulting_into_long_names + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql new file mode 100644 index 000000000000..9ffda6086e35 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_array.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_array, + _airbyte_emitted_at, + _airbyte_conflict_stream_array_hashid +from {{ ref('conflict_stream_array_ab3') }} +-- conflict_stream_array from {{ source('test_normalization', '_airbyte_raw_conflict_stream_array') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql new file mode 100644 index 000000000000..8a83ccc01e31 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_hashid +from {{ ref('conflict_stream_name_ab3') }} +-- conflict_stream_name from {{ source('test_normalization', '_airbyte_raw_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..94a9dc3d0139 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_hashid, + conflict_stream_name, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_2_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql new file mode 100644 index 000000000000..1a5bd998fa99 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_name_conflict_stream_name_conflict_stream_name.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_conflict_stream_name_2_hashid, + groups, + _airbyte_emitted_at, + _airbyte_conflict_stream_name_3_hashid +from {{ ref('conflict_stream_name_conflict_stream_name_conflict_stream_name_ab3') }} +-- conflict_stream_name at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('conflict_stream_name_conflict_stream_name') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql new file mode 100644 index 000000000000..9d7acc846fd0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/conflict_stream_scalar.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + conflict_stream_scalar, + _airbyte_emitted_at, + _airbyte_conflict_stream_scalar_hashid +from {{ ref('conflict_stream_scalar_ab3') }} +-- conflict_stream_scalar from {{ source('test_normalization', '_airbyte_raw_conflict_stream_scalar') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql new file mode 100644 index 000000000000..87007e001559 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded.sql @@ -0,0 +1,14 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_scd') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql new file mode 100644 index 000000000000..f23636879592 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_cdc_excluded_scd.sql @@ -0,0 +1,23 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + name, + _ab_cdc_lsn, + _ab_cdc_updated_at, + _ab_cdc_deleted_at, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by id + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_cdc_excluded_hashid +from {{ ref('dedup_cdc_excluded_ab4') }} +-- dedup_cdc_excluded from {{ source('test_normalization', '_airbyte_raw_dedup_cdc_excluded') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql new file mode 100644 index 000000000000..f85b4a17e26e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate.sql @@ -0,0 +1,17 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + {{ adapter.quote('hkd@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_scd') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql new file mode 100644 index 000000000000..ea50b6fddefc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/dedup_exchange_rate_scd.sql @@ -0,0 +1,26 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + currency, + date, + timestamp_col, + {{ adapter.quote('hkd@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + date as _airbyte_start_at, + lag(date) over ( + partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id, currency, cast(nzd as {{ dbt_utils.type_string() }}) + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_dedup_exchange_rate_hashid +from {{ ref('dedup_exchange_rate_ab4') }} +-- dedup_exchange_rate from {{ source('test_normalization', '_airbyte_raw_dedup_exchange_rate') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql new file mode 100644 index 000000000000..ffe5cafe5e4b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/exchange_rate.sql @@ -0,0 +1,16 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + currency, + date, + timestamp_col, + {{ adapter.quote('hkd@spéçiäl & characters') }}, + hkd_special___characters, + nzd, + usd, + _airbyte_emitted_at, + _airbyte_exchange_rate_hashid +from {{ ref('exchange_rate_ab3') }} +-- exchange_rate from {{ source('test_normalization', '_airbyte_raw_exchange_rate') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql new file mode 100644 index 000000000000..d03125b32542 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + {{ adapter.quote('partition') }}, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_scd') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql new file mode 100644 index 000000000000..8e228ffad1ab --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition.sql @@ -0,0 +1,12 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid, + double_array_data, + data, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at, + _airbyte_partition_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_ab3') }} +-- partition at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql new file mode 100644 index 000000000000..2bd228318b0d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_column___with__quotes_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_column___with__quotes_ab3') }} +-- column___with__quotes at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql new file mode 100644 index 000000000000..bdcfcf86eb2e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + currency, + _airbyte_emitted_at, + _airbyte_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_data_ab3') }} +-- data at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql new file mode 100644 index 000000000000..50b39ee05b38 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_partition_hashid, + id, + _airbyte_emitted_at, + _airbyte_double_array_data_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition_double_array_data_ab3') }} +-- double_array_data at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_partition') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql new file mode 100644 index 000000000000..d9c12b8eb43a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_scd.sql @@ -0,0 +1,21 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + id, + date, + {{ adapter.quote('partition') }}, + date as _airbyte_start_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(date) over ( + partition by id + order by date is null asc, date desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _airbyte_nested_stream_with_complex_columns_resulting_into_long_names_hashid +from {{ ref('nested_stream_with_complex_columns_resulting_into_long_names_ab4') }} +-- nested_stream_with_complex_columns_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..1004a9e2f4a4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/non_nested_stream_without_namespace_resulting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_non_nested_stream_without_namespace_resulting_into_long_names_hashid +from {{ ref('non_nested_stream_without_namespace_resulting_into_long_names_ab3') }} +-- non_nested_stream_without_namespace_resulting_into_long_names from {{ source('test_normalization', '_airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql new file mode 100644 index 000000000000..ce74645f7864 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization_namespace/simple_stream_with_namespace_resulting_into_long_names.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization_namespace", tags=["top-level"]) }} +-- Final base SQL model +select + id, + date, + _airbyte_emitted_at, + _airbyte_simple_stream_with_namespace_resulting_into_long_names_hashid +from {{ ref('simple_stream_with_namespace_resulting_into_long_names_ab3') }} +-- simple_stream_with_namespace_resulting_into_long_names from {{ source('test_normalization_namespace', '_airbyte_raw_simple_stream_with_namespace_resulting_into_long_names') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml new file mode 100644 index 000000000000..69352d59cdbb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml @@ -0,0 +1,23 @@ +version: 2 +sources: +- name: test_normalization + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_conflict_stream_array + - name: _airbyte_raw_conflict_stream_name + - name: _airbyte_raw_conflict_stream_scalar + - name: _airbyte_raw_dedup_cdc_excluded + - name: _airbyte_raw_dedup_exchange_rate + - name: _airbyte_raw_exchange_rate + - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names + - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names +- name: test_normalization_namespace + quoting: + database: true + schema: false + identifier: false + tables: + - name: _airbyte_raw_simple_stream_with_namespace_resulting_into_long_names diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql new file mode 100644 index 000000000000..1624de361728 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CONFLICT_STREAM_ARRAY as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB2" +-- CONFLICT_STREAM_ARRAY + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..e16d92665cb6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,11 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + get_path(parse_json(table_alias._airbyte_data), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_NAME as table_alias +-- CONFLICT_STREAM_NAME + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..dac8751ac0e0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,15 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + varchar +) as ID, + cast(CONFLICT_STREAM_NAME as + variant +) as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB1" +-- CONFLICT_STREAM_NAME + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..30c53fc98bdc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CONFLICT_STREAM_NAME as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB2" +-- CONFLICT_STREAM_NAME + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..81c068e3bc7e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,12 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + get_path(parse_json(table_alias.CONFLICT_STREAM_NAME), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" as table_alias +where CONFLICT_STREAM_NAME is not null +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..94b8b0625d80 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + cast(CONFLICT_STREAM_NAME as + variant +) as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..2f42a0e16d1f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_CONFLICT_STREAM_NAME_HASHID as + varchar +), '') || '-' || coalesce(cast(CONFLICT_STREAM_NAME as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..c2d398d9523f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,12 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + to_varchar(get_path(parse_json(CONFLICT_STREAM_NAME), '"groups"')) as GROUPS, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as table_alias +where CONFLICT_STREAM_NAME is not null +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..8ceb7e28a3d7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + cast(GROUPS as + varchar +) as GROUPS, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..d4410dd1c52a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID as + varchar +), '') || '-' || coalesce(cast(GROUPS as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql new file mode 100644 index 000000000000..14044ac63567 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql @@ -0,0 +1,11 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"conflict_stream_scalar"')) as CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_SCALAR as table_alias +-- CONFLICT_STREAM_SCALAR + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql new file mode 100644 index 000000000000..e5afae550b7c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql @@ -0,0 +1,15 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + varchar +) as ID, + cast(CONFLICT_STREAM_SCALAR as + bigint +) as CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB1" +-- CONFLICT_STREAM_SCALAR + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql new file mode 100644 index 000000000000..731b5e9551b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CONFLICT_STREAM_SCALAR as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB2" +-- CONFLICT_STREAM_SCALAR + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql new file mode 100644 index 000000000000..72b91ec9ee4a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql @@ -0,0 +1,14 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"name"')) as NAME, + to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_lsn"')) as _AB_CDC_LSN, + to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_updated_at"')) as _AB_CDC_UPDATED_AT, + to_varchar(get_path(parse_json(_airbyte_data), '"_ab_cdc_deleted_at"')) as _AB_CDC_DELETED_AT, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED as table_alias +-- DEDUP_CDC_EXCLUDED + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql new file mode 100644 index 000000000000..efa7ccb027b4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql @@ -0,0 +1,24 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + bigint +) as ID, + cast(NAME as + varchar +) as NAME, + cast(_AB_CDC_LSN as + float +) as _AB_CDC_LSN, + cast(_AB_CDC_UPDATED_AT as + float +) as _AB_CDC_UPDATED_AT, + cast(_AB_CDC_DELETED_AT as + float +) as _AB_CDC_DELETED_AT, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB1" +-- DEDUP_CDC_EXCLUDED + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql new file mode 100644 index 000000000000..2025282186cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql @@ -0,0 +1,26 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(NAME as + varchar +), '') || '-' || coalesce(cast(_AB_CDC_LSN as + varchar +), '') || '-' || coalesce(cast(_AB_CDC_UPDATED_AT as + varchar +), '') || '-' || coalesce(cast(_AB_CDC_DELETED_AT as + varchar +), '') + + as + varchar +)) as _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB2" +-- DEDUP_CDC_EXCLUDED + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql new file mode 100644 index 000000000000..67d223a56b78 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB4" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB3" +-- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql new file mode 100644 index 000000000000..3fe55233ade2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql @@ -0,0 +1,17 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"currency"')) as CURRENCY, + to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, + to_varchar(get_path(parse_json(_airbyte_data), '"timestamp_col"')) as TIMESTAMP_COL, + to_varchar(get_path(parse_json(_airbyte_data), '"HKD@spéçiäl & characters"')) as "HKD@spéçiäl & characters", + to_varchar(get_path(parse_json(_airbyte_data), '"HKD_special___characters"')) as HKD_SPECIAL___CHARACTERS, + to_varchar(get_path(parse_json(_airbyte_data), '"NZD"')) as NZD, + to_varchar(get_path(parse_json(_airbyte_data), '"USD"')) as USD, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE as table_alias +-- DEDUP_EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql new file mode 100644 index 000000000000..374d277971b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql @@ -0,0 +1,33 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + bigint +) as ID, + cast(CURRENCY as + varchar +) as CURRENCY, + cast(DATE as + date +) as DATE, + cast(TIMESTAMP_COL as + timestamp with time zone +) as TIMESTAMP_COL, + cast("HKD@spéçiäl & characters" as + float +) as "HKD@spéçiäl & characters", + cast(HKD_SPECIAL___CHARACTERS as + varchar +) as HKD_SPECIAL___CHARACTERS, + cast(NZD as + float +) as NZD, + cast(USD as + float +) as USD, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB1" +-- DEDUP_EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql new file mode 100644 index 000000000000..dc6ae926c16e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql @@ -0,0 +1,32 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CURRENCY as + varchar +), '') || '-' || coalesce(cast(DATE as + varchar +), '') || '-' || coalesce(cast(TIMESTAMP_COL as + varchar +), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as + varchar +), '') || '-' || coalesce(cast(HKD_SPECIAL___CHARACTERS as + varchar +), '') || '-' || coalesce(cast(NZD as + varchar +), '') || '-' || coalesce(cast(USD as + varchar +), '') + + as + varchar +)) as _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB2" +-- DEDUP_EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql new file mode 100644 index 000000000000..2a37d2225993 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB4" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB3" +-- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql new file mode 100644 index 000000000000..6d937d699b77 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql @@ -0,0 +1,17 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"currency"')) as CURRENCY, + to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, + to_varchar(get_path(parse_json(_airbyte_data), '"timestamp_col"')) as TIMESTAMP_COL, + to_varchar(get_path(parse_json(_airbyte_data), '"HKD@spéçiäl & characters"')) as "HKD@spéçiäl & characters", + to_varchar(get_path(parse_json(_airbyte_data), '"HKD_special___characters"')) as HKD_SPECIAL___CHARACTERS, + to_varchar(get_path(parse_json(_airbyte_data), '"NZD"')) as NZD, + to_varchar(get_path(parse_json(_airbyte_data), '"USD"')) as USD, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_EXCHANGE_RATE as table_alias +-- EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql new file mode 100644 index 000000000000..d7527385ea08 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql @@ -0,0 +1,33 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + bigint +) as ID, + cast(CURRENCY as + varchar +) as CURRENCY, + cast(DATE as + date +) as DATE, + cast(TIMESTAMP_COL as + timestamp with time zone +) as TIMESTAMP_COL, + cast("HKD@spéçiäl & characters" as + float +) as "HKD@spéçiäl & characters", + cast(HKD_SPECIAL___CHARACTERS as + varchar +) as HKD_SPECIAL___CHARACTERS, + cast(NZD as + float +) as NZD, + cast(USD as + float +) as USD, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB1" +-- EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql new file mode 100644 index 000000000000..8b0695eac2f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql @@ -0,0 +1,32 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CURRENCY as + varchar +), '') || '-' || coalesce(cast(DATE as + varchar +), '') || '-' || coalesce(cast(TIMESTAMP_COL as + varchar +), '') || '-' || coalesce(cast("HKD@spéçiäl & characters" as + varchar +), '') || '-' || coalesce(cast(HKD_SPECIAL___CHARACTERS as + varchar +), '') || '-' || coalesce(cast(NZD as + varchar +), '') || '-' || coalesce(cast(USD as + varchar +), '') + + as + varchar +)) as _AIRBYTE_EXCHANGE_RATE_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB2" +-- EXCHANGE_RATE + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..3d098f58376f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,12 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, + get_path(parse_json(table_alias._airbyte_data), '"partition"') as PARTITION, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES as table_alias +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..17165d85e92a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,18 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + varchar +) as ID, + cast(DATE as + varchar +) as DATE, + cast(PARTITION as + variant +) as PARTITION, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1" +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..4e0accb03871 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,22 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(DATE as + varchar +), '') || '-' || coalesce(cast(PARTITION as + varchar +), '') + + as + varchar +)) as _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2" +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql new file mode 100644 index 000000000000..e2edd4d14e6b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4" as ( + +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3" +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql new file mode 100644 index 000000000000..182331f48034 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql @@ -0,0 +1,14 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + get_path(parse_json(PARTITION), '"double_array_data"') as DOUBLE_ARRAY_DATA, + get_path(parse_json(PARTITION), '"DATA"') as DATA, + get_path(parse_json(PARTITION), '"column`_''with""_quotes"') as "column`_'with""_quotes", + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" as table_alias +where PARTITION is not null +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql new file mode 100644 index 000000000000..adbb85ffe41c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + DOUBLE_ARRAY_DATA, + DATA, + "column`_'with""_quotes", + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1" +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql new file mode 100644 index 000000000000..06a2ebfd39af --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql @@ -0,0 +1,24 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID as + varchar +), '') || '-' || coalesce(cast(DOUBLE_ARRAY_DATA as + varchar +), '') || '-' || coalesce(cast(DATA as + varchar +), '') || '-' || coalesce(cast("column`_'with""_quotes" as + varchar +), '') + + as + varchar +)) as _AIRBYTE_PARTITION_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2" +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql new file mode 100644 index 000000000000..b3e0c89e6fd6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql @@ -0,0 +1,14 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _AIRBYTE_PARTITION_HASHID, + to_varchar(get_path(parse_json("column`_'with""_quotes".value), '"currency"')) as CURRENCY, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias +cross join table(flatten("column`_'with""_quotes")) as "column`_'with""_quotes" +where "column`_'with""_quotes" is not null +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql new file mode 100644 index 000000000000..17f8d3cefc54 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(CURRENCY as + varchar +) as CURRENCY, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1" +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql new file mode 100644 index 000000000000..be6501519680 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_PARTITION_HASHID as + varchar +), '') || '-' || coalesce(cast(CURRENCY as + varchar +), '') + + as + varchar +)) as _AIRBYTE_COLUMN___WITH__QUOTES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2" +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql new file mode 100644 index 000000000000..c7c087d01f3a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql @@ -0,0 +1,14 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _AIRBYTE_PARTITION_HASHID, + to_varchar(get_path(parse_json(DATA.value), '"currency"')) as CURRENCY, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias +cross join table(flatten(DATA)) as DATA +where DATA is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql new file mode 100644 index 000000000000..0c2a5300ddc3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(CURRENCY as + varchar +) as CURRENCY, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql new file mode 100644 index 000000000000..d2ebb15e5656 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_PARTITION_HASHID as + varchar +), '') || '-' || coalesce(cast(CURRENCY as + varchar +), '') + + as + varchar +)) as _AIRBYTE_DATA_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql new file mode 100644 index 000000000000..6f3d464004dd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql @@ -0,0 +1,14 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _AIRBYTE_PARTITION_HASHID, + to_varchar(get_path(parse_json(DOUBLE_ARRAY_DATA.value), '"id"')) as ID, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as table_alias +cross join table(flatten(DOUBLE_ARRAY_DATA)) as DOUBLE_ARRAY_DATA +where DOUBLE_ARRAY_DATA is not null +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql new file mode 100644 index 000000000000..e06ee3336358 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(ID as + varchar +) as ID, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1" +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql new file mode 100644 index 000000000000..71594aa6f8c4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_PARTITION_HASHID as + varchar +), '') || '-' || coalesce(cast(ID as + varchar +), '') + + as + varchar +)) as _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2" +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..e01276131049 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,11 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES as table_alias +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..ed36be213b3d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,15 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + varchar +) as ID, + cast(DATE as + varchar +) as DATE, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..e2cf19b76da7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(DATE as + varchar +), '') + + as + varchar +)) as _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..217823deae76 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,11 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE._AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES as table_alias +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..77f512a6761e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,15 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + varchar +) as ID, + cast(DATE as + varchar +) as DATE, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1" +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..8a8de3895594 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(DATE as + varchar +), '') + + as + varchar +)) as _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2" +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql new file mode 100644 index 000000000000..fda185b2d549 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY" as + ( +-- Final base SQL model +select + ID, + CONFLICT_STREAM_ARRAY, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_ARRAY_AB3" +-- CONFLICT_STREAM_ARRAY from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_ARRAY + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..8b22cad2ccaa --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" as + ( +-- Final base SQL model +select + ID, + CONFLICT_STREAM_NAME, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_AB3" +-- CONFLICT_STREAM_NAME from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_NAME + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..3798cfcf838b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as + ( +-- Final base SQL model +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + CONFLICT_STREAM_NAME, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..f187c1dbe4cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" as + ( +-- Final base SQL model +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + GROUPS, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3" +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql new file mode 100644 index 000000000000..51416677781d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR" as + ( +-- Final base SQL model +select + ID, + CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."CONFLICT_STREAM_SCALAR_AB3" +-- CONFLICT_STREAM_SCALAR from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_SCALAR + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql new file mode 100644 index 000000000000..ea5d0d3adb68 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql @@ -0,0 +1,18 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED" as + ( +-- Final base SQL model +select + ID, + NAME, + _AB_CDC_LSN, + _AB_CDC_UPDATED_AT, + _AB_CDC_DELETED_AT, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_SCD" +-- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql new file mode 100644 index 000000000000..81ec2c3f7564 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql @@ -0,0 +1,27 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_SCD" as + ( +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + NAME, + _AB_CDC_LSN, + _AB_CDC_UPDATED_AT, + _AB_CDC_DELETED_AT, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by ID + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by ID + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_CDC_EXCLUDED_AB4" +-- DEDUP_CDC_EXCLUDED from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_CDC_EXCLUDED +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql new file mode 100644 index 000000000000..59483af860f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql @@ -0,0 +1,21 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE" as + ( +-- Final base SQL model +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + "HKD@spéçiäl & characters", + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_SCD" +-- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql new file mode 100644 index 000000000000..3c167da0db1a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql @@ -0,0 +1,34 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_SCD" as + ( +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + "HKD@spéçiäl & characters", + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + DATE as _airbyte_start_at, + lag(DATE) over ( + partition by ID, CURRENCY, cast(NZD as + varchar +) + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(DATE) over ( + partition by ID, CURRENCY, cast(NZD as + varchar +) + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."DEDUP_EXCHANGE_RATE_AB4" +-- DEDUP_EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_DEDUP_EXCHANGE_RATE +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql new file mode 100644 index 000000000000..67c88ae1732c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql @@ -0,0 +1,20 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."EXCHANGE_RATE" as + ( +-- Final base SQL model +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + "HKD@spéçiäl & characters", + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + _airbyte_emitted_at, + _AIRBYTE_EXCHANGE_RATE_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."EXCHANGE_RATE_AB3" +-- EXCHANGE_RATE from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_EXCHANGE_RATE + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..51b796dafebe --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,16 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" as + ( +-- Final base SQL model +select + ID, + DATE, + PARTITION, + _airbyte_emitted_at, + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD" +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES +where _airbyte_active_row = True + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql new file mode 100644 index 000000000000..74c83e8d1b20 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql @@ -0,0 +1,16 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" as + ( +-- Final base SQL model +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + DOUBLE_ARRAY_DATA, + DATA, + "column`_'with""_quotes", + _airbyte_emitted_at, + _AIRBYTE_PARTITION_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3" +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql new file mode 100644 index 000000000000..3ac4fdb6fc1f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES" as + ( +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + CURRENCY, + _airbyte_emitted_at, + _AIRBYTE_COLUMN___WITH__QUOTES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3" +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql new file mode 100644 index 000000000000..14e9123ace37 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA" as + ( +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + CURRENCY, + _airbyte_emitted_at, + _AIRBYTE_DATA_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3" +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql new file mode 100644 index 000000000000..0981c7e78337 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA" as + ( +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + ID, + _airbyte_emitted_at, + _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3" +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql new file mode 100644 index 000000000000..7bd28037cafd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql @@ -0,0 +1,25 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD" as + ( +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + DATE, + PARTITION, + DATE as _airbyte_start_at, + lag(DATE) over ( + partition by ID + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(DATE) over ( + partition by ID + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4" +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES +where _airbyte_row_num = 1 + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..a32321dc5b2e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES" as + ( +-- Final base SQL model +select + ID, + DATE, + _airbyte_emitted_at, + _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..aafa343a9aef --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES" as + ( +-- Final base SQL model +select + ID, + DATE, + _airbyte_emitted_at, + _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION_NAMESPACE."SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3" +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES from "AIRBYTE_DATABASE".TEST_NORMALIZATION_NAMESPACE._AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..d9c3c5ece29b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract('table_alias', '_airbyte_data', ['conflict_stream_name'], ['conflict_stream_name']) }} as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_NAME') }} as table_alias +-- CONFLICT_STREAM_NAME + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..658733e93e46 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_string() }}) as ID, + cast(CONFLICT_STREAM_NAME as {{ type_json() }}) as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_NAME_AB1') }} +-- CONFLICT_STREAM_NAME + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..dc6b7d0ac1b5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'CONFLICT_STREAM_NAME', + ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_HASHID +from {{ ref('CONFLICT_STREAM_NAME_AB2') }} +-- CONFLICT_STREAM_NAME + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..3d7ee0255419 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + {{ json_extract('table_alias', 'CONFLICT_STREAM_NAME', ['conflict_stream_name'], ['conflict_stream_name']) }} as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_NAME') }} as table_alias +where CONFLICT_STREAM_NAME is not null +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..1a07c44314dc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + cast(CONFLICT_STREAM_NAME as {{ type_json() }}) as CONFLICT_STREAM_NAME, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..98a307107ce3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_CONFLICT_STREAM_NAME_HASHID', + 'CONFLICT_STREAM_NAME', + ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql new file mode 100644 index 000000000000..57dac03cd7b5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + {{ json_extract_scalar('CONFLICT_STREAM_NAME', ['groups'], ['groups']) }} as GROUPS, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME') }} as table_alias +where CONFLICT_STREAM_NAME is not null +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql new file mode 100644 index 000000000000..45eb156dc9a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + cast(GROUPS as {{ dbt_utils.type_string() }}) as GROUPS, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql new file mode 100644 index 000000000000..dfa05de7a7da --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID', + 'GROUPS', + ]) }} as _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB2') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql new file mode 100644 index 000000000000..06063e7a657b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['conflict_stream_scalar'], ['conflict_stream_scalar']) }} as CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_SCALAR') }} as table_alias +-- CONFLICT_STREAM_SCALAR + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql new file mode 100644 index 000000000000..163caca1379f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_string() }}) as ID, + cast(CONFLICT_STREAM_SCALAR as {{ dbt_utils.type_bigint() }}) as CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at +from {{ ref('CONFLICT_STREAM_SCALAR_AB1') }} +-- CONFLICT_STREAM_SCALAR + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql new file mode 100644 index 000000000000..8d0112afaabe --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'CONFLICT_STREAM_SCALAR', + ]) }} as _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID +from {{ ref('CONFLICT_STREAM_SCALAR_AB2') }} +-- CONFLICT_STREAM_SCALAR + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql new file mode 100644 index 000000000000..1633f41e1d43 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['name'], ['name']) }} as NAME, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_lsn'], ['_ab_cdc_lsn']) }} as _AB_CDC_LSN, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_updated_at'], ['_ab_cdc_updated_at']) }} as _AB_CDC_UPDATED_AT, + {{ json_extract_scalar('_airbyte_data', ['_ab_cdc_deleted_at'], ['_ab_cdc_deleted_at']) }} as _AB_CDC_DELETED_AT, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} as table_alias +-- DEDUP_CDC_EXCLUDED + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql new file mode 100644 index 000000000000..e26f3899f3b1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB2.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_bigint() }}) as ID, + cast(NAME as {{ dbt_utils.type_string() }}) as NAME, + cast(_AB_CDC_LSN as {{ dbt_utils.type_float() }}) as _AB_CDC_LSN, + cast(_AB_CDC_UPDATED_AT as {{ dbt_utils.type_float() }}) as _AB_CDC_UPDATED_AT, + cast(_AB_CDC_DELETED_AT as {{ dbt_utils.type_float() }}) as _AB_CDC_DELETED_AT, + _airbyte_emitted_at +from {{ ref('DEDUP_CDC_EXCLUDED_AB1') }} +-- DEDUP_CDC_EXCLUDED + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql new file mode 100644 index 000000000000..7117ccf7aca3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB3.sql @@ -0,0 +1,14 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'NAME', + '_AB_CDC_LSN', + '_AB_CDC_UPDATED_AT', + '_AB_CDC_DELETED_AT', + ]) }} as _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from {{ ref('DEDUP_CDC_EXCLUDED_AB2') }} +-- DEDUP_CDC_EXCLUDED + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql new file mode 100644 index 000000000000..1a0739aabb35 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_AB4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('DEDUP_CDC_EXCLUDED_AB3') }} +-- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql new file mode 100644 index 000000000000..36ca15afc1b3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as CURRENCY, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as TIMESTAMP_COL, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_SPECIAL___CHARACTERS, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} as table_alias +-- DEDUP_EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql new file mode 100644 index 000000000000..11fc7357edcb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_bigint() }}) as ID, + cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, + cast(DATE as {{ type_date() }}) as DATE, + cast(TIMESTAMP_COL as {{ type_timestamp_with_timezone() }}) as TIMESTAMP_COL, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(HKD_SPECIAL___CHARACTERS as {{ dbt_utils.type_string() }}) as HKD_SPECIAL___CHARACTERS, + cast(NZD as {{ dbt_utils.type_float() }}) as NZD, + cast(USD as {{ dbt_utils.type_float() }}) as USD, + _airbyte_emitted_at +from {{ ref('DEDUP_EXCHANGE_RATE_AB1') }} +-- DEDUP_EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql new file mode 100644 index 000000000000..18fac26b5ae7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'CURRENCY', + 'DATE', + 'TIMESTAMP_COL', + adapter.quote('HKD@spéçiäl & characters'), + 'HKD_SPECIAL___CHARACTERS', + 'NZD', + 'USD', + ]) }} as _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from {{ ref('DEDUP_EXCHANGE_RATE_AB2') }} +-- DEDUP_EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql new file mode 100644 index 000000000000..2bbbd5c9012c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_AB4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('DEDUP_EXCHANGE_RATE_AB3') }} +-- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql new file mode 100644 index 000000000000..18c8ddd97d14 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB1.sql @@ -0,0 +1,15 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['currency'], ['currency']) }} as CURRENCY, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, + {{ json_extract_scalar('_airbyte_data', ['timestamp_col'], ['timestamp_col']) }} as TIMESTAMP_COL, + {{ json_extract_scalar('_airbyte_data', ['HKD@spéçiäl & characters'], ['HKD@spéçiäl & characters']) }} as {{ adapter.quote('HKD@spéçiäl & characters') }}, + {{ json_extract_scalar('_airbyte_data', ['HKD_special___characters'], ['HKD_special___characters']) }} as HKD_SPECIAL___CHARACTERS, + {{ json_extract_scalar('_airbyte_data', ['NZD'], ['NZD']) }} as NZD, + {{ json_extract_scalar('_airbyte_data', ['USD'], ['USD']) }} as USD, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_EXCHANGE_RATE') }} as table_alias +-- EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql new file mode 100644 index 000000000000..050d2ac313ea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB2.sql @@ -0,0 +1,15 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_bigint() }}) as ID, + cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, + cast(DATE as {{ type_date() }}) as DATE, + cast(TIMESTAMP_COL as {{ type_timestamp_with_timezone() }}) as TIMESTAMP_COL, + cast({{ adapter.quote('HKD@spéçiäl & characters') }} as {{ dbt_utils.type_float() }}) as {{ adapter.quote('HKD@spéçiäl & characters') }}, + cast(HKD_SPECIAL___CHARACTERS as {{ dbt_utils.type_string() }}) as HKD_SPECIAL___CHARACTERS, + cast(NZD as {{ dbt_utils.type_float() }}) as NZD, + cast(USD as {{ dbt_utils.type_float() }}) as USD, + _airbyte_emitted_at +from {{ ref('EXCHANGE_RATE_AB1') }} +-- EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql new file mode 100644 index 000000000000..02258b1e1a70 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/EXCHANGE_RATE_AB3.sql @@ -0,0 +1,17 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'CURRENCY', + 'DATE', + 'TIMESTAMP_COL', + adapter.quote('HKD@spéçiäl & characters'), + 'HKD_SPECIAL___CHARACTERS', + 'NZD', + 'USD', + ]) }} as _AIRBYTE_EXCHANGE_RATE_HASHID +from {{ ref('EXCHANGE_RATE_AB2') }} +-- EXCHANGE_RATE + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..90adf07fca8c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, + {{ json_extract('table_alias', '_airbyte_data', ['partition'], ['partition']) }} as PARTITION, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} as table_alias +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..16dd9a71075a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_string() }}) as ID, + cast(DATE as {{ dbt_utils.type_string() }}) as DATE, + cast(PARTITION as {{ type_json() }}) as PARTITION, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1') }} +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..058cdc04fb64 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'DATE', + 'PARTITION', + ]) }} as _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB2') }} +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql new file mode 100644 index 000000000000..c8edcebe3b2b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to prepare for deduplicating records based on the hash record column +select + *, + row_number() over ( + partition by _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID + order by _airbyte_emitted_at asc + ) as _airbyte_row_num +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB3') }} +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql new file mode 100644 index 000000000000..acf63e332f16 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + {{ json_extract_array('PARTITION', ['double_array_data'], ['double_array_data']) }} as DOUBLE_ARRAY_DATA, + {{ json_extract_array('PARTITION', ['DATA'], ['DATA']) }} as DATA, + {{ json_extract_array('PARTITION', ['column`_\'with"_quotes'], ['column___with__quotes']) }} as {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} as table_alias +where PARTITION is not null +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql new file mode 100644 index 000000000000..ab9627d3858a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + DOUBLE_ARRAY_DATA, + DATA, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB1') }} +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql new file mode 100644 index 000000000000..73434fcf1550 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3.sql @@ -0,0 +1,13 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID', + array_to_string('DOUBLE_ARRAY_DATA'), + array_to_string('DATA'), + array_to_string(adapter.quote('column`_\'with""_quotes')), + ]) }} as _AIRBYTE_PARTITION_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB2') }} +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql new file mode 100644 index 000000000000..30d6e347c219 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', adapter.quote('column`_\'with""_quotes')) }} +select + _AIRBYTE_PARTITION_HASHID, + {{ json_extract_scalar(unnested_column_value(adapter.quote('column`_\'with""_quotes')), ['currency'], ['currency']) }} as CURRENCY, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias +{{ cross_join_unnest('PARTITION', adapter.quote('column`_\'with""_quotes')) }} +where {{ adapter.quote('column`_\'with""_quotes') }} is not null +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql new file mode 100644 index 000000000000..1f1eefc05b43 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB1') }} +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql new file mode 100644 index 000000000000..60b863aedf68 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_PARTITION_HASHID', + 'CURRENCY', + ]) }} as _AIRBYTE_COLUMN___WITH__QUOTES_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB2') }} +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql new file mode 100644 index 000000000000..b66c21e831d9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', 'DATA') }} +select + _AIRBYTE_PARTITION_HASHID, + {{ json_extract_scalar(unnested_column_value('DATA'), ['currency'], ['currency']) }} as CURRENCY, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias +{{ cross_join_unnest('PARTITION', 'DATA') }} +where DATA is not null +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql new file mode 100644 index 000000000000..f4179f4eb1b6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(CURRENCY as {{ dbt_utils.type_string() }}) as CURRENCY, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB1') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql new file mode 100644 index 000000000000..e06e62a24f2b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_PARTITION_HASHID', + 'CURRENCY', + ]) }} as _AIRBYTE_DATA_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB2') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql new file mode 100644 index 000000000000..777160d23295 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION', 'PARTITION', 'DOUBLE_ARRAY_DATA') }} +select + _AIRBYTE_PARTITION_HASHID, + {{ json_extract_scalar(unnested_column_value('DOUBLE_ARRAY_DATA'), ['id'], ['id']) }} as ID, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} as table_alias +{{ cross_join_unnest('PARTITION', 'DOUBLE_ARRAY_DATA') }} +where DOUBLE_ARRAY_DATA is not null +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql new file mode 100644 index 000000000000..0f3d482dd494 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_PARTITION_HASHID, + cast(ID as {{ dbt_utils.type_string() }}) as ID, + _airbyte_emitted_at +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB1') }} +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql new file mode 100644 index 000000000000..97328bd1e7e9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_PARTITION_HASHID', + 'ID', + ]) }} as _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB2') }} +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..b2b6ec858d46 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} as table_alias +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..2ad3d5394114 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_string() }}) as ID, + cast(DATE as {{ dbt_utils.type_string() }}) as DATE, + _airbyte_emitted_at +from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1') }} +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..b5212e7b74cd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'DATE', + ]) }} as _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2') }} +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql new file mode 100644 index 000000000000..a1710dd78111 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_scalar('_airbyte_data', ['date'], ['date']) }} as DATE, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION_NAMESPACE', '_AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} as table_alias +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql new file mode 100644 index 000000000000..26e3b008f2a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_string() }}) as ID, + cast(DATE as {{ dbt_utils.type_string() }}) as DATE, + _airbyte_emitted_at +from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB1') }} +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql new file mode 100644 index 000000000000..0138534102f0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION_NAMESPACE", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + 'DATE', + ]) }} as _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB2') }} +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql new file mode 100644 index 000000000000..30a90024e7cc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_ARRAY.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CONFLICT_STREAM_ARRAY, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_ARRAY_HASHID +from {{ ref('CONFLICT_STREAM_ARRAY_AB3') }} +-- CONFLICT_STREAM_ARRAY from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_ARRAY') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..84c242ac436b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CONFLICT_STREAM_NAME, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID +from {{ ref('CONFLICT_STREAM_NAME_AB3') }} +-- CONFLICT_STREAM_NAME from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_NAME') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..899be47a89de --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, + CONFLICT_STREAM_NAME, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name from {{ ref('CONFLICT_STREAM_NAME') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql new file mode 100644 index 000000000000..f133924a7f8b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_CONFLICT_STREAM_NAME_2_HASHID, + GROUPS, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_NAME_3_HASHID +from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB3') }} +-- CONFLICT_STREAM_NAME at conflict_stream_name/conflict_stream_name/conflict_stream_name from {{ ref('CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql new file mode 100644 index 000000000000..aa3d8675468e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/CONFLICT_STREAM_SCALAR.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CONFLICT_STREAM_SCALAR, + _airbyte_emitted_at, + _AIRBYTE_CONFLICT_STREAM_SCALAR_HASHID +from {{ ref('CONFLICT_STREAM_SCALAR_AB3') }} +-- CONFLICT_STREAM_SCALAR from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_CONFLICT_STREAM_SCALAR') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql new file mode 100644 index 000000000000..50908622050f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED.sql @@ -0,0 +1,14 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + NAME, + _AB_CDC_LSN, + _AB_CDC_UPDATED_AT, + _AB_CDC_DELETED_AT, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from {{ ref('DEDUP_CDC_EXCLUDED_SCD') }} +-- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql new file mode 100644 index 000000000000..8903da01bbcb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_CDC_EXCLUDED_SCD.sql @@ -0,0 +1,23 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + NAME, + _AB_CDC_LSN, + _AB_CDC_UPDATED_AT, + _AB_CDC_DELETED_AT, + _airbyte_emitted_at as _airbyte_start_at, + lag(_airbyte_emitted_at) over ( + partition by ID + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(_airbyte_emitted_at) over ( + partition by ID + order by _airbyte_emitted_at is null asc, _airbyte_emitted_at desc, _airbyte_emitted_at desc, _ab_cdc_updated_at desc + ) is null and _ab_cdc_deleted_at is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_CDC_EXCLUDED_HASHID +from {{ ref('DEDUP_CDC_EXCLUDED_AB4') }} +-- DEDUP_CDC_EXCLUDED from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_CDC_EXCLUDED') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql new file mode 100644 index 000000000000..a90e43b18289 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE.sql @@ -0,0 +1,17 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from {{ ref('DEDUP_EXCHANGE_RATE_SCD') }} +-- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql new file mode 100644 index 000000000000..cba34b5a4d68 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/DEDUP_EXCHANGE_RATE_SCD.sql @@ -0,0 +1,26 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + DATE as _airbyte_start_at, + lag(DATE) over ( + partition by ID, CURRENCY, cast(NZD as {{ dbt_utils.type_string() }}) + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(DATE) over ( + partition by ID, CURRENCY, cast(NZD as {{ dbt_utils.type_string() }}) + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_DEDUP_EXCHANGE_RATE_HASHID +from {{ ref('DEDUP_EXCHANGE_RATE_AB4') }} +-- DEDUP_EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_DEDUP_EXCHANGE_RATE') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql new file mode 100644 index 000000000000..5bc9dea3e852 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/EXCHANGE_RATE.sql @@ -0,0 +1,16 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CURRENCY, + DATE, + TIMESTAMP_COL, + {{ adapter.quote('HKD@spéçiäl & characters') }}, + HKD_SPECIAL___CHARACTERS, + NZD, + USD, + _airbyte_emitted_at, + _AIRBYTE_EXCHANGE_RATE_HASHID +from {{ ref('EXCHANGE_RATE_AB3') }} +-- EXCHANGE_RATE from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_EXCHANGE_RATE') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..b10c8c44b5de --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,12 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + DATE, + PARTITION, + _airbyte_emitted_at, + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD') }} +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} +where _airbyte_active_row = True + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql new file mode 100644 index 000000000000..de15cf595a01 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION.sql @@ -0,0 +1,12 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID, + DOUBLE_ARRAY_DATA, + DATA, + {{ adapter.quote('column`_\'with""_quotes') }}, + _airbyte_emitted_at, + _AIRBYTE_PARTITION_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_AB3') }} +-- PARTITION at nested_stream_with_complex_columns_resulting_into_long_names/partition from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql new file mode 100644 index 000000000000..dcff3b866ca9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + CURRENCY, + _airbyte_emitted_at, + _AIRBYTE_COLUMN___WITH__QUOTES_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_COLUMN___WITH__QUOTES_AB3') }} +-- COLUMN___WITH__QUOTES at nested_stream_with_complex_columns_resulting_into_long_names/partition/column`_'with"_quotes from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql new file mode 100644 index 000000000000..14700526c1fa --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + CURRENCY, + _airbyte_emitted_at, + _AIRBYTE_DATA_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DATA_AB3') }} +-- DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/DATA from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql new file mode 100644 index 000000000000..b64c459afe6b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_PARTITION_HASHID, + ID, + _airbyte_emitted_at, + _AIRBYTE_DOUBLE_ARRAY_DATA_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_DOUBLE_ARRAY_DATA_AB3') }} +-- DOUBLE_ARRAY_DATA at nested_stream_with_complex_columns_resulting_into_long_names/partition/double_array_data from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql new file mode 100644 index 000000000000..48114a2a5c1c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_SCD.sql @@ -0,0 +1,21 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- SQL model to build a Type 2 Slowly Changing Dimension (SCD) table for each record identified by their primary key +select + ID, + DATE, + PARTITION, + DATE as _airbyte_start_at, + lag(DATE) over ( + partition by ID + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) as _airbyte_end_at, + lag(DATE) over ( + partition by ID + order by DATE is null asc, DATE desc, _airbyte_emitted_at desc + ) is null as _airbyte_active_row, + _airbyte_emitted_at, + _AIRBYTE_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB4') }} +-- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES') }} +where _airbyte_row_num = 1 + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..d15f285c3d8b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + DATE, + _airbyte_emitted_at, + _AIRBYTE_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3') }} +-- NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql new file mode 100644 index 000000000000..717ec4afe68b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION_NAMESPACE/SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION_NAMESPACE", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + DATE, + _airbyte_emitted_at, + _AIRBYTE_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_HASHID +from {{ ref('SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES_AB3') }} +-- SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES from {{ source('TEST_NORMALIZATION_NAMESPACE', '_AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml new file mode 100644 index 000000000000..fa6caae072f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml @@ -0,0 +1,23 @@ +version: 2 +sources: +- name: TEST_NORMALIZATION + quoting: + database: true + schema: false + identifier: false + tables: + - name: _AIRBYTE_RAW_CONFLICT_STREAM_ARRAY + - name: _AIRBYTE_RAW_CONFLICT_STREAM_NAME + - name: _AIRBYTE_RAW_CONFLICT_STREAM_SCALAR + - name: _AIRBYTE_RAW_DEDUP_CDC_EXCLUDED + - name: _AIRBYTE_RAW_DEDUP_EXCHANGE_RATE + - name: _AIRBYTE_RAW_EXCHANGE_RATE + - name: _AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES + - name: _AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES +- name: TEST_NORMALIZATION_NAMESPACE + quoting: + database: true + schema: false + identifier: false + tables: + - name: _AIRBYTE_RAW_SIMPLE_STREAM_WITH_NAMESPACE_RESULTING_INTO_LONG_NAMES diff --git a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py index 859c65758ebd..b6630ce777c5 100644 --- a/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py +++ b/airbyte-integrations/bases/base-normalization/normalization/transform_catalog/stream_processor.py @@ -109,7 +109,6 @@ def __init__( self.sql_outputs: Dict[str, str] = {} self.parent: Optional["StreamProcessor"] = None self.is_nested_array: bool = False - self.table_alias: str = "table_alias" @staticmethod def create_from_parent( @@ -336,32 +335,27 @@ def generate_json_parsing_model(self, from_table: str, column_names: Dict[str, T fields=self.extract_json_columns(column_names), from_table=jinja_call(from_table), unnesting_after_query=self.unnesting_after_query(), - sql_table_comment=self.sql_table_comment(), + sql_table_comment=self.sql_table_comment() ) return sql def extract_json_columns(self, column_names: Dict[str, Tuple[str, str]]) -> List[str]: - # The `unnest_dest_alias` is used when destination macro unnested_column_value alias - # the join table. This causes conflict with table_alias alias when extract the json info - # from main table. - unnest_dest_alias = self.destination_type in [DestinationType.MYSQL, DestinationType.POSTGRES, DestinationType.REDSHIFT] return [ StreamProcessor.extract_json_column( - field, self.json_column_name, self.properties[field], column_names[field][0], self.table_alias, unnest_dest_alias + field, self.json_column_name, self.properties[field], column_names[field][0], 'table_alias' ) for field in column_names ] @staticmethod def extract_json_column( - property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str, unnest_dest_alias: bool - ) -> str: + property_name: str, json_column_name: str, definition: Dict, column_name: str, table_alias: str) -> str: json_path = [property_name] # In some cases, some destination aren't able to parse the JSON blob using the original property name # we make their life easier by using a pre-populated and sanitized column name instead... normalized_json_path = [transform_json_naming(property_name)] table_alias = f"{table_alias}" - if "unnested_column_value" in json_column_name and unnest_dest_alias: + if "unnested_column_value" in json_column_name: table_alias = '' json_extract = jinja_call(f"json_extract('{table_alias}', {json_column_name}, {json_path})") if "type" in definition: @@ -599,8 +593,7 @@ def generate_final_model(self, from_table: str, column_names: Dict[str, Tuple[st fields=self.list_fields(column_names), hash_id=self.hash_id(), from_table=jinja_call(from_table), - sql_table_comment=self.sql_table_comment(include_from_table=True), - table_alias=self.table_alias, + sql_table_comment=self.sql_table_comment(include_from_table=True) ) return sql From 69652b3a987910503f94147eed68978ad69ae985 Mon Sep 17 00:00:00 2001 From: Marcos Marx Date: Thu, 19 Aug 2021 15:35:50 -0300 Subject: [PATCH 8/8] add stream test unnest_alias --- .../conflict_stream_name_ab1.sql | 4 +- ...t_stream_name_conflict_stream_name_ab1.sql | 4 +- ..._columns_resulting_into_long_names_ab1.sql | 4 +- .../test_normalization/unnest_alias_ab1.sql | 13 +++ .../test_normalization/unnest_alias_ab2.sql | 15 +++ .../test_normalization/unnest_alias_ab3.sql | 18 ++++ .../unnest_alias_children_ab1.sql | 19 ++++ .../unnest_alias_children_ab2.sql | 18 ++++ .../unnest_alias_children_ab3.sql | 20 ++++ .../unnest_alias_children_owner_ab1.sql | 14 +++ .../unnest_alias_children_owner_ab2.sql | 15 +++ .../unnest_alias_children_owner_ab3.sql | 18 ++++ .../test_normalization/unnest_alias.sql | 18 ++++ .../unnest_alias_children.sql | 19 ++++ .../unnest_alias_children_owner.sql | 18 ++++ .../test_normalization/unnest_alias_ab1.sql | 9 ++ .../test_normalization/unnest_alias_ab2.sql | 9 ++ .../test_normalization/unnest_alias_ab3.sql | 11 ++ .../unnest_alias_children_ab1.sql | 13 +++ .../unnest_alias_children_ab2.sql | 10 ++ .../unnest_alias_children_ab3.sql | 12 +++ .../unnest_alias_children_owner_ab1.sql | 10 ++ .../unnest_alias_children_owner_ab2.sql | 9 ++ .../unnest_alias_children_owner_ab3.sql | 11 ++ .../test_normalization/unnest_alias.sql | 10 ++ .../unnest_alias_children.sql | 11 ++ .../unnest_alias_children_owner.sql | 10 ++ .../models/generated/sources.yml | 1 + .../test_normalization/unnest_alias_ab1.sql | 13 +++ .../test_normalization/unnest_alias_ab2.sql | 13 +++ .../test_normalization/unnest_alias_ab3.sql | 10 ++ .../unnest_alias_children_ab1.sql | 63 +++++++++++ .../unnest_alias_children_ab2.sql | 14 +++ .../unnest_alias_children_ab3.sql | 10 ++ .../unnest_alias_children_owner_ab1.sql | 13 +++ .../unnest_alias_children_owner_ab2.sql | 13 +++ .../unnest_alias_children_owner_ab3.sql | 10 ++ .../test_normalization/unnest_alias.sql | 15 +++ .../unnest_alias_children.sql | 16 +++ .../unnest_alias_children_owner.sql | 15 +++ .../test_normalization/unnest_alias_ab1.sql | 9 ++ .../test_normalization/unnest_alias_ab2.sql | 9 ++ .../test_normalization/unnest_alias_ab3.sql | 11 ++ .../unnest_alias_children_ab1.sql | 13 +++ .../unnest_alias_children_ab2.sql | 10 ++ .../unnest_alias_children_ab3.sql | 12 +++ .../unnest_alias_children_owner_ab1.sql | 10 ++ .../unnest_alias_children_owner_ab2.sql | 9 ++ .../unnest_alias_children_owner_ab3.sql | 11 ++ .../test_normalization/unnest_alias.sql | 10 ++ .../unnest_alias_children.sql | 11 ++ .../unnest_alias_children_owner.sql | 10 ++ .../models/generated/sources.yml | 1 + .../test_normalization/unnest_alias_ab1.sql | 11 ++ .../test_normalization/unnest_alias_ab2.sql | 13 +++ .../test_normalization/unnest_alias_ab3.sql | 20 ++++ .../unnest_alias_children_ab1.sql | 21 ++++ .../unnest_alias_children_ab2.sql | 16 +++ .../unnest_alias_children_ab3.sql | 22 ++++ .../unnest_alias_children_owner_ab1.sql | 12 +++ .../unnest_alias_children_owner_ab2.sql | 13 +++ .../unnest_alias_children_owner_ab3.sql | 20 ++++ .../test_normalization/unnest_alias.sql | 14 +++ .../unnest_alias_children.sql | 15 +++ .../unnest_alias_children_owner.sql | 14 +++ .../test_normalization/unnest_alias_ab1.sql | 9 ++ .../test_normalization/unnest_alias_ab2.sql | 9 ++ .../test_normalization/unnest_alias_ab3.sql | 11 ++ .../unnest_alias_children_ab1.sql | 13 +++ .../unnest_alias_children_ab2.sql | 10 ++ .../unnest_alias_children_ab3.sql | 12 +++ .../unnest_alias_children_owner_ab1.sql | 10 ++ .../unnest_alias_children_owner_ab2.sql | 9 ++ .../unnest_alias_children_owner_ab3.sql | 11 ++ .../test_normalization/unnest_alias.sql | 10 ++ .../unnest_alias_children.sql | 11 ++ .../unnest_alias_children_owner.sql | 10 ++ .../models/generated/sources.yml | 1 + .../test_normalization/unnest_alias.sql | 49 +++++++++ .../unnest_alias_children.sql | 100 ++++++++++++++++++ .../unnest_alias_children_owner.sql | 50 +++++++++ .../test_normalization/unnest_alias_ab1.sql | 9 ++ .../test_normalization/unnest_alias_ab2.sql | 9 ++ .../test_normalization/unnest_alias_ab3.sql | 11 ++ .../unnest_alias_children_ab1.sql | 13 +++ .../unnest_alias_children_ab2.sql | 10 ++ .../unnest_alias_children_ab3.sql | 12 +++ .../unnest_alias_children_owner_ab1.sql | 10 ++ .../unnest_alias_children_owner_ab2.sql | 9 ++ .../unnest_alias_children_owner_ab3.sql | 11 ++ .../test_normalization/unnest_alias.sql | 10 ++ .../unnest_alias_children.sql | 11 ++ .../unnest_alias_children_owner.sql | 10 ++ .../models/generated/sources.yml | 1 + .../CONFLICT_STREAM_NAME_AB1.sql | 4 +- ...T_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql | 4 +- ..._COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql | 4 +- .../TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql | 11 ++ .../TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql | 13 +++ .../TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql | 20 ++++ .../UNNEST_ALIAS_CHILDREN_AB1.sql | 17 +++ .../UNNEST_ALIAS_CHILDREN_AB2.sql | 16 +++ .../UNNEST_ALIAS_CHILDREN_AB3.sql | 22 ++++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql | 12 +++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql | 13 +++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql | 20 ++++ .../TEST_NORMALIZATION/UNNEST_ALIAS.sql | 14 +++ .../UNNEST_ALIAS_CHILDREN.sql | 15 +++ .../UNNEST_ALIAS_CHILDREN_OWNER.sql | 14 +++ .../TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql | 9 ++ .../TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql | 9 ++ .../TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql | 11 ++ .../UNNEST_ALIAS_CHILDREN_AB1.sql | 13 +++ .../UNNEST_ALIAS_CHILDREN_AB2.sql | 10 ++ .../UNNEST_ALIAS_CHILDREN_AB3.sql | 12 +++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql | 10 ++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql | 9 ++ .../UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql | 11 ++ .../TEST_NORMALIZATION/UNNEST_ALIAS.sql | 10 ++ .../UNNEST_ALIAS_CHILDREN.sql | 11 ++ .../UNNEST_ALIAS_CHILDREN_OWNER.sql | 10 ++ .../models/generated/sources.yml | 1 + .../data_input/catalog.json | 50 +++++++++ .../data_input/messages.txt | 7 ++ 124 files changed, 1692 insertions(+), 6 deletions(-) create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql create mode 100644 airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql index d5c87b768333..b2a5e728a659 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_ab1.sql @@ -6,7 +6,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select json_extract_scalar(_airbyte_data, "$['id']") as id, - json_extract(table_alias._airbyte_data, "$['conflict_stream_name']") as conflict_stream_name, + + json_extract(table_alias._airbyte_data, "$['conflict_stream_name']") + as conflict_stream_name, _airbyte_emitted_at from `dataline-integration-testing`.test_normalization._airbyte_raw_conflict_stream_name as table_alias -- conflict_stream_name; diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql index 6bc79f20076c..15ff7f7cc272 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/conflict_stream_name_conflict_stream_name_ab1.sql @@ -6,7 +6,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select _airbyte_conflict_stream_name_hashid, - json_extract(table_alias.conflict_stream_name, "$['conflict_stream_name']") as conflict_stream_name, + + json_extract(table_alias.conflict_stream_name, "$['conflict_stream_name']") + as conflict_stream_name, _airbyte_emitted_at from `dataline-integration-testing`.test_normalization.`conflict_stream_name` as table_alias where conflict_stream_name is not null diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql index b8f7ef23dfe6..ecd6deee4576 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/nested_stream_with_complex_columns_resulting_into_long_names_ab1.sql @@ -7,7 +7,9 @@ select json_extract_scalar(_airbyte_data, "$['id']") as id, json_extract_scalar(_airbyte_data, "$['date']") as date, - json_extract(table_alias._airbyte_data, "$['partition']") as `partition`, + + json_extract(table_alias._airbyte_data, "$['partition']") + as `partition`, _airbyte_emitted_at from `dataline-integration-testing`.test_normalization._airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names as table_alias -- nested_stream_with_complex_columns_resulting_into_long_names; diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..74d16273b1c1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,13 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_extract_scalar(_airbyte_data, "$['id']") as id, + json_extract_array(_airbyte_data, "$['children']") as children, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization._airbyte_raw_unnest_alias as table_alias +-- unnest_alias; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..ff4c7a287bc3 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + int64 +) as id, + children, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab1` +-- unnest_alias; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..483ef3476d37 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(id as + string +), ''), '-', coalesce(cast(array_to_string(children, "|", "") as + string +), '')) as + string +))) as _airbyte_unnest_alias_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab2` +-- unnest_alias; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..0dd96b131801 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,19 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_unnest_alias_hashid, + json_extract_scalar(children, "$['ab_id']") as ab_id, + + json_extract(children, "$['owner']") + as owner, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`unnest_alias` as table_alias +cross join unnest(children) as children +where children is not null +-- children at unnest_alias/children; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..fc350690e2d4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as + int64 +) as ab_id, + cast(owner as + string +) as owner, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab1` +-- children at unnest_alias/children; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..11e0c0e0a70e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,20 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_unnest_alias_hashid as + string +), ''), '-', coalesce(cast(ab_id as + string +), ''), '-', coalesce(cast(owner as + string +), '')) as + string +))) as _airbyte_children_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab2` +-- children at unnest_alias/children; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..7e66ffa11d0e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,14 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab1` + OPTIONS() + as +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + json_extract_scalar(owner, "$['owner_id']") as owner_id, + _airbyte_emitted_at +from `dataline-integration-testing`.test_normalization.`unnest_alias_children` as table_alias +where owner is not null +-- owner at unnest_alias/children/owner; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..58a22b1b80d2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,15 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab2` + OPTIONS() + as +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as + int64 +) as owner_id, + _airbyte_emitted_at +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab1` +-- owner at unnest_alias/children/owner; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..6918b982fffd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,18 @@ + + + create or replace view `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab3` + OPTIONS() + as +-- SQL model to build a hash column based on the values of this record +select + *, + to_hex(md5(cast(concat(coalesce(cast(_airbyte_children_hashid as + string +), ''), '-', coalesce(cast(owner_id as + string +), '')) as + string +))) as _airbyte_owner_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab2` +-- owner at unnest_alias/children/owner; + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..8b0cc5c7f1a1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`unnest_alias` + + + OPTIONS() + as ( + +-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_ab3` +-- unnest_alias from `dataline-integration-testing`.test_normalization._airbyte_raw_unnest_alias + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..e40743c250bf --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,19 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`unnest_alias_children` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + owner, + _airbyte_emitted_at, + _airbyte_children_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_ab3` +-- children at unnest_alias/children from `dataline-integration-testing`.test_normalization.`unnest_alias` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..7bc307d7269f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,18 @@ + + + create or replace table `dataline-integration-testing`.test_normalization.`unnest_alias_children_owner` + + + OPTIONS() + as ( + +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from `dataline-integration-testing`._airbyte_test_normalization.`unnest_alias_children_owner_ab3` +-- owner at unnest_alias/children/owner from `dataline-integration-testing`.test_normalization.`unnest_alias_children` + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..15b34c1ca7d4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_array('_airbyte_data', ['children'], ['children']) }} as children, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} as table_alias +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..a416538b5422 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + children, + _airbyte_emitted_at +from {{ ref('unnest_alias_ab1') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..9fe6b31ca58a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + array_to_string('children'), + ]) }} as _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab2') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..57abeb23159f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('unnest_alias', 'unnest_alias', 'children') }} +select + _airbyte_unnest_alias_hashid, + {{ json_extract_scalar(unnested_column_value('children'), ['ab_id'], ['ab_id']) }} as ab_id, + {{ json_extract('', unnested_column_value('children'), ['owner'], ['owner']) }} as owner, + _airbyte_emitted_at +from {{ ref('unnest_alias') }} as table_alias +{{ cross_join_unnest('unnest_alias', 'children') }} +where children is not null +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..8db853c1d601 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as {{ dbt_utils.type_bigint() }}) as ab_id, + cast(owner as {{ type_json() }}) as owner, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_ab1') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..ff511afe4c64 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_unnest_alias_hashid', + 'ab_id', + 'owner', + ]) }} as _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab2') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..4f28c4f8b5cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + {{ json_extract_scalar('owner', ['owner_id'], ['owner_id']) }} as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children') }} as table_alias +where owner is not null +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..a0f474c62db7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as {{ dbt_utils.type_bigint() }}) as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_owner_ab1') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..51cc166fd8a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_children_hashid', + 'owner_id', + ]) }} as _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab2') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..7a570c3836cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab3') }} +-- unnest_alias from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..77b2b0ad854e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,11 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + owner, + _airbyte_emitted_at, + _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab3') }} +-- children at unnest_alias/children from {{ ref('unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..0ccf8e33d8d6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab3') }} +-- owner at unnest_alias/children/owner from {{ ref('unnest_alias_children') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml index 69352d59cdbb..b3227f513333 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/bigquery/test_primary_key_streams/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - name: _airbyte_raw_exchange_rate - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + - name: _airbyte_raw_unnest_alias - name: test_normalization_namespace quoting: database: true diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..6e843ca7a657 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`unnest_alias_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + json_value(_airbyte_data, + '$."id"') as id, + json_extract(_airbyte_data, + '$."children"') as children, + _airbyte_emitted_at +from test_normalization._airbyte_raw_unnest_alias as table_alias +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..a7d929e77df0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`unnest_alias_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + signed +) as id, + children, + _airbyte_emitted_at +from _airbyte_test_normalization.`unnest_alias_ab1` +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..aae79730f78d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`unnest_alias_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(id as char), ''), '-', coalesce(cast(children as char), '')) as char)) as _airbyte_unnest_alias_hashid +from _airbyte_test_normalization.`unnest_alias_ab2` +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..0b2b2a86bd2d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,63 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 2 + order by generated_number + + + ), + joined as ( + select + _airbyte_unnest_alias_hashid as _airbyte_hashid, + + json_extract(children, concat("$[", numbers.generated_number - 1, "][0]")) as _airbyte_nested_data + from test_normalization.`unnest_alias` + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in unnest_alias.children + where numbers.generated_number <= json_length(children) + ) +select + _airbyte_unnest_alias_hashid, + json_value(_airbyte_nested_data, + '$."ab_id"') as ab_id, + + json_extract(_airbyte_nested_data, + '$."owner"') + as `owner`, + _airbyte_emitted_at +from test_normalization.`unnest_alias` as table_alias +left join joined on _airbyte_unnest_alias_hashid = joined._airbyte_hashid +where children is not null +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..3799355bfffe --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,14 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as + signed +) as ab_id, + cast(`owner` as json) as `owner`, + _airbyte_emitted_at +from _airbyte_test_normalization.`unnest_alias_children_ab1` +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..d3b5a5a37887 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_unnest_alias_hashid as char), ''), '-', coalesce(cast(ab_id as char), ''), '-', coalesce(cast(`owner` as char), '')) as char)) as _airbyte_children_hashid +from _airbyte_test_normalization.`unnest_alias_children_ab2` +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..a8080abb06b5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_owner_ab1__dbt_tmp` as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + json_value(`owner`, + '$."owner_id"') as owner_id, + _airbyte_emitted_at +from test_normalization.`unnest_alias_children` as table_alias +where `owner` is not null +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..e96688a1c6cc --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,13 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_owner_ab2__dbt_tmp` as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as + signed +) as owner_id, + _airbyte_emitted_at +from _airbyte_test_normalization.`unnest_alias_children_owner_ab1` +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..31985c6e03fd --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,10 @@ + + create view _airbyte_test_normalization.`unnest_alias_children_owner_ab3__dbt_tmp` as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast(concat(coalesce(cast(_airbyte_children_hashid as char), ''), '-', coalesce(cast(owner_id as char), '')) as char)) as _airbyte_owner_hashid +from _airbyte_test_normalization.`unnest_alias_children_owner_ab2` +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..cb9830768576 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`unnest_alias__dbt_tmp` + as ( + +-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from _airbyte_test_normalization.`unnest_alias_ab3` +-- unnest_alias from test_normalization._airbyte_raw_unnest_alias + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..8d943344e1ea --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,16 @@ + + + create table + test_normalization.`unnest_alias_children__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + `owner`, + _airbyte_emitted_at, + _airbyte_children_hashid +from _airbyte_test_normalization.`unnest_alias_children_ab3` +-- children at unnest_alias/children from test_normalization.`unnest_alias` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..74ae1e9027f2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,15 @@ + + + create table + test_normalization.`unnest_alias_children_owner__dbt_tmp` + as ( + +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from _airbyte_test_normalization.`unnest_alias_children_owner_ab3` +-- owner at unnest_alias/children/owner from test_normalization.`unnest_alias_children` + ) diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..15b34c1ca7d4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_array('_airbyte_data', ['children'], ['children']) }} as children, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} as table_alias +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..a416538b5422 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + children, + _airbyte_emitted_at +from {{ ref('unnest_alias_ab1') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..9fe6b31ca58a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + array_to_string('children'), + ]) }} as _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab2') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..2237b274e29b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('unnest_alias', 'unnest_alias', 'children') }} +select + _airbyte_unnest_alias_hashid, + {{ json_extract_scalar(unnested_column_value('children'), ['ab_id'], ['ab_id']) }} as ab_id, + {{ json_extract('', unnested_column_value('children'), ['owner'], ['owner']) }} as {{ adapter.quote('owner') }}, + _airbyte_emitted_at +from {{ ref('unnest_alias') }} as table_alias +{{ cross_join_unnest('unnest_alias', 'children') }} +where children is not null +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..435447589db2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as {{ dbt_utils.type_bigint() }}) as ab_id, + cast({{ adapter.quote('owner') }} as {{ type_json() }}) as {{ adapter.quote('owner') }}, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_ab1') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..504e7dc35a83 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_unnest_alias_hashid', + 'ab_id', + adapter.quote('owner'), + ]) }} as _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab2') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..9085180f4824 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + {{ json_extract_scalar(adapter.quote('owner'), ['owner_id'], ['owner_id']) }} as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children') }} as table_alias +where {{ adapter.quote('owner') }} is not null +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..a0f474c62db7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as {{ dbt_utils.type_bigint() }}) as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_owner_ab1') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..51cc166fd8a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_children_hashid', + 'owner_id', + ]) }} as _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab2') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..7a570c3836cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab3') }} +-- unnest_alias from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..9ce667c8b142 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,11 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + {{ adapter.quote('owner') }}, + _airbyte_emitted_at, + _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab3') }} +-- children at unnest_alias/children from {{ ref('unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..0ccf8e33d8d6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab3') }} +-- owner at unnest_alias/children/owner from {{ ref('unnest_alias_children') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml index 50c2d2f68ee8..8c0fe6237752 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/mysql/test_primary_key_streams/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - name: _airbyte_raw_exchange_rate - name: _airbyte_raw_nested_s__lting_into_long_names - name: _airbyte_raw_non_nest__lting_into_long_names + - name: _airbyte_raw_unnest_alias - name: test_normalization_namespace quoting: database: true diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..018a584a1ac0 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,11 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + jsonb_extract_path_text(_airbyte_data, 'id') as "id", + jsonb_extract_path(_airbyte_data, 'children') as children, + _airbyte_emitted_at +from "postgres".test_normalization._airbyte_raw_unnest_alias as table_alias +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..6e420b273a89 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast("id" as + bigint +) as "id", + children, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."unnest_alias_ab1" +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..15e5e0c80313 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast("id" as + varchar +), '') || '-' || coalesce(cast(children as + varchar +), '') + + as + varchar +)) as _airbyte_unnest_alias_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_ab2" +-- unnest_alias + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..c14e14b49980 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,21 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _airbyte_unnest_alias_hashid, + jsonb_extract_path_text(_airbyte_nested_data, 'ab_id') as ab_id, + + jsonb_extract_path(_airbyte_nested_data, 'owner') + as "owner", + _airbyte_emitted_at +from "postgres".test_normalization."unnest_alias" as table_alias +cross join jsonb_array_elements( + case jsonb_typeof(children) + when 'array' then children + else '[]' end + ) as _airbyte_nested_data +where children is not null +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..75278719675d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,16 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as + bigint +) as ab_id, + cast("owner" as + jsonb +) as "owner", + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."unnest_alias_children_ab1" +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..debe97d1178f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,22 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_unnest_alias_hashid as + varchar +), '') || '-' || coalesce(cast(ab_id as + varchar +), '') || '-' || coalesce(cast("owner" as + varchar +), '') + + as + varchar +)) as _airbyte_children_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_children_ab2" +-- children at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..1d3ff52740e1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,12 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab1__dbt_tmp" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + jsonb_extract_path_text("owner", 'owner_id') as owner_id, + _airbyte_emitted_at +from "postgres".test_normalization."unnest_alias_children" as table_alias +where "owner" is not null +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..773916c973af --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,13 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab2__dbt_tmp" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as + bigint +) as owner_id, + _airbyte_emitted_at +from "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab1" +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..d28decc92e1b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,20 @@ + + create view "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab3__dbt_tmp" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_children_hashid as + varchar +), '') || '-' || coalesce(cast(owner_id as + varchar +), '') + + as + varchar +)) as _airbyte_owner_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab2" +-- owner at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..546d7d6db6a1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."unnest_alias__dbt_tmp" + as ( + +-- Final base SQL model +select + "id", + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_ab3" +-- unnest_alias from "postgres".test_normalization._airbyte_raw_unnest_alias + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..36d780ad4cac --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,15 @@ + + + create table "postgres".test_normalization."unnest_alias_children__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + "owner", + _airbyte_emitted_at, + _airbyte_children_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_children_ab3" +-- children at unnest_alias/children from "postgres".test_normalization."unnest_alias" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..7913f47c46e9 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,14 @@ + + + create table "postgres".test_normalization."unnest_alias_children_owner__dbt_tmp" + as ( + +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from "postgres"._airbyte_test_normalization."unnest_alias_children_owner_ab3" +-- owner at unnest_alias/children/owner from "postgres".test_normalization."unnest_alias_children" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..a0e70f6b55be --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as {{ adapter.quote('id') }}, + {{ json_extract_array('_airbyte_data', ['children'], ['children']) }} as children, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} as table_alias +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..6fb7cfe48e7b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast({{ adapter.quote('id') }} as {{ dbt_utils.type_bigint() }}) as {{ adapter.quote('id') }}, + children, + _airbyte_emitted_at +from {{ ref('unnest_alias_ab1') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..48a19a7d0493 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + adapter.quote('id'), + array_to_string('children'), + ]) }} as _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab2') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..2237b274e29b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('unnest_alias', 'unnest_alias', 'children') }} +select + _airbyte_unnest_alias_hashid, + {{ json_extract_scalar(unnested_column_value('children'), ['ab_id'], ['ab_id']) }} as ab_id, + {{ json_extract('', unnested_column_value('children'), ['owner'], ['owner']) }} as {{ adapter.quote('owner') }}, + _airbyte_emitted_at +from {{ ref('unnest_alias') }} as table_alias +{{ cross_join_unnest('unnest_alias', 'children') }} +where children is not null +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..435447589db2 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as {{ dbt_utils.type_bigint() }}) as ab_id, + cast({{ adapter.quote('owner') }} as {{ type_json() }}) as {{ adapter.quote('owner') }}, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_ab1') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..504e7dc35a83 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_unnest_alias_hashid', + 'ab_id', + adapter.quote('owner'), + ]) }} as _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab2') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..9085180f4824 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + {{ json_extract_scalar(adapter.quote('owner'), ['owner_id'], ['owner_id']) }} as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children') }} as table_alias +where {{ adapter.quote('owner') }} is not null +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..a0f474c62db7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as {{ dbt_utils.type_bigint() }}) as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_owner_ab1') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..51cc166fd8a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_children_hashid', + 'owner_id', + ]) }} as _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab2') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..cdd45120be1c --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + {{ adapter.quote('id') }}, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab3') }} +-- unnest_alias from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..9ce667c8b142 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,11 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + {{ adapter.quote('owner') }}, + _airbyte_emitted_at, + _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab3') }} +-- children at unnest_alias/children from {{ ref('unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..0ccf8e33d8d6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab3') }} +-- owner at unnest_alias/children/owner from {{ ref('unnest_alias_children') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml index 69352d59cdbb..b3227f513333 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/postgres/test_primary_key_streams/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - name: _airbyte_raw_exchange_rate - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + - name: _airbyte_raw_unnest_alias - name: test_normalization_namespace quoting: database: true diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..9c87a66e640d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,49 @@ + + + create table + "integrationtests".test_normalization."unnest_alias__dbt_tmp" + + + as ( + +with __dbt__CTE__unnest_alias_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + case when json_extract_path_text(_airbyte_data, 'id', true) != '' then json_extract_path_text(_airbyte_data, 'id', true) end as id, + json_extract_path_text(_airbyte_data, 'children', true) as children, + _airbyte_emitted_at +from "integrationtests".test_normalization._airbyte_raw_unnest_alias as table_alias +-- unnest_alias +), __dbt__CTE__unnest_alias_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as + bigint +) as id, + children, + _airbyte_emitted_at +from __dbt__CTE__unnest_alias_ab1 +-- unnest_alias +), __dbt__CTE__unnest_alias_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(id as varchar), '') || '-' || coalesce(cast(children as varchar), '') + + as varchar)) as _airbyte_unnest_alias_hashid +from __dbt__CTE__unnest_alias_ab2 +-- unnest_alias +)-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from __dbt__CTE__unnest_alias_ab3 +-- unnest_alias from "integrationtests".test_normalization._airbyte_raw_unnest_alias + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..f5b50d3ba6e5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,100 @@ + + + create table + "integrationtests".test_normalization."unnest_alias_children__dbt_tmp" + + + as ( + +with __dbt__CTE__unnest_alias_children_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +with numbers as ( + + + + + with p as ( + select 0 as generated_number union all select 1 + ), unioned as ( + + select + + + p0.generated_number * pow(2, 0) + + + + 1 + as generated_number + + from + + + p as p0 + + + + ) + + select * + from unioned + where generated_number <= 2 + order by generated_number + + +), +joined as ( + select + _airbyte_unnest_alias_hashid as _airbyte_hashid, + json_extract_array_element_text(children, numbers.generated_number::int - 1, true) as _airbyte_nested_data + from "integrationtests".test_normalization."unnest_alias" + cross join numbers + -- only generate the number of records in the cross join that corresponds + -- to the number of items in unnest_alias.children + where numbers.generated_number <= json_array_length(children, true) +) +select + _airbyte_unnest_alias_hashid, + case when json_extract_path_text(_airbyte_nested_data, 'ab_id', true) != '' then json_extract_path_text(_airbyte_nested_data, 'ab_id', true) end as ab_id, + + case when json_extract_path_text(_airbyte_nested_data, 'owner', true) != '' then json_extract_path_text(_airbyte_nested_data, 'owner', true) end + as owner, + _airbyte_emitted_at +from "integrationtests".test_normalization."unnest_alias" as table_alias +left join joined on _airbyte_unnest_alias_hashid = joined._airbyte_hashid +where children is not null +-- children at unnest_alias/children +), __dbt__CTE__unnest_alias_children_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as + bigint +) as ab_id, + cast(owner as varchar) as owner, + _airbyte_emitted_at +from __dbt__CTE__unnest_alias_children_ab1 +-- children at unnest_alias/children +), __dbt__CTE__unnest_alias_children_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_unnest_alias_hashid as varchar), '') || '-' || coalesce(cast(ab_id as varchar), '') || '-' || coalesce(cast(owner as varchar), '') + + as varchar)) as _airbyte_children_hashid +from __dbt__CTE__unnest_alias_children_ab2 +-- children at unnest_alias/children +)-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + owner, + _airbyte_emitted_at, + _airbyte_children_hashid +from __dbt__CTE__unnest_alias_children_ab3 +-- children at unnest_alias/children from "integrationtests".test_normalization."unnest_alias" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..26ae3e6183a6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/final/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,50 @@ + + + create table + "integrationtests".test_normalization."unnest_alias_children_owner__dbt_tmp" + + + as ( + +with __dbt__CTE__unnest_alias_children_owner_ab1 as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + case when json_extract_path_text(owner, 'owner_id', true) != '' then json_extract_path_text(owner, 'owner_id', true) end as owner_id, + _airbyte_emitted_at +from "integrationtests".test_normalization."unnest_alias_children" as table_alias +where owner is not null +-- owner at unnest_alias/children/owner +), __dbt__CTE__unnest_alias_children_owner_ab2 as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as + bigint +) as owner_id, + _airbyte_emitted_at +from __dbt__CTE__unnest_alias_children_owner_ab1 +-- owner at unnest_alias/children/owner +), __dbt__CTE__unnest_alias_children_owner_ab3 as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_airbyte_children_hashid as varchar), '') || '-' || coalesce(cast(owner_id as varchar), '') + + as varchar)) as _airbyte_owner_hashid +from __dbt__CTE__unnest_alias_children_owner_ab2 +-- owner at unnest_alias/children/owner +)-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from __dbt__CTE__unnest_alias_children_owner_ab3 +-- owner at unnest_alias/children/owner from "integrationtests".test_normalization."unnest_alias_children" + ); \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql new file mode 100644 index 000000000000..15b34c1ca7d4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as id, + {{ json_extract_array('_airbyte_data', ['children'], ['children']) }} as children, + _airbyte_emitted_at +from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} as table_alias +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql new file mode 100644 index 000000000000..a416538b5422 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(id as {{ dbt_utils.type_bigint() }}) as id, + children, + _airbyte_emitted_at +from {{ ref('unnest_alias_ab1') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql new file mode 100644 index 000000000000..9fe6b31ca58a --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'id', + array_to_string('children'), + ]) }} as _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab2') }} +-- unnest_alias + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql new file mode 100644 index 000000000000..57abeb23159f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab1.sql @@ -0,0 +1,13 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('unnest_alias', 'unnest_alias', 'children') }} +select + _airbyte_unnest_alias_hashid, + {{ json_extract_scalar(unnested_column_value('children'), ['ab_id'], ['ab_id']) }} as ab_id, + {{ json_extract('', unnested_column_value('children'), ['owner'], ['owner']) }} as owner, + _airbyte_emitted_at +from {{ ref('unnest_alias') }} as table_alias +{{ cross_join_unnest('unnest_alias', 'children') }} +where children is not null +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql new file mode 100644 index 000000000000..8db853c1d601 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_unnest_alias_hashid, + cast(ab_id as {{ dbt_utils.type_bigint() }}) as ab_id, + cast(owner as {{ type_json() }}) as owner, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_ab1') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql new file mode 100644 index 000000000000..ff511afe4c64 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_ab3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_unnest_alias_hashid', + 'ab_id', + 'owner', + ]) }} as _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab2') }} +-- children at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql new file mode 100644 index 000000000000..4f28c4f8b5cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _airbyte_children_hashid, + {{ json_extract_scalar('owner', ['owner_id'], ['owner_id']) }} as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children') }} as table_alias +where owner is not null +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql new file mode 100644 index 000000000000..a0f474c62db7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _airbyte_children_hashid, + cast(owner_id as {{ dbt_utils.type_bigint() }}) as owner_id, + _airbyte_emitted_at +from {{ ref('unnest_alias_children_owner_ab1') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql new file mode 100644 index 000000000000..51cc166fd8a7 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_ctes/test_normalization/unnest_alias_children_owner_ab3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_airbyte_test_normalization", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_airbyte_children_hashid', + 'owner_id', + ]) }} as _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab2') }} +-- owner at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql new file mode 100644 index 000000000000..7a570c3836cb --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["top-level"]) }} +-- Final base SQL model +select + id, + children, + _airbyte_emitted_at, + _airbyte_unnest_alias_hashid +from {{ ref('unnest_alias_ab3') }} +-- unnest_alias from {{ source('test_normalization', '_airbyte_raw_unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql new file mode 100644 index 000000000000..77b2b0ad854e --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children.sql @@ -0,0 +1,11 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_unnest_alias_hashid, + ab_id, + owner, + _airbyte_emitted_at, + _airbyte_children_hashid +from {{ ref('unnest_alias_children_ab3') }} +-- children at unnest_alias/children from {{ ref('unnest_alias') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql new file mode 100644 index 000000000000..0ccf8e33d8d6 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/airbyte_tables/test_normalization/unnest_alias_children_owner.sql @@ -0,0 +1,10 @@ +{{ config(schema="test_normalization", tags=["nested"]) }} +-- Final base SQL model +select + _airbyte_children_hashid, + owner_id, + _airbyte_emitted_at, + _airbyte_owner_hashid +from {{ ref('unnest_alias_children_owner_ab3') }} +-- owner at unnest_alias/children/owner from {{ ref('unnest_alias_children') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml index 69352d59cdbb..b3227f513333 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/redshift/test_primary_key_streams/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - name: _airbyte_raw_exchange_rate - name: _airbyte_raw_nested_stream_with_complex_columns_resulting_into_long_names - name: _airbyte_raw_non_nested_stream_without_namespace_resulting_into_long_names + - name: _airbyte_raw_unnest_alias - name: test_normalization_namespace quoting: database: true diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql index e16d92665cb6..5b5e23d51235 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_AB1.sql @@ -4,7 +4,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, - get_path(parse_json(table_alias._airbyte_data), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, + + get_path(parse_json(table_alias._airbyte_data), '"conflict_stream_name"') + as CONFLICT_STREAM_NAME, _airbyte_emitted_at from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_CONFLICT_STREAM_NAME as table_alias -- CONFLICT_STREAM_NAME diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql index 81c068e3bc7e..1be68e8ec725 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/CONFLICT_STREAM_NAME_CONFLICT_STREAM_NAME_AB1.sql @@ -4,7 +4,9 @@ -- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema select _AIRBYTE_CONFLICT_STREAM_NAME_HASHID, - get_path(parse_json(table_alias.CONFLICT_STREAM_NAME), '"conflict_stream_name"') as CONFLICT_STREAM_NAME, + + get_path(parse_json(table_alias.CONFLICT_STREAM_NAME), '"conflict_stream_name"') + as CONFLICT_STREAM_NAME, _airbyte_emitted_at from "AIRBYTE_DATABASE".TEST_NORMALIZATION."CONFLICT_STREAM_NAME" as table_alias where CONFLICT_STREAM_NAME is not null diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql index 3d098f58376f..00876d5e1c4c 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_AB1.sql @@ -5,7 +5,9 @@ select to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, to_varchar(get_path(parse_json(_airbyte_data), '"date"')) as DATE, - get_path(parse_json(table_alias._airbyte_data), '"partition"') as PARTITION, + + get_path(parse_json(table_alias._airbyte_data), '"partition"') + as PARTITION, _airbyte_emitted_at from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES as table_alias -- NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql new file mode 100644 index 000000000000..ba2631b38559 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql @@ -0,0 +1,11 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + to_varchar(get_path(parse_json(_airbyte_data), '"id"')) as ID, + get_path(parse_json(_airbyte_data), '"children"') as CHILDREN, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_UNNEST_ALIAS as table_alias +-- UNNEST_ALIAS + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql new file mode 100644 index 000000000000..276d80f2fc2f --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as + bigint +) as ID, + CHILDREN, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB1" +-- UNNEST_ALIAS + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql new file mode 100644 index 000000000000..5524292c8111 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(ID as + varchar +), '') || '-' || coalesce(cast(CHILDREN as + varchar +), '') + + as + varchar +)) as _AIRBYTE_UNNEST_ALIAS_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB2" +-- UNNEST_ALIAS + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql new file mode 100644 index 000000000000..131bbcb99765 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql @@ -0,0 +1,17 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema + +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + to_varchar(get_path(parse_json(CHILDREN.value), '"ab_id"')) as AB_ID, + + get_path(parse_json(CHILDREN.value), '"owner"') + as OWNER, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS" as table_alias +cross join table(flatten(CHILDREN)) as CHILDREN +where CHILDREN is not null +-- CHILDREN at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql new file mode 100644 index 000000000000..9763bea2e895 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql @@ -0,0 +1,16 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + cast(AB_ID as + bigint +) as AB_ID, + cast(OWNER as + variant +) as OWNER, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB1" +-- CHILDREN at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql new file mode 100644 index 000000000000..78bbd8bbf43b --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql @@ -0,0 +1,22 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_UNNEST_ALIAS_HASHID as + varchar +), '') || '-' || coalesce(cast(AB_ID as + varchar +), '') || '-' || coalesce(cast(OWNER as + varchar +), '') + + as + varchar +)) as _AIRBYTE_CHILDREN_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB2" +-- CHILDREN at unnest_alias/children + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql new file mode 100644 index 000000000000..91599f9688ae --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql @@ -0,0 +1,12 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB1" as ( + +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CHILDREN_HASHID, + to_varchar(get_path(parse_json(OWNER), '"owner_id"')) as OWNER_ID, + _airbyte_emitted_at +from "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN" as table_alias +where OWNER is not null +-- OWNER at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql new file mode 100644 index 000000000000..fa8c6e6b40b4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql @@ -0,0 +1,13 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB2" as ( + +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CHILDREN_HASHID, + cast(OWNER_ID as + bigint +) as OWNER_ID, + _airbyte_emitted_at +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB1" +-- OWNER at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql new file mode 100644 index 000000000000..3590ea9e7d00 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql @@ -0,0 +1,20 @@ + + create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB3" as ( + +-- SQL model to build a hash column based on the values of this record +select + *, + md5(cast( + + coalesce(cast(_AIRBYTE_CHILDREN_HASHID as + varchar +), '') || '-' || coalesce(cast(OWNER_ID as + varchar +), '') + + as + varchar +)) as _AIRBYTE_OWNER_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB2" +-- OWNER at unnest_alias/children/owner + ); diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql new file mode 100644 index 000000000000..11cae6442c33 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS" as + ( +-- Final base SQL model +select + ID, + CHILDREN, + _airbyte_emitted_at, + _AIRBYTE_UNNEST_ALIAS_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_AB3" +-- UNNEST_ALIAS from "AIRBYTE_DATABASE".TEST_NORMALIZATION._AIRBYTE_RAW_UNNEST_ALIAS + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql new file mode 100644 index 000000000000..77cb07fd3872 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql @@ -0,0 +1,15 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN" as + ( +-- Final base SQL model +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + AB_ID, + OWNER, + _airbyte_emitted_at, + _AIRBYTE_CHILDREN_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_AB3" +-- CHILDREN at unnest_alias/children from "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql new file mode 100644 index 000000000000..69c885931619 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/final/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql @@ -0,0 +1,14 @@ + + + create or replace transient table "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER" as + ( +-- Final base SQL model +select + _AIRBYTE_CHILDREN_HASHID, + OWNER_ID, + _airbyte_emitted_at, + _AIRBYTE_OWNER_HASHID +from "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN_OWNER_AB3" +-- OWNER at unnest_alias/children/owner from "AIRBYTE_DATABASE".TEST_NORMALIZATION."UNNEST_ALIAS_CHILDREN" + ); + \ No newline at end of file diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql new file mode 100644 index 000000000000..d264ef5cf55d --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB1.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + {{ json_extract_scalar('_airbyte_data', ['id'], ['id']) }} as ID, + {{ json_extract_array('_airbyte_data', ['children'], ['children']) }} as CHILDREN, + _airbyte_emitted_at +from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_UNNEST_ALIAS') }} as table_alias +-- UNNEST_ALIAS + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql new file mode 100644 index 000000000000..7ccecf042489 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + cast(ID as {{ dbt_utils.type_bigint() }}) as ID, + CHILDREN, + _airbyte_emitted_at +from {{ ref('UNNEST_ALIAS_AB1') }} +-- UNNEST_ALIAS + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql new file mode 100644 index 000000000000..60ddfbeab162 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["top-level-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + 'ID', + array_to_string('CHILDREN'), + ]) }} as _AIRBYTE_UNNEST_ALIAS_HASHID +from {{ ref('UNNEST_ALIAS_AB2') }} +-- UNNEST_ALIAS + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql new file mode 100644 index 000000000000..a6080fcf1553 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB1.sql @@ -0,0 +1,13 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +{{ unnest_cte('UNNEST_ALIAS', 'UNNEST_ALIAS', 'CHILDREN') }} +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + {{ json_extract_scalar(unnested_column_value('CHILDREN'), ['ab_id'], ['ab_id']) }} as AB_ID, + {{ json_extract('', unnested_column_value('CHILDREN'), ['owner'], ['owner']) }} as OWNER, + _airbyte_emitted_at +from {{ ref('UNNEST_ALIAS') }} as table_alias +{{ cross_join_unnest('UNNEST_ALIAS', 'CHILDREN') }} +where CHILDREN is not null +-- CHILDREN at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql new file mode 100644 index 000000000000..90c36c51cc81 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB2.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + cast(AB_ID as {{ dbt_utils.type_bigint() }}) as AB_ID, + cast(OWNER as {{ type_json() }}) as OWNER, + _airbyte_emitted_at +from {{ ref('UNNEST_ALIAS_CHILDREN_AB1') }} +-- CHILDREN at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql new file mode 100644 index 000000000000..e2ce2b6c5e98 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_AB3.sql @@ -0,0 +1,12 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_UNNEST_ALIAS_HASHID', + 'AB_ID', + 'OWNER', + ]) }} as _AIRBYTE_CHILDREN_HASHID +from {{ ref('UNNEST_ALIAS_CHILDREN_AB2') }} +-- CHILDREN at unnest_alias/children + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql new file mode 100644 index 000000000000..9fe04587a297 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB1.sql @@ -0,0 +1,10 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to parse JSON blob stored in a single column and extract into separated field columns as described by the JSON Schema +select + _AIRBYTE_CHILDREN_HASHID, + {{ json_extract_scalar('OWNER', ['owner_id'], ['owner_id']) }} as OWNER_ID, + _airbyte_emitted_at +from {{ ref('UNNEST_ALIAS_CHILDREN') }} as table_alias +where OWNER is not null +-- OWNER at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql new file mode 100644 index 000000000000..cf6bb20836d1 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB2.sql @@ -0,0 +1,9 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type +select + _AIRBYTE_CHILDREN_HASHID, + cast(OWNER_ID as {{ dbt_utils.type_bigint() }}) as OWNER_ID, + _airbyte_emitted_at +from {{ ref('UNNEST_ALIAS_CHILDREN_OWNER_AB1') }} +-- OWNER at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql new file mode 100644 index 000000000000..d017a577e0e4 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_ctes/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER_AB3.sql @@ -0,0 +1,11 @@ +{{ config(schema="_AIRBYTE_TEST_NORMALIZATION", tags=["nested-intermediate"]) }} +-- SQL model to build a hash column based on the values of this record +select + *, + {{ dbt_utils.surrogate_key([ + '_AIRBYTE_CHILDREN_HASHID', + 'OWNER_ID', + ]) }} as _AIRBYTE_OWNER_HASHID +from {{ ref('UNNEST_ALIAS_CHILDREN_OWNER_AB2') }} +-- OWNER at unnest_alias/children/owner + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql new file mode 100644 index 000000000000..4729eff971b8 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["top-level"]) }} +-- Final base SQL model +select + ID, + CHILDREN, + _airbyte_emitted_at, + _AIRBYTE_UNNEST_ALIAS_HASHID +from {{ ref('UNNEST_ALIAS_AB3') }} +-- UNNEST_ALIAS from {{ source('TEST_NORMALIZATION', '_AIRBYTE_RAW_UNNEST_ALIAS') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql new file mode 100644 index 000000000000..e9af5ac70632 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN.sql @@ -0,0 +1,11 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_UNNEST_ALIAS_HASHID, + AB_ID, + OWNER, + _airbyte_emitted_at, + _AIRBYTE_CHILDREN_HASHID +from {{ ref('UNNEST_ALIAS_CHILDREN_AB3') }} +-- CHILDREN at unnest_alias/children from {{ ref('UNNEST_ALIAS') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql new file mode 100644 index 000000000000..0b090356caf5 --- /dev/null +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/airbyte_tables/TEST_NORMALIZATION/UNNEST_ALIAS_CHILDREN_OWNER.sql @@ -0,0 +1,10 @@ +{{ config(schema="TEST_NORMALIZATION", tags=["nested"]) }} +-- Final base SQL model +select + _AIRBYTE_CHILDREN_HASHID, + OWNER_ID, + _airbyte_emitted_at, + _AIRBYTE_OWNER_HASHID +from {{ ref('UNNEST_ALIAS_CHILDREN_OWNER_AB3') }} +-- OWNER at unnest_alias/children/owner from {{ ref('UNNEST_ALIAS_CHILDREN') }} + diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml index fa6caae072f2..ffba3e65d032 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml +++ b/airbyte-integrations/bases/base-normalization/integration_tests/normalization_test_output/snowflake/test_primary_key_streams/models/generated/sources.yml @@ -14,6 +14,7 @@ sources: - name: _AIRBYTE_RAW_EXCHANGE_RATE - name: _AIRBYTE_RAW_NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES - name: _AIRBYTE_RAW_NON_NESTED_STREAM_WITHOUT_NAMESPACE_RESULTING_INTO_LONG_NAMES + - name: _AIRBYTE_RAW_UNNEST_ALIAS - name: TEST_NORMALIZATION_NAMESPACE quoting: database: true diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json index 9e964f78fafa..1af6e6190b21 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/catalog.json @@ -42,6 +42,56 @@ "cursor_field": [], "destination_sync_mode": "overwrite" }, + { + "stream": { + "name": "unnest_alias", + "json_schema": { + "type": ["null", "object"], + "properties": { + "id": { + "type": "integer" + }, + "children": { + "type": [ + "null", + "array" + ], + "items": { + "type": "object", + "properties": { + "ab_id": { + "type": [ + "null", + "integer" + ] + }, + "owner": { + "type": [ + "null", + "object" + ], + "properties": { + "owner_id": { + "type": [ + "null", + "integer" + ] + } + } + } + } + } + } + } + }, + "supported_sync_modes": ["incremental"], + "source_defined_cursor": true, + "default_cursor_field": [] + }, + "sync_mode": "incremental", + "cursor_field": [], + "destination_sync_mode": "overwrite" + }, { "stream": { "name": "dedup_exchange_rate", diff --git a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt index 8a8b9659775d..5749d5ec3476 100644 --- a/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt +++ b/airbyte-integrations/bases/base-normalization/integration_tests/resources/test_primary_key_streams/data_input/messages.txt @@ -38,3 +38,10 @@ {"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":1, "conflict_stream_array": {"conflict_stream_array": [{"id": 1}, {"id": 2}, {"id": 3}]}}, "emitted_at":1623861660}} {"type":"RECORD","record":{"stream":"conflict_stream_array","data":{"id":2, "conflict_stream_array": {"conflict_stream_array": [{"id": 4}, {"id": 5}, {"id": 6}]}}, "emitted_at":1623861860}} + +{"type":"RECORD","record":{"stream":"conflict_stream_scalar","data":{"id":1,"conflict_stream_scalar": 2},"emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"conflict_stream_scalar","data":{"id":2,"conflict_stream_scalar": 2},"emitted_at":1623861660}} + +{"type":"RECORD","record":{"stream":"unnest_alias","data":{"id":1, "children": [{"ab_id": 1, "owner": {"owner_id": 1}},{"ab_id": 2, "owner": {"owner_id": 2}}]},"emitted_at":1623861660}} +{"type":"RECORD","record":{"stream":"unnest_alias","data":{"id":2, "children": [{"ab_id": 3, "owner": {"owner_id": 3}},{"ab_id": 4, "owner": {"owner_id": 4}}]},"emitted_at":1623861660}} +