<@U04S8PLJWMT> I am facing problem in connecting g...
# ask-ai
s
@kapa.ai I am facing problem in connecting google ads into my clickhouse db, I am getting the below error even when the column names are present in the clickhouse table as well
Copy code
Warning from destination: Code: 47. DB::Exception: Missing columns: 'segments_device' 'segments_date' 'segments_ad_network_type' 'customer_id' while processing: 'customer_id, segments_date, segments_ad_network_type, segments_device', required columns: 'customer_id' 'segments_ad_network_type' 'segments_date' 'segments_device', available columns: 'metrics.all_conversions_from_interactions_rate.null' 'metrics.search_exact_match_impression_share.null' 'metrics.conversions_from_interactions_rate.null' 'metrics.content_rank_lost_impression_share.null' 'metrics.active_view_measurable_impressions.null' 'metrics.active_view_measurable_cost_micros.null' 'metrics.search_rank_lost_impression_share.null' 'metrics.value_per_all_conversions.null' 'metrics.active_view_measurability.null' 'metrics.view_through_conversions.null' 'metrics.cross_device_conversions.null' 'metrics.content_impression_share.null' 'metrics.search_impression_share.null' 'metrics.active_view_viewability.null' 'metrics.active_view_impressions.null' 'metrics.all_conversions_value.null' 'customer.auto_tagging_enabled.null' 'metrics.conversions_value.null' 'customer.descriptive_name.null' 'segments.ad_network_type.null' 'metrics.conversions_from_interactions_rate' 'customer.currency_code.null' 'metrics.conversions_value' 'metrics.active_view_ctr.null' 'customer.test_account.null' 'metrics.cost_per_conversion.null' 'metrics.all_conversions.null' 'metrics.interactions.null' 'metrics.average_cost.null' 'customer.test_account' 'metrics.value_per_all_conversions' 'metrics.impressions.null' 'segments.device.null' 'metrics.conversions.null' 'metrics.average_cpv.null' 'metrics.average_cpe.null' 'metrics.average_cost' 'customer.time_zone.null' 'segments.date' 'metrics.average_cpm.null' 'metrics.impressions' 'metrics.clicks.null' 'metrics.active_view_measurability' 'segments.year.null' 'customer.auto_tagging_enabled' 'segments.week.null' 'segments.date.null' 'metrics.all_conversions_from_interactions_rate' 'metrics.search_exact_match_impression_share' 'metrics.content_rank_lost_impression_share' 'metrics.active_view_measurable_cost_micros' 'metrics.video_view_rate.null' 'metrics.average_cpc.null' '_airbyte_generation_id' 'segments.year' 'metrics.view_through_conversions' 'customer.manager.null' 'metrics.search_rank_lost_impression_share' 'segments.day_of_week.null' 'metrics.engagements' 'metrics.active_view_measurable_impressions' 'metrics.interaction_event_types' 'metrics.search_budget_lost_impression_share' 'segments.month.null' 'metrics.content_impression_share' 'metrics.video_view_rate' 'metrics.cost_per_conversion' 'metrics.interactions' 'customer.descriptive_name' 'metrics.ctr' 'segments.device' 'metrics.active_view_viewability' 'metrics.engagements.null' 'metrics.engagement_rate' 'metrics.active_view_cpm' 'segments.ad_network_type' 'metrics.interaction_rate.null' '_airbyte_extracted_at' 'metrics.video_views' 'metrics.content_budget_lost_impression_share.null' 'customer.currency_code' 'metrics.average_cpc' 'customer.id.null' 'metrics.content_budget_lost_impression_share' '_airbyte_raw_id' 'metrics.active_view_impressions' 'segments.quarter.null' 'metrics.ctr.null' 'metrics.conversions' 'metrics.interaction_event_types.null' 'metrics.cross_device_conversions' 'metrics.average_cpv' 'metrics.average_cpm' 'metrics.video_views.null' 'metrics.search_budget_lost_impression_share.null' 'customer.manager' 'metrics.value_per_conversion' 'customer.time_zone' 'metrics.cost_micros' 'metrics.value_per_conversion.null' 'metrics.engagement_rate.null' 'metrics.cost_per_all_conversions.null' 'metrics.active_view_ctr' 'metrics.average_cpe' 'metrics.all_conversions_value' 'metrics.active_view_cpm.null' 'segments.quarter' 'metrics.all_conversions' 'metrics.cost_micros.null' 'segments.week' 'segments.day_of_week' 'metrics.search_impression_share' 'customer.id' 'segments.month' 'metrics.clicks' 'metrics.interaction_rate' 'metrics.cost_per_all_conversions' '_airbyte_meta'. (UNKNOWN_IDENTIFIER) (version 25.5.3.75 (official build))
k
The error you're encountering—`DB:Exception Missing columns: ... (UNKNOWN_IDENTIFIER)`—typically occurs when there is a mismatch between the expected column names in the ClickHouse destination and the actual column names present in the table. In your case, the error message shows that Airbyte is looking for columns like
segments_device
,
segments_date
,
segments_ad_network_type
, and
customer_id
, but the available columns in ClickHouse are named with dots (e.g.,
segments.device
,
segments.date
,
segments.ad_network_type
,
customer.id
). This discrepancy is likely due to how Airbyte and ClickHouse handle column name sanitization and transformation: - Airbyte, when syncing data from sources like Google Ads, often preserves the original field names, which may include dots (e.g.,
segments.date
). However, in some cases, column names may be sanitized (e.g., replacing dots with underscores) depending on the connector version or normalization process. - If the destination expects sanitized names (with underscores) but the actual table has columns with dots, or vice versa, this will result in missing column errors. Relevant findings from the knowledge sources: - There have been known issues with column name sanitization in the ClickHouse destination, especially when using Incremental Append + Deduped sync mode. For example, columns with spaces or special characters may be renamed (e.g.,
"Line No"
to
Line_No
), causing schema mismatches and sync errors. This was fixed in ClickHouse destination version 2.0.6 and above, so upgrading may resolve similar issues for you if you are on an older version [Github Issue: Column name discrepancy](https://github.com/airbytehq/airbyte/issues/63695). - The ClickHouse destination maps Airbyte types to ClickHouse types and outputs columns as per the defined schema. If JSON is enabled, object types are stored as JSON; otherwise, as String. However, there is no explicit mention in the documentation about automatic replacement of dots with underscores in column names, so the default behavior is to keep the original field names unless normalization or sanitization is applied [ClickHouse Destination Docs](https://docs.airbyte.com/integrations/destinations/clickhouse). - If you are using custom queries or have edited the schema, ensure that the column names in your ClickHouse table exactly match those expected by Airbyte (including dots vs. underscores) [Google Ads Custom Query Docs](https://docs.airbyte.com/integrations/sources/google-ads#custom-query-understanding-google-ads-query-language). What you can do: 1. Check your ClickHouse table schema: Verify whether your columns are named with dots (e.g.,
segments.date
) or underscores (e.g.,
segments_date
). The error suggests your table uses dots, but Airbyte is looking for underscores. 2. Align column naming: If possible, adjust your table schema to match the expected column names, or reconfigure your Airbyte connection to match the actual column names in ClickHouse. 3. Upgrade your ClickHouse destination connector: If you are not on the latest version, upgrade to at least 2.0.6, as several column name handling issues have been fixed in recent releases [Github Issue: Column name discrepancy](https://github.com/airbytehq/airbyte/issues/63695). 4. Reset and refresh schemas: After making changes, refresh your source and destination schemas in Airbyte and reset the affected streams to ensure the schema is correctly applied [Google Ads Migration Guide](https://docs.airbyte.com/integrations/sources/google-ads-migrations). If after these steps the issue persists, please provide details about your Airbyte and ClickHouse connector versions, and whether you are using any custom normalization or transformation steps. Let me know if you need more specific troubleshooting steps!