-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Google Ads to Postgres type mismatch on ad_group_ad_labels, ad_group_labels and campaign_labels #12096
Comments
We are seeing the same issue with Snowflake as destination
|
Update: The broken version is 0.1.30, previous versions work fine. |
hi @jagannathsrs |
@b4stien can you confirm if the new version is working as expected? |
I am still getting a type conversion error on airbyte/source-google-ads:0.1.36. I am not sure if this is specific to the SQL Server dest:
Here is a sample payload from Google Ads for the Ad Group Labels: {
"ad_group.resource_name": "customers/1111111111/adGroups/222222222222",
"ad_group_label.resource_name": "customers/1111111111/adGroupLabels/222222222222~3333333333",
"label.name": "some_lable_here",
"label.resource_name": "customers/1111111111/labels/3333333333"
} It looks like the DBT transformation is still treating the create view google_ads."ad_group_ad_labels__dbt_tmp_temp_view" as
with
__dbt__cte__ad_group_ad_labels_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
-- depends_on: "Raw".google_ads._airbyte_raw_ad_group_ad_labels
select
json_value(_airbyte_data, ''$."label.name"'') as "label.name",
json_value(_airbyte_data, ''$."label.resource_name"'') as "label.resource_name",
json_value(_airbyte_data, ''$."ad_group_ad.ad.resource_name"'') as "ad_group_ad.ad.resource_name",
json_value(_airbyte_data, ''$."ad_group_ad_label.resource_name"'') as "ad_group_ad_label.resource_name",
_airbyte_ab_id,
_airbyte_emitted_at,
SYSDATETIME() as _airbyte_normalized_at
from "Raw".google_ads._airbyte_raw_ad_group_ad_labels as table_alias
-- ad_group_ad_labels
where 1 = 1
),
__dbt__cte__ad_group_ad_labels_ab2 as (
-- SQL model to cast each column to its adequate SQL type converted from the JSON schema type
-- depends_on: __dbt__cte__ad_group_ad_labels_ab1
select
cast("label.name" as
bigint
) as "label.name",
cast("label.resource_name" as
bigint
) as "label.resource_name",
cast("ad_group_ad.ad.resource_name" as
bigint
) as "ad_group_ad.ad.resource_name",
cast("ad_group_ad_label.resource_name" as
VARCHAR(max)) as "ad_group_ad_label.resource_name",
_airbyte_ab_id,
_airbyte_emitted_at,
SYSDATETIME() as _airbyte_normalized_at
from __dbt__cte__ad_group_ad_labels_ab1
-- ad_group_ad_labels
where 1 = 1 As there is no other parsing to get just the numbers, they should be all string types rather than number types. |
@robby-rob have you tried refreshing the schema? |
@davydov-d Yep that fixed the issue! |
great, so I'm closing this issue. Thanks for cooperation |
I can confirm: it fixed the issue. |
Postgres seems to be expecting "bigint" for Google Ads
ad_group_ad_labels
,ad_group_labels
andcampaign_labels
, hence the failure. The relevant log lines are (more below):I have no idea why #11884 has been closed, it seems to me that the problem still exists.
Environment
Current Behavior
The sync job fails at the normalization phase.
Expected Behavior
The sync job would succeed (and report a success).
Logs
The extract of the end of the logs.
LOG
Steps to Reproduce
Launch a new job with Google Ads as source and Postgres as destination selecting all available streams.
The text was updated successfully, but these errors were encountered: