Hi,
I have encountered an strange problem while trying to do a query to the "asset_group" report. As I can see in the documentation, "segments.date" is compatible with resource "asset_group" since you can find it in the segments documentation:
And also, the segments.date appears in de asset_group documentation too:
So I cannot understand why, when I tried to do the following query:
SELECT
metrics.revenue_micros,
metrics.conversions_value,
metrics.impressions,
metrics.conversions,
metrics.clicks,
metrics.cost_micros,
metrics.interactions,
metrics.all_conversions_value,
metrics.all_conversions,
campaign.url_custom_parameters,
campaign.advertising_channel_type,
campaign.tracking_url_template,
campaign.labels, campaign.id,
campaign.final_url_suffix,
asset_group.path2,
asset_group.path1,
asset_group.name,
asset_group.id,
asset_group.final_urls,
asset_group.final_mobile_urls,
asset_group.ad_strength,
campaign.advertising_channel_sub_type
FROM
asset_group
WHERE
segments.date BETWEEN 20240613 and 20240613
The response is an error that says segments.date is incompatible with asset_group:
(<_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B2a00:1450:4003:800::200a%5D:443 {grpc_message:"Request contains an invalid argument.", grpc_status:3, created_time:"2024-06-13T14:56:20.664649+00:00"}"
>, <_InactiveRpcError of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B2a00:1450:4003:800::200a%5D:443 {grpc_message:"Request contains an invalid argument.", grpc_status:3, created_time:"2024-06-13T14:56:20.664649+00:00"}"
>, errors {
error_code {
query_error: PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE
}
message: "Cannot select or filter on the following segments: \'segments.date\'(could not support requested resources: \'ASSET_GROUP\'), since segment is incompatible with the resource in the FROM clause or other selected segmenting resources."
}
request_id: "VVZtDq_tQ-Rh7VjkgJlOJQ"
, 'VVZtDq_tQ-Rh7VjkgJlOJQ')
I have also tried to do the query simpler with:
SELECT
metrics.cost_micros,
asset_group.name,
asset_group.id,
campaign.advertising_channel_sub_type
FROM
asset_group
WHERE
segments.date BETWEEN 20240613 and 20240613
But the response is the same error. It does not make sense with the documentation.
Could you please help me with this issue?
Thanks,
Iván