-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Greg/guykoh update dbt clickhouse (#14897)
* Update dbt-clickhouse version to 1.1.7 to support AirByte on ClickHouse cloud * Fix quote handling in Clickhouse normalization tests * Update test output for Clickhouse * Bump version and update changelog Co-authored-by: guykohen <guy@clickhouse.com>
- Loading branch information
Showing
33 changed files
with
191 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...t_simple_streams/first_output/airbyte_ctes/test_normalization/dedup_exchange_rate_ab1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
-- depends_on: test_normalization._airbyte_raw_dedup_exchange_rate | ||
select | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'id') as id, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'currency') as currency, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'date') as date, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'timestamp_col') as timestamp_col, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'HKD@spéçiäl & characters') as "HKD@spéçiäl & characters", | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'HKD_special___characters') as HKD_special___characters, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'NZD') as NZD, | ||
JSONExtractRaw(assumeNotNull(_airbyte_data), 'USD') as USD, | ||
_airbyte_ab_id, | ||
_airbyte_emitted_at, | ||
now() as _airbyte_normalized_at | ||
from test_normalization._airbyte_raw_dedup_exchange_rate as table_alias | ||
-- dedup_exchange_rate | ||
where 1 = 1 | ||
|
||
) |
33 changes: 33 additions & 0 deletions
33
...t_simple_streams/first_output/airbyte_ctes/test_normalization/dedup_exchange_rate_ab2.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
|
||
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 | ||
-- depends_on: _airbyte_test_normalization.dedup_exchange_rate_ab1 | ||
select | ||
accurateCastOrNull(id, ' | ||
BIGINT | ||
') as id, | ||
nullif(accurateCastOrNull(trim(BOTH '"' from currency), 'String'), 'null') as currency, | ||
toDate(parseDateTimeBestEffortOrNull(trim(BOTH '"' from nullif(date, '')))) as date, | ||
parseDateTime64BestEffortOrNull(trim(BOTH '"' from nullif(timestamp_col, ''))) as timestamp_col, | ||
accurateCastOrNull("HKD@spéçiäl & characters", ' | ||
Float64 | ||
') as "HKD@spéçiäl & characters", | ||
nullif(accurateCastOrNull(trim(BOTH '"' from HKD_special___characters), 'String'), 'null') as HKD_special___characters, | ||
accurateCastOrNull(NZD, ' | ||
Float64 | ||
') as NZD, | ||
accurateCastOrNull(USD, ' | ||
Float64 | ||
') as USD, | ||
_airbyte_ab_id, | ||
_airbyte_emitted_at, | ||
now() as _airbyte_normalized_at | ||
from _airbyte_test_normalization.dedup_exchange_rate_ab1 | ||
-- dedup_exchange_rate | ||
where 1 = 1 | ||
|
||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.