使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页介绍了为 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 将部署一个 DAG,用于从 SAP 数据源加载商品层次结构。如果是这种情况,则必须启用 SAP 部署。
如果您使用的是其他数据源,请将此值设为 BYOD ,然后您可以手动填充商品层次结构表。
|
-
|
k9.ProductDim.textLanguage
|
商品层次结构的语言。应遵循与数据源相同的语言代码惯例。Cortex Framework 未规定此惯例。不过,客户应了解所选 textLanguage 值的含义。
如果使用 SAP,该值还必须是当前 config.json 中的 SAP.languages 设置之一。
此值不能为空。
|
-
|
从 SAP 提取产品层次结构维度数据
如果您已将 k9.ProductDim.dataSourceType
指定为 SAP
并部署了 SAP,则可以在完全填充 SAP 报告视图后,使用 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 将部署一个 DAG,用于从 SAP 数据源加载汇率。如果是这种情况,则必须启用 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 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-04。
[[["易于理解","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 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."]]