Google Merchant Center 价格基准表

概览

BigQuery 中的“价格基准”数据可帮助商家了解其他商家对同一商品的定价。当您的 Google Merchant Center 报告数据转移到 BigQuery 时,Products_PriceBenchmarks_ 表的格式会提供每个国家/地区和每件商品的每日价格基准。

如果您使用的是个人商家 ID,则数据将写入名为 Products_PriceBenchmarks_MERCHANT_ID 的表;如果您使用的是 MCA 账号,则数据将写入名为 Products_PriceBenchmarks_AGGREGATOR_ID 的表。

架构

Products_PriceBenchmarks 表具有以下架构:

BigQuery 数据类型 说明
product_id STRING 商品的 Content API REST ID,格式为 channel:content_language:feed_label:offer_id,与商品表架构中的定义方式类似。此字段是主键。
merchant_id INTEGER 商家账号 ID。
aggregator_id INTEGER 多客户账号的集合商家账号 ID。
country_of_sale STRING 用户在 Google 上执行查询时所在的国家/地区。
price_benchmark_value FLOAT 特定商品按点击次数加权平均后的价格,根据使用购物广告宣传此商品的所有商家的售价计算得出。根据 GTIN 匹配商品。如需了解详情,请参阅帮助中心文章
price_benchmark_currency STRING 基准价值的币种。
price_benchmark_timestamp DATETIME 基准的时间戳。

示例:将商品价格与基准进行对比

以下 SQL 查询会联接 ProductsPrice Benchmarks 数据以返回商品列表和关联的基准。

WITH products AS
(
  SELECT
    _PARTITIONDATE AS date,
    *
  FROM
    dataset.Products_merchant_id
  WHERE
   _PARTITIONDATE >= 'YYYY-MM-DD'
),
benchmarks AS
(
  SELECT
    _PARTITIONDATE AS date,
    *
  FROM
    dataset.Products_PriceBenchmarks_merchant_id
  WHERE
    _PARTITIONDATE >= 'YYYY-MM-DD'
)
SELECT
  products.date,
  products.product_id,
  products.merchant_id,
  products.aggregator_id,
  products.price,
  products.sale_price,
  benchmarks.price_benchmark_value,
  benchmarks.price_benchmark_currency,
  benchmarks.country_of_sale
FROM
  products
INNER JOIN
  benchmarks
ON products.product_id = benchmarks.product_id AND
   products.merchant_id = benchmarks.merchant_id AND
   products.date = benchmarks.date