遷移價格競爭力報表

本文將說明如何從 2025 年 9 月 1 日起停用的價格基準報表,遷移至新的價格競爭力報表。

新的價格競爭力報表提供下列資訊:

比較價格基準和價格競爭力資料表結構定義

下表有助於找出Products_PriceBenchmarks資料表中,在PriceCompetitiveness_資料表中有對應替代項目的欄位:

價格基準 (舊版) 價格競爭力 (新功能)
product_id id
merchant_id merchant_id
aggregator_id aggregator_id
country_of_sale report_country_code
price_benchmark_value benchmark_price.amount_micros
price_benchmark_currency benchmark_price.currency_code
price_benchmark_timestamp _PARTITIONDATE_PARTITIONTIME

此外,PriceCompetitiveness_ 表格還包含商品目錄的其他資料,例如名稱、品牌、產品類型和類別,以及商家商品目錄中的產品價格。這項資料可讓您有效比較和分析基準價格與自家價格。

新版PriceCompetitiveness_表格提供下列額外欄位:

欄位 說明
title 產品名稱。
brand 產品品牌。
offer_id 商家提供的產品 ID
price 產品價格。
price.amount_micros 商品價格,以微量單位表示 (1 代表 1000000)。
price.currency_code 商品價格的幣別。
product_type_l1 產品的產品類型屬性
product_type_l2 產品的產品類型屬性
product_type_l3 產品的產品類型屬性
product_type_l4 產品的產品類型屬性
product_type_l5 產品的產品類型屬性
category_l1 產品的 Google 產品類別
category_l2 產品的 Google 產品類別
category_l3 產品的 Google 產品類別
category_l4 產品的 Google 產品類別
category_l5 產品的 Google 產品類別

價格競爭力和價格基準不支援回填。當您要求轉移時,他們一律會傳回目前可用的資料。

查詢範例

本節重點說明用於擷取價格競爭力資料的範例查詢異動。

範例 1:擷取各國家/地區的產品價格基準

下列查詢會傳回各國家/地區的產品價格基準清單。請注意,產品在不同國家/地區的基準可能不同。

使用 Products_PriceBenchmarks 表格 (舊版)

SELECT
  DATE(price_benchmark_timestamp) AS date,
  product_id,
  merchant_id,
  aggregator_id,
  country_of_sale,
  price_benchmark_value,
  price_benchmark_currency
FROM
  `DATASET.Products_PriceBenchmarks_MERCHANT_ID`
WHERE
  _PARTITIONDATE >= 'DATE';

使用 PriceCompetitiveness 表格 (新版)

SELECT
  _PARTITIONDATE AS date,
  id,
  merchant_id,
  aggregator_id,
  report_country_code,
  benchmark_price.amount_micros,
  benchmark_price.currency_code
FROM
  `DATASET.PriceCompetitiveness_MERCHANT_ID`
WHERE
  _PARTITIONDATE >= 'DATE';

範例 2:擷取產品和相關基準

下列查詢會擷取產品和相關聯的基準。

彙整「Products」和「PriceBenchmarks」資料表 (舊版)

WITH products AS (
  SELECT
    _PARTITIONDATE AS date,
    *
  FROM
    `DATASET.Products_MERCHANT_ID`
  WHERE
    _PARTITIONDATE >= 'DATE'
), benchmarks AS (
  SELECT
    _PARTITIONDATE AS date,
    *
  FROM
    `DATASET.Products_PriceBenchmarks_MERCHANT_ID`
  WHERE
    _PARTITIONDATE >= 'DATE'
)
SELECT
  products.date,
  products.product_id,
  products.merchant_id,
  products.aggregator_id,
  products.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;

使用 PriceCompetitiveness 表格 (新版)

SELECT
  _PARTITIONDATE AS date,
  id AS product_id,
  merchant_id,
  aggregator_id,
  price.amount_micros,
  price.currency_code,
  benchmark_price.amount_micros,
  benchmark_price.currency_code,
  report_country_code AS country_of_sale
FROM
  `DATASET.PriceCompetitiveness_MERCHANT_ID`
WHERE
  _PARTITIONDATE >= 'DATE';

在這些查詢中,請取代下列項目:

  • DATASET:資料集名稱
  • MERCHANT_ID:商家帳戶 ID
  • DATE:日期,格式為 YYYY-MM-DD

後續步驟