コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このページでは、Cortex Framework Data Foundation デプロイメントに共通ディメンションを構成するオプションの手順について説明します。Cortex Framework の共通ディメンションは、さまざまなデータソース(クロスメディアや商品の関連インサイトなど)で高度なユースケースを実現するために、Data Foundation 内で作成されたユーティリティ ビューとテーブルです。
すべての共通ディメンションの構成は、構成ファイルの k9
セクションにあります。
国ディメンション
Cortex Framework の国ディメンションは、ISO-3166 の国コードをそれぞれの長い名前に統一された方法で関連付けます。
有効にするには、構成ファイルで k9.deployCountryDim
を true
に設定します。
商品階層ディメンション
商品階層ディメンションは、任意のソースからソースデータを取り込むことができる抽象スキーマを提供します。その後、商品階層の照合などの高度なユースケースに使用できます。
SAP のデプロイが準備されている場合は、Cortex Framework にサンプルの取り込み DAG も用意されています。
有効にするには、構成ファイルで k9.deployProductDim
を true
に設定します。次のように設定します。
パラメータ
|
意味 |
デフォルト値 |
k9.ProductDim.dataSourceType
|
商品階層のデータソースのタイプ。
"SAP" に設定すると、Data Foundations は SAP データソースから商品階層を読み込む DAG をデプロイします。この場合、SAP デプロイメントを有効にする必要があります。
他のデータソースを使用している場合は、この値を BYOD に設定し、商品階層テーブルを手動で入力できます。
|
-
|
k9.ProductDim.textLanguage
|
商品階層の言語。データソースと同じ言語コード規則に従う必要があります。Cortex Framework では、この規則は規定されていません。ただし、選択した textLanguage 値の意味を理解する必要があります。
SAP を使用する場合は、値が現在の config.json 内の SAP.languages 設定のいずれかである必要があります。
この値は空にできません。
|
-
|
SAP から商品階層ディメンション データを取り込む
k9.ProductDim.dataSourceType
を SAP
に指定して SAP をデプロイした場合は、SAP Reporting ビューにデータを完全に入力した後、load_product_hierarchy_from_SAP
DAG を使用して SAP 階層を読み込むことができます。k9_reporting
Cloud Composer 接続を正しく構成します。
他のソースから商品階層ディメンション データを取り込む
選択した他のソース(Google 商品カテゴリなど)から商品階層情報を手動で取り込むこともできます。データが ProductHierarchy
テーブルのスキーマに準拠していることを確認します。
通貨換算
通貨換算では、任意のソースからソースデータを取り込むことができる抽象スキーマが提供されます。通貨換算機能を標準で提供していない他のデータソースの高度なユースケースに使用できます。
また、SAP のデプロイが準備できている場合、Cortex Framework にはサンプルの取り込み DAG も用意されています。これを有効にするには、構成ファイルで k9.deployCurrencyConversion
を true
に設定します。次のように設定します。
パラメータ
|
意味 |
デフォルト値 |
k9.CurrencyConversion.dataSourceType
|
商品階層のデータソースのタイプ。
"SAP" に設定すると、Data Foundations は SAP データソースから通貨換算レートを読み込む DAG をデプロイします。この場合、SAP デプロイメントを有効にする必要があります。
他のデータソースを使用している場合は、この値を BYOD に設定し、通貨換算テーブルを手動で入力できます。
|
-
|
k9.CurrencyConversion.rateType
|
ソースシステムで定義されているデフォルトの通貨換算レートのタイプ。
SAP を使用している場合、"M" は SAP のデフォルトの料金タイプに対応しています。
この値は空にできません。
|
-
|
SAP から通貨換算データを取り込む
k9.CurrencyConversion.dataSourceType
を SAP
に指定して SAP をデプロイした場合は、SAP レポートビューにデータを完全に入力した後、load_currency_conversion_from_SAP
DAG を使用して SAP 通貨換算レートを読み込むことができます。k9_reporting
Cloud Composer 接続を正しく構成します。
他のソースから為替レートデータを取り込む
任意の他のソース(Google ドキュメントの GOOGLEFINANCE 関数や BigQuery の一般公開データセットなど)から通貨換算情報を手動で取り込むこともできます。データが CurrencyConversion
テーブルのスキーマに準拠していることを確認します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-04 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eThis document outlines how to configure Common Dimensions within the Cortex Framework Data Foundation, which are utility views and tables that enable advanced data use cases.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the Country Dimension, via the \u003ccode\u003ek9.deployCountryDim\u003c/code\u003e setting, unifies ISO-3166 country codes with their long names.\u003c/p\u003e\n"],["\u003cp\u003eEnabling the Product Hierarchy Dimension, via the \u003ccode\u003ek9.deployProductDim\u003c/code\u003e setting, creates an abstract schema to use for any product hierarchy source, with the option to use a sample ingestion DAG for SAP data or manually populate from any source.\u003c/p\u003e\n"],["\u003cp\u003eEnabling Currency Conversion, via the \u003ccode\u003ek9.deployCurrencyConversion\u003c/code\u003e setting, provides an abstract schema for ingesting currency data, and it allows the choice of using a sample ingestion DAG for SAP data or manually ingesting from any source.\u003c/p\u003e\n"],["\u003cp\u003eFor both Product Hierarchy and Currency Conversion dimensions, if the data source type is set to SAP, an SAP deployment is required, and a specific DAG can be used to load the respective data from SAP Reporting views.\u003c/p\u003e\n"]]],[],null,["# Configure Common Dimensions\n===========================\n\nThis page describes an optional step to configure Common Dimensions for the\nCortex Framework Data Foundation deployment. Cortex Framework\nCommon Dimensions are utility views and tables created within the Data\nFoundation to enable advanced use cases across different data sources, such as\nCross Media \\& Product Connected Insights.\n\nConfiguration for all Common Dimensions are under the `k9` section of the\n[configuration file](https://github.com/GoogleCloudPlatform/cortex-data-foundation/blob/main/config/config.json).\n\nCountry Dimension\n-----------------\n\nCortex Framework Country Dimension provides a unified way of\nconnecting ISO-3166 country codes to their respective long names.\n\nTo enable it, set `k9.deployCountryDim` to `true` in the configuration file.\n\nProduct Hierarchy Dimension\n---------------------------\n\nProduct Hierarchy Dimension provides an abstract schema that allows ingesting\nthe source data from any arbitrary source. It can then be used in fueling\nadvanced use cases such as product hierarchy matching.\n\nCortex Framework also provides a sample ingestion DAG if you have\na SAP deployment ready.\n\nTo enable it, set `k9.deployProductDim` to `true` in the configuration file.\nThen configure the following settings:\n\n### Ingesting product hierarchy dimension data from SAP\n\nIf you have specified `k9.ProductDim.dataSourceType` to `SAP` and deployed\nSAP, you may use the `load_product_hierarchy_from_SAP` DAG to load SAP\nhierarchy, after you have fully populated your SAP Reporting views.\nMake sure to properly [configure](/cortex/docs/gathering-settings)\nthe `k9_reporting` Cloud Composer connection.\n\n### Ingesting product hierarchy dimension data from other sources\n\nYou may also manually ingest product hierarchy information from other sources\nof your choosing (for example, [Google product category](https://support.google.com/merchants/answer/6324436?hl)). Make sure the data conforms to the schema of `ProductHierarchy` table.\n\nCurrency Conversion\n-------------------\n\nCurrency Conversion provides an abstract schema that allows ingesting the\nsource data from any arbitrary source. It can then be used in fueling advanced\nuse cases for other data sources that don't provide currency conversion\ncapability out-of-the-box.\n\nCortex Framework also provides a sample ingestion DAG if you\nhave a SAP deployment ready. To enable it, set `k9.deployCurrencyConversion` to\n`true` in the configuration file. Then configure the following settings:\n\n### Ingesting currency conversion data from SAP\n\nIf you have specified `k9.CurrencyConversion.dataSourceType` to `SAP` and\ndeployed SAP, you may use the `load_currency_conversion_from_SAP` DAG to\nload SAP currency conversion rates, after you have fully populated your SAP\nReporting views. Make sure to properly [configure](/cortex/docs/gathering-settings)\nthe `k9_reporting` Cloud Composer connection.\n\n### Ingesting currency conversion data from other sources\n\nYou may also manually ingest currency conversion information from other sources\nof your choosing (for example, using\n[GOOGLEFINANCE function in Google Docs](https://support.google.com/docs/answer/3093281?hl),\nor [BigQuery public datasets](https://cloud.google.com/bigquery/public-data)).\nMake sure the data conforms to the schema of `CurrencyConversion` table."]]