Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

[Bug] Error resulting due to url_tags being a JSON field and the downstream models expected a STRING [In BigQuery] #42

@magoavi

Description

@magoavi

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

The model facebook_ads__url_tags.sql fails due to the following error in BigQuery:

13:21:48 Database Error in model facebook_ads__url_tags (models/facebook_ads__url_tags.sql)
No matching signature for function TRIM
Argument types: JSON, STRING
Signature: TRIM(STRING, [STRING])
Argument 1: Unable to coerce type JSON to expected type STRING
Signature: TRIM(BYTES, BYTES)
Argument 1: Unable to coerce type JSON to expected type BYTES at [41:38]
compiled code at target/run/facebook_ads/models/facebook_ads__url_tags.sql

console_output.log

Relevant error log or model output

The model facebook_ads__url_tags.sql (this is in the facebook_ads DBT package) expects url_tags to be a STRING field.

^Tested in BigQuery

Expected behavior

The model facebook_ads__url_tags.sql should work.

Possible solution

Update the stg_facebook_ads__creative_history.sql model to change url_tags to a STRING field for bigquery.

dbt Project configurations

name: 'dbt_oooo'
version: '1.0.0'
config-version: 2

profile: 'default'

model-paths: ["models"]
analysis-paths: ["analyses"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]

models:
dbt_oooo:
models:
facebook_ads_source:
+schema: dbt_src_facebook_ads
facebook_ads:
+schema: dbt_stg_facebook_ads

vars:
facebook_ads_database: oooo-bi
facebook_ads_schema: src_facebook_ads

Package versions

0.8.0

What database are you using dbt with?

bigquery

How are you running this dbt package?

dbt Cloud™

dbt Version

2

Additional Context

No response

Are you willing to open a PR to help address this issue?

  • Yes.
  • Yes, but I will need assistance.
  • No.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions