베스트셀러 보고서 이전

이 문서에서는 이전 버전의 베스트셀러 보고서에서 최신 버전으로 이전하는 방법을 설명합니다. BestSellers_TopBrands_, BestSellers_TopProducts_, BestSellers_TopProducts_Inventory_ 테이블을 내보내는 이전 버전의 보고서는 2025년 9월 1일에 지원 중단됩니다.

새로운 베스트셀러 보고서에서는 다음을 제공합니다.

이전 보고서와 새 보고서에서 내보낸 테이블

다음 표에서는 이전 보고서와 새 보고서에서 내보낸 테이블을 비교합니다.

이전 보고서 신규 보고서
BestSellers_TopBrands BestSellersBrandWeeklyBestSellersBrandMonthly
BestSellers_TopProducts BestSellersProductClusterWeeklyBestSellersProductClusterMonthly
BestSellers_TopProducts_Inventory BestSellersEntityProductMapping

이전 보고서에는 지정되지 않은 기간 동안의 베스트셀러 데이터 집계가 하나 포함되어 있습니다. 새 보고서는 요청 시 이 데이터의 최신 주간 및 월간 집계를 모두 제공합니다.

BestSellers_TopBrandsBestSellersBrandWeekly, BestSellersBrandMonthly 비교

다음 표를 사용하면 BestSellers_TopBrands 테이블의 필드 중 BestSellersBrandWeeklyBestSellersBrandMonthly 테이블에 상응하는 대체 항목이 있는 필드를 식별할 수 있습니다. 이전 테이블의 일부 필드는 대체할 수 없습니다.

BestSellers_TopBrands (이전) BestSellersBrandWeeklyBestSellersBrandMonthly (신규)
rank_timestamp _PARTITIONDATE_PARTITIONTIME
brand brand
google_brand_id
ranking_category category_id
ranking_category_path.locale
ranking_category_path.name
ranking_country country_code
rank_id
rank rank
previous_rank previous_rank
relative_demand.bucket relative_demand
relative_demand.min
relative_demand.max
previous_relative_demand.bucket previous_relative_demand
previous_relative_demand.min
previous_relative_demand.max
relative_demand_change

BestSellers_TopProductsBestSellersProductClusterWeekly, BestSellersProductClusterMonthly 비교

다음 표를 사용하면 BestSellers_TopProducts 테이블의 필드 중 BestSellersProductClusterWeeklyBestSellersProductClusterMonthly 테이블에 상응하는 대체 항목이 있는 필드를 식별할 수 있습니다. 이전 테이블의 일부 필드는 대체할 수 없습니다.

BestSellers_TopProducts (이전) BestSellersProductClusterWeeklyBestSellersProductClusterMonthly (신규)
rank_timestamp _PARTITIONDATE_PARTITIONTIME
rank_id entity_id
rank rank
previous_rank previous_rank
ranking_country country_code
ranking_category report_category_id
ranking_category_path.locale
ranking_category_path.name
relative_demand.bucket relative_demand
relative_demand.min
relative_demand.max
previous_relative_demand.bucket previous_relative_demand
previous_relative_demand.min
previous_relative_demand.max
relative_demand_change
product_title.locale
product_title.name title (모든 언어의 배열 대신 단일 제목)
gtins variant_gtins
google_brand_id
brand brand
google_product_category
category_l1, category_l2, category_l3, category_l4, category_l5
google_product_category_path.locale
google_product_category_path.name
price_range.min price_range.min_amount_micros
price_range.max price_range.max_amount_micros
price_range.currency price_range.currency_code
product_inventory_status
brand_inventory_status

베스트셀러 데이터의 인벤토리 매핑

이전 베스트셀러 보고서에서는 TopProducts 테이블rank_id 열을 사용하여 새로 생성된 테이블의 판매자 인벤토리 데이터에 베스트셀러 데이터가 매핑되었습니다.

새 베스트셀러 보고서에서는 entity_id 열이 BestSellersProductCluster 테이블로 내보내지며, 이 열은 BestSellersEntityProductMapping 테이블의 판매자 인벤토리에 있는 모든 제품 ID에 매핑됩니다.

BestSellers_TopProductsInventory (이전) BestSellersEntityProductMapping (신규)
rank_id (BestSellers_TopProducts에 있음) entity_id (BestSellersProductClustersWeeklyBestSellersProductClustersMonthly 테이블에 있음)
product_id product_id
merchant_id
aggregator_id

쿼리 예

이 섹션에서는 베스트셀러 데이터를 검색하는 데 사용되는 쿼리 예시의 변경사항을 강조 표시합니다.

예 1: 지정된 카테고리 및 국가의 인기 제품 검색

다음 쿼리는 지정된 카테고리 및 국가의 인기 제품을 반환합니다.

BestSellers_TopProducts 테이블 사용 (기존)

SELECT
  rank,
  previous_rank,
  relative_demand.bucket,
  (SELECT name FROM top_products.product_title WHERE locale = 'en-US') AS product_title,
  brand,
  price_range,
  google_product_category
FROM
  `DATASET.BestSellers_TopProducts_MERCHANT_ID` AS top_products
WHERE
  _PARTITIONDATE = 'DATE' AND
  ranking_category = 267 /*Smartphones*/ AND
  ranking_country = 'US'
ORDER BY
  rank;

BestSellersProductClusterWeekly 또는 BestSellersProductClusterMonthly 표 사용 (신규)

SELECT
  rank,
  previous_rank,
  relative_demand,
  title AS product_title,
  brand,
  price_range,
  category_l1,
  category_l2
FROM
  `DATASET.BestSellersProductClusterWeekly_MERCHANT_ID` AS top_products
WHERE
  _PARTITIONDATE = 'DATE' AND
  report_category_id = 267 /*Smartphones*/ AND
  country_code = 'US'
ORDER BY
  rank;

예 2: 인벤토리의 인기 제품 검색

다음 쿼리는 인벤토리에 있는 인기 제품 목록을 반환합니다.

BestSellers_TopProducts 테이블 사용 (기존)

WITH latest_top_products AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellers_TopProducts_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
),
latest_top_products_inventory AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellers_TopProducts_Inventory_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
)
SELECT
  top_products.rank,
  inventory.product_id,
  (SELECT ANY_VALUE(name) FROM top_products.product_title) AS product_title,
  top_products.brand,
  top_products.gtins
FROM
  latest_top_products AS top_products
INNER JOIN
  latest_top_products_inventory AS inventory
USING (rank_id);

BestSellersProductClusterWeekly 또는 BestSellersProductClusterMonthly 표 사용 (신규)

WITH latest_top_products AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellersProductClusterWeekly_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
),
latest_top_products_inventory AS
(
  SELECT
    *
  FROM
    `DATASET.BestSellersEntityProductMapping_MERCHANT_ID`
  WHERE
    _PARTITIONDATE = 'DATE'
)
SELECT
  top_products.rank,
  inventory.product_id,
  top_products.title AS product_title,
  top_products.brand,
  top_products.variant_gtins
FROM
  latest_top_products AS top_products
INNER JOIN
  latest_top_products_inventory AS inventory
USING (entity_id);

또한 인벤토리의 베스트셀러 제품 또는 브랜드 수를 확인하려면 product_inventory_status 또는 brand_inventory_status 열을 사용하여 BestSellerProductClusterWeekly 또는 BestSellerProductClusterMonthly 테이블에서 쿼리를 실행하세요. 다음 쿼리 예시를 참고하세요.

SELECT
  *
FROM
  `DATASET.BestSellersProductClusterMonthly_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  product_inventory_status != 'NOT_IN_INVENTORY'
ORDER BY
  rank;

예시 3: 지정된 카테고리 및 국가의 인기 브랜드 검색

다음 쿼리는 지정된 카테고리 및 국가의 최고 브랜드 목록을 반환합니다.

BestSellers_TopBrands 테이블 사용 (기존)

SELECT
  rank,
  previous_rank,
  brand
FROM
  `DATASET.BestSellers_TopBrands_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  ranking_category = 267 /*Smartphones*/ AND
  ranking_country = 'US'
ORDER BY
  rank;

BestSellersTopBrandsWeekly 또는 BestSellersTopBrandsMonthly 표 사용 (신규)

SELECT
  rank,
  previous_rank,
  brand
FROM
  `DATASET.BestSellersTopBrandsWeekly_MERCHANT_ID`
WHERE
  _PARTITIONDATE = 'DATE' AND
  report_category_id = 267 /*Smartphones*/ AND
  country_code = 'US'
ORDER BY
  rank;

예 4: 인벤토리의 인기 브랜드 제품 검색

다음 쿼리는 인벤토리에 있는 인기 브랜드의 제품 목록을 반환합니다.

BestSellers_TopBrands 테이블 사용 (기존)

WITH latest_top_brands AS
  (
    SELECT
      *
    FROM
      `DATASET.BestSellers_TopBrands_MERCHANT_ID`
    WHERE
      _PARTITIONDATE = 'DATE'
  ),
  latest_products AS
  (
    SELECT
      product.*,
      product_category_id
    FROM
      `DATASET.Products_MERCHANT_ID` AS product,
      UNNEST(product.google_product_category_ids) AS product_category_id,
      UNNEST(destinations) AS destination,
      UNNEST(destination.approved_countries) AS approved_country
    WHERE
      _PARTITIONDATE = 'DATE'
  )
SELECT
  top_brands.brand,
  (SELECT name FROM top_brands.ranking_category_path
  WHERE locale = 'en-US') AS ranking_category,
  top_brands.ranking_country,
  top_brands.rank,
  products.product_id,
  products.title
FROM
  latest_top_brands AS top_brands
INNER JOIN
  latest_products AS products
ON top_brands.google_brand_id = products.google_brand_id AND
   top_brands.ranking_category = product_category_id AND
   top_brands.ranking_country = products.approved_country;

BestSellersTopBrandsWeekly 또는 BestSellersTopBrandsMonthly 표 사용 (신규)

WITH latest_top_brands AS
  (
    SELECT
      *
    FROM
      `DATASET.BestSellersBrandMonthly_MERCHANT_ID`
    WHERE
      _PARTITIONDATE = 'DATE'
  ),
  latest_products AS
  (
    SELECT
      product.*,
      product_category_id
    FROM
      `DATASET.Products_MERCHANT_ID` AS product,
      UNNEST(product.google_product_category_ids) AS product_category_id,
      UNNEST(destinations) AS destination,
      UNNEST(destination.approved_countries) AS approved_country
    WHERE
      _PARTITIONDATE = 'DATE'
  )
SELECT
  top_brands.brand,
  - The full category name is not supported in the new BestSellersTopBrands tables.
  - (SELECT name FROM top_brands.ranking_category_path
  - WHERE locale = 'en-US') AS ranking_category,
  top_brands.category_id,
  top_brands.rank,
  products.product_id,
  products.title
FROM
  latest_top_brands AS top_brands
INNER JOIN
  latest_products AS products
ON top_brands.brand = products.brand AND
   top_brands.category_id = product_category_id AND
   top_brands.country_code = products.approved_country;

다음 쿼리에서 다음을 바꿉니다.

  • DATASET: 데이터 세트의 이름
  • MERCHANT_ID: 판매자 계정 ID입니다.
  • DATE: YYYY-MM-DD 형식의 날짜

다음 단계