fivetran / dbt_tiktok_ads

Fivetran data models for TikTok Ads built using dbt.
https://fivetran.github.io/dbt_tiktok_ads/
Apache License 2.0
3 stars 8 forks source link

BUG - Database Error in model `stg_tiktok_ads__ad_group_history` for BQ Adapter #15

Open satyam-gupta-ib opened 3 months ago

satyam-gupta-ib commented 3 months ago

Describe the bug While using TikTok Ads Package version= 0.5.0, I am encountering an error while running the model stg_tiktok_ads__ad_group_history

Exact Error Message: No matching signature for function COALESCE for argument types: JSON, STRING. Supported signature: COALESCE([ANY, ...]) at [211:9]

Expected behavior The model should run through and build the table without encountering the error.

Project variables configuration

models:
  core:
    +database: data-core
    tiktok_ads:
      +schema: tiktok_ads
    tiktok_ads_source:
      +schema: stg_tiktok_ads

vars:
  tiktok_ads_database: data-lake
  tiktok_ads_schema: tiktok_ads

Package Version

packages:
  - package: fivetran/tiktok_ads_source
    version: [">=0.5.0", "<0.6.0"]

Warehouse

- [x] BigQuery - [ ] Redshift - [ ] Snowflake - [ ] Postgres - [ ] Databricks - [ ] Other (provide details below) **Additional context** **Screenshots**

image

Please indicate the level of urgency

Quite Urgent as currently I am unable to use the package and hence can't build Ads Report.

Are you interested in contributing to this package?

satyam-gupta-ib commented 3 months ago

@fivetran-joemarkiewicz I see you made the most recent commits to this repository so maybe you can help?

fivetran-avinash commented 3 months ago

Hi @satyam-intent-brands , this is an error we are aware of and I think we are figuring out next best steps. Let me chat with my team and I'll try and get an answer back to you shortly.

fivetran-avinash commented 3 months ago

Hi @satyam-intent-brands, this JSON parsing issue will take some time for our team to actually fix before we can officially deploy it to the package. We hope to have it live in a future release in the coming months.

However, there is a potential workaround for you! We do have a branch that does account for this JSON issue that we see with BigQuery customers. If you were to change your packages.yml to the following:

- git: https://github.com/fivetran/dbt_tiktok_ads_source.git
  revision: patch/to-json-string
  warn-unpinned: false

This should hopefully fix up the JSON/string errors.

Let us know if this works or if you have any questions.