[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis feature allows querying of Google Merchant Center data transferred to BigQuery, which is stored in ingestion-time partitioned tables.\u003c/p\u003e\n"],["\u003cp\u003eQueries must utilize the \u003ccode\u003e_PARTITIONTIME\u003c/code\u003e or \u003ccode\u003e_PARTITIONDATE\u003c/code\u003e pseudocolumn when querying Google Merchant Center tables.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eProducts_\u003c/code\u003e table contains nested and repeated fields that require specific handling as described in the GoogleSQL documentation.\u003c/p\u003e\n"],["\u003cp\u003eSample SQL queries are provided to analyze transferred data, including tracking product statistics, products disapproved for Shopping Ads, and products with disapproved issues, which can also be utilized with visualization tools.\u003c/p\u003e\n"],["\u003cp\u003eWhen using an MCA account, a unique key using \u003ccode\u003emerchant_id\u003c/code\u003e and \u003ccode\u003eproduct_id\u003c/code\u003e is necessary in some sample queries to prevent \u003ccode\u003eproduct_id\u003c/code\u003e collisions across multiple sub-accounts.\u003c/p\u003e\n"]]],[],null,["# Query your Google Merchant Center Transfers data\n================================================\n\n|\n| **Preview**\n|\n|\n| This product is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nWhen your data is transferred to BigQuery, the data is\nwritten to ingestion-time partitioned tables. For more information, see\n[Introduction to partitioned tables](/bigquery/docs/partitioned-tables).\n\nWhen you query your Google Merchant Center table, you\nmust use the `_PARTITIONTIME` or `_PARTITIONDATE` pseudocolumn in your query.\nFor more information, see [Querying partitioned tables](/bigquery/docs/querying-partitioned-tables).\n\nThe `Products_` table contains nested and repeated fields. For information on\nhandling nested and repeated data, see\n[Differences in repeated field handling](/bigquery/docs/reference/standard-sql/migrating-from-legacy-sql#differences_in_repeated_field_handling)\nin the GoogleSQL documentation.\n\nGoogle Merchant Center sample queries\n-------------------------------------\n\nYou can use the following Google Merchant Center sample queries to analyze your\ntransferred data. You can also use the queries in a visualization tool such as\n[Looker Studio](https://www.google.com/analytics/data-studio/).\n\nIn each of the following queries, replace \u003cvar translate=\"no\"\u003edataset\u003c/var\u003e with your dataset\nname. Replace \u003cvar translate=\"no\"\u003emerchant_id\u003c/var\u003e with your Merchant ID. If you're using an\nMCA, replace \u003cvar translate=\"no\"\u003emerchant_id\u003c/var\u003e with your MCA ID.\n\n### Products and product issues statistics\n\nThe following SQL sample query provides the number of products, products with\nissues, and issues by day. \n\n```googlesql\nSELECT\n _PARTITIONDATE AS date,\n COUNT(*) AS num_products,\n COUNTIF(ARRAY_LENGTH(issues) \u003e 0) AS num_products_with_issues,\n SUM(ARRAY_LENGTH(issues)) AS num_issues\nFROM\n dataset.Products_\u003cvar translate=\"no\"\u003emerchant_id\u003c/var\u003e\nWHERE\n _PARTITIONDATE \u003e= '\u003cvar translate=\"no\"\u003eYYYY-MM-DD\u003c/var\u003e'\nGROUP BY\n date\nORDER BY\n date DESC\n```\n\n### Products disapproved for Shopping Ads\n\nThe following SQL sample query provides the number of products that are not\napproved for display in Shopping Ads, separated by country. Disapproval\ncan result from the destination being\n[excluded](https://support.google.com/merchants/answer/6324486)\nor because of an issue with the product. \n\n```googlesql\nSELECT\n _PARTITIONDATE AS date,\n disapproved_country,\n COUNT(*) AS num_products\nFROM\n dataset.Products_\u003cvar translate=\"no\"\u003emerchant_id\u003c/var\u003e,\n UNNEST(destinations) AS destination,\n UNNEST(disapproved_countries) AS disapproved_country\nWHERE\n _PARTITIONDATE \u003e= '\u003cvar translate=\"no\"\u003eYYYY-MM-DD\u003c/var\u003e'\nGROUP BY\n date, disapproved_country\nORDER BY\n date DESC\n```\n\n### Products with disapproved issues\n\nThe following SQL sample query retrieves the number of products with disapproved\nissues, separated by country. \n\n```googlesql\nSELECT\n _PARTITIONDATE AS date,\n applicable_country,\n COUNT(DISTINCT CONCAT(CAST(merchant_id AS STRING), ':', product_id))\n AS num_distinct_products\nFROM\n dataset.Products_\u003cvar translate=\"no\"\u003emerchant_id\u003c/var\u003e,\n UNNEST(issues) AS issue,\n UNNEST(issue.applicable_countries) as applicable_country\nWHERE\n _PARTITIONDATE \u003e= '\u003cvar translate=\"no\"\u003eYYYY-MM-DD\u003c/var\u003e' AND\n issue.servability = 'disapproved'\nGROUP BY\n date, applicable_country\nORDER BY\n date DESC\n```\n| **Note:** This query constructs a unique key by using `merchant_id` and `product_id`. This is only required if you have an MCA account. When you use an MCA account, there is the potential for `product_id` collisions across multiple sub-accounts."]]