when running the klaviyo package in Snowflake, an error message appears concerning the use of try_cast with types float and number(38, 0). when migrating the compiled code to snowflake, the model runs when try_cast is removed.
Relevant error log or model output
`15:14:41 Completed with 1 error and 0 warnings:
15:14:41
15:14:41 Database Error in model klaviyo__person_campaign_flow (models/klaviyo__person_campaign_flow.sql)
15:14:41 001065 (22023): SQL compilation error:
15:14:41 Function TRY_CAST cannot be used with arguments of types FLOAT and NUMBER(38,0)
15:14:41 compiled SQL at target/run/klaviyo/models/klaviyo__person_campaign_flow.sql`
models:
transient: false
copy_grants: true
ao_project:
ao:
database: ao
materialized: view
etl:
schema: etl
database: ao
materialized: view
description: The transformation pipelines and SQL models to move data from the raw schema into the transformed schema
tct:
database: tct
materialized: view
etl:
schema: etl
database: tct
materialized: view
description: The transformation pipelines and SQL models to move data from the raw schema into the transformed schema
Is there an existing issue for this?
Describe the issue
when running the klaviyo package in Snowflake, an error message appears concerning the use of try_cast with types float and number(38, 0). when migrating the compiled code to snowflake, the model runs when
try_cast
is removed.Relevant error log or model output
Expected behavior
the model to run without error
dbt Project configurations
name: 'ao_project' version: '1.0.0' require-dbt-version: '1.0.4'
config-version: 2
Cloning variables
vars: shopify_database: ao shopify_schema: tct_shopify_fivetran
Databases
This setting configures which "profile" dbt uses for this project.
profile: 'rho-ao'
These configurations specify where dbt should look for different types of files.
The
source-paths
config, for example, states that models in this project can befound in the "models/" directory. You probably won't need to change these!
model-paths: ["models"] analysis-paths: ["analysis"] test-paths: ["tests"] seed-paths: ["data"] macro-paths: ["macros"] snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files clean-targets: # directories to be removed by
dbt clean
seeds: database: "tct" schema: "etl" enabled: true quote_columns: false
Configuring models
Full documentation: https://docs.getdbt.com/docs/configuring-models
models: transient: false copy_grants: true ao_project: ao: database: ao materialized: view etl: schema: etl database: ao materialized: view description: The transformation pipelines and SQL models to move data from the raw schema into the transformed schema tct: database: tct materialized: view etl: schema: etl database: tct materialized: view description: The transformation pipelines and SQL models to move data from the raw schema into the transformed schema
Package versions
packages:
package: dbt-labs/dbt_utils version: 0.8.4
package: fivetran/shopify_source version: 0.6.0
package: fivetran/shopify version: 0.6.0
package: fivetran/shopify_holistic_reporting version: 0.1.0
package: fivetran/klaviyo_source version: 0.4.1
package: fivetran/klaviyo version: 0.4.1
What database are you using dbt with?
snowflake
dbt Version
1.0.4
Additional Context
No response
Are you willing to open a PR to help address this issue?