バージョン 7.1 にアップグレードする
このガイドでは、既存の Google Cloud Cortex Framework バージョン 7.0.x のデプロイをバージョン 7.1.0 にアップグレードする際に必要なバージョン固有の変更と対応が必要な移行アクションについて説明します。Cortex Framework をアップグレードするの標準ワークフローに沿って、次の手順を行います。/upgrade-cortex エージェント スキルを実行して、構成ファイルを自動的に検査して更新することもできます。
Python は 3.13(>=3.13,<3.14)のままです。バージョン 8.0 で削除が予定されている非推奨の項目については、Cortex Framework の非推奨をご覧ください。
次の表を使用して、デプロイに該当するセクションに切り替えます。
| デプロイで使用しているもの | 確認 |
|---|---|
| バージョン 7.0.x のセットアップ | 構成と CLI の変更 |
| SAP ERP データ プロダクト | SAP 列の互換性を破る変更と完全更新、動作の変更と孤立したオブジェクト |
カスタム tableSettings オーバーライド |
カスタム table_settings.yaml の更新 |
| カスタム モジュールまたは Python ビルダー | カスタム データ プロダクトと Python ビルダーを移行する |
構成と CLI の変更
これらの更新は、ビルド前のステップ 2: 構成、カスタム設定、拡張機能を更新するで適用します。
名前空間の検出
- 組み込みの名前空間: 組み込みの
data.namespacesエントリ(cortex、cortex_samples、cortex_v6_compatibility)ではpathを省略します(例:- name: cortex)。 - 許可リストの動作:
data.namespacesが設定されている場合、厳格な許可リストになりました(namespaces: []はゼロの名前空間を有効にし、namespaces: nullは検証に失敗します)。有効なモジュールが参照するすべての組み込み名前空間とローカル カスタム名前空間を一覧表示します。または、data.namespacesを省略して、インストールされているパッケージのみを自動検出します。
データ品質アサーション
- デフォルトで有効(
data.assertionsEnabled: true): Google Cloudプロジェクトを共有する場合は、デプロイごとに一意のdata.defaultAssertionDatasetを設定します(そうしないと、デフォルトのdataform_assertionsデータセットがデプロイ間で競合する可能性があります)。また、CI / CD で--create-datasetsをuv run cortex-deployに渡します。オプトアウトするには、data.assertionsEnabled: falseを設定します。 - 重大度タグ:
data.assertionSeveritiesとdata.defaultAssertionSeverityを一緒に構成するか、両方を省略します。
ターゲットとカタログの設定
- 削除された
type: genericターゲット:type: genericエントリを削除するか、type: gitに置き換えます(type: gitには、targetSettings.authorEmail、グローバルgit config user.email、またはGIT_AUTHOR_EMAILとGIT_COMMITTER_EMAILの両方を使用した commit メールが必要です)。 - セグメント全体の
ignoredPaths一致:type: dataformターゲットで、targetSettings.ignoredPaths(デフォルトは["definitions/custom"])が接頭辞ではなくパスセグメント全体に一致するようになりました。管理対象外のファイルをdefinitions/custom/に移動するか、definitions/custom_*などのパスをignoredPathsに追加して、uv run cortex-deployが削除しないようにします。 - カタログ
tableSettings許可リスト: 必要なすべてのソーステーブルがリストされるように、カタログtableSettingsファイル (tables:/variants:)を更新します。
CLI の変更
| バージョン 7.0.x | バージョン 7.1 |
|---|---|
uv run cortex-build --create-datasets |
--create-datasets(および任意で -y / --yes)を uv run cortex-deploy または uv run cortex-build-and-deploy に渡します。 |
uv run cortex-deploy --assertions |
--assertions を uv run cortex-build または uv run cortex-build-and-deploy に渡します。 |
uv run cortex-kc-sync と --data-modules-root-directory |
uv run cortex-create-kc-data-products を使用し、data.namespaces で名前空間を宣言します。 |
uv run cortex-demo(SAP のみのデフォルト、snake_case フラグ) |
デフォルトは --sources all(7.0.x スコープを維持するには --sources sap を渡します)で、ダッシュケース フラグを使用します。uv run cortex-demo をご覧ください。 |
カスタム table_settings.yaml の更新
アップグレード全体でのカスタム table_settings.yaml の動作に沿って、次のバージョン 7.1 の更新を適用します。
- データ プロダクト: コピーされたファイルを明示的なオーバーライドにトリミングします。特に、
sales_document_flowの古いmaterializationType: incrementalオーバーライド(動作の変更と孤立したオブジェクトを参照)と変更されていないdataformTags(たとえば、billing_document_headersとbilling_document_itemsがmonthlyからhourlyに変更された場合)をトリミングします。 - データ基盤: カスタム SAP 基盤ファイルとバージョン 7.1
table_settings.default.yamlの差分を比較して、追加された ECC テーブル(faglflext、glt0)とデフォルトのアサーション(makt、vbak)を保持します。 - 時間パーティショニング: 非推奨の
partitionType: DATE | DATETIME | TIMESTAMPをpartitionType: timeとdataType: DATE | DATETIME | TIMESTAMPに置き換えます。
SAP 列の変更と完全更新の互換性を破る
バージョン 7.1 では、SAP データ プロダクトの列サフィックスを正確な SAP データ ディクショナリ(DDIC)フィールド名に合わせ、23 個の増分 SAP プロダクト テーブル全体で、コア以外の SAP IS-Fashion(*_fsh_*)アドオン列を削除しています。
SAP 列の名前変更と削除のリファレンス
展開して、23 テーブルの SAP 列の名前変更と削除のマップを表示する
| データ プロダクト | テーブル | SAP バージョン | バージョン 7.0.x 列 | バージョン 7.1 の列またはステータス |
|---|---|---|---|---|
accounts_payable |
accounts_payable |
S/4HANA |
bus_transac_type_bttypecondition_contract_coco_numberinventory_movement_category_invoice_mov_categservice_document_type_service_document_typeservice_document_service_document_idservice_document_item_service_document_item_idpartner_service_document_type_pservice_document_typepartner_service_document_pservice_document_idpartner_service_document_item_pservice_document_item_idcompany_code_for_budget_account_bdgt_account_company_code
|
business_transaction_category_bttypecondition_contract_coco_numinventory_movement_category_inv_mov_categservice_document_type_service_doc_typeservice_document_service_doc_idservice_document_item_service_doc_item_idpartner_service_document_type_pservice_doc_typepartner_service_document_pservice_doc_idpartner_service_document_item_pservice_doc_item_idcompany_code_for_budget_account_bdgt_account_cocode
|
accounts_receivable |
accounts_receivable |
S/4HANA | 前の行の accounts_payable と同じ 10 列 |
前の行の accounts_payable と同じ名前が変更された 10 列 |
addresses |
addresses |
ECC、S/4HANA | flag_x400flagcomm8 |
flag_x400_flagcomm8 |
bill_of_materials |
bill_of_materials_items |
ECC、S/4HANA |
deviation_values_fsh_vmkz、quantity_distribution_profile_fsh_pgqr、quantity_distribution_profile_reference_fsh_pgqrrf、critical_component_fsh_critical_comp、critical_level_fsh_critical_level |
削除済み(IS-Fashion アドオン) |
billing_documents |
billing_document_items |
ECC、S/4HANA |
season_year_fsh_season_year、season_fsh_season、collection_fsh_collection、theme_fsh_theme |
削除済み(IS-Fashion アドオン) |
customers |
customers |
ECC、S/4HANA |
name_of_representative_j_1_kfrepretype_of_business_j_1_kftbustype_of_industry_j_1_kftind
|
name_of_representative_j_1kfrepretype_of_business_j_1kftbustype_of_industry_j_1kftind
|
delivery_documents |
delivery_document_headers |
ECC |
number_category_1_rpfaessnumber_category_2_rpkistnumber_category_3_rpcontnumber_category_4_rpsonstloading_sequence_number_rpflgnr
|
number_category_1_bev1_rpfaessnumber_category_2_bev1_rpkistnumber_category_3_bev1_rpcontnumber_category_4_bev1_rpsonstloading_sequence_number_bev1_rpflgnr
|
delivery_documents |
delivery_document_headers |
S/4HANA |
header_customer_reserve_status1_suvk01~5_suvk05item_customer_reserve_status1_suvs01~5_suvs05
|
header_customer_reserve_status1_uvk01~5_uvk05item_customer_reserve_status1_uvs01~5_uvs05
|
delivery_documents |
delivery_document_items |
ECC、S/4HANA |
cfop_code_and_extension_j_1_bcfoptax_law_icms_j_1_btaxlw1tax_law_ipi_j_1_btaxlw2iss_tax_law_j_1_btaxlw3cofins_tax_law_j_1_btaxlw4pis_tax_law_j_1_btaxlw5sd_tax_code_j_1_btxsdc
|
cfop_code_and_extension_j_1bcfoptax_law_icms_j_1btaxlw1tax_law_ipi_j_1btaxlw2iss_tax_law_j_1btaxlw3cofins_tax_law_j_1btaxlw4pis_tax_law_j_1btaxlw5sd_tax_code_j_1btxsdc
|
inventory_and_special_stocks |
sales_order_stock |
ECC |
season_year_fsh_season_year、season_fsh_season、collection_fsh_collection、theme_fsh_theme、allocated_stock_quantity_fsh_salloc_qty |
削除済み(IS-Fashion アドオン) |
inventory_and_special_stocks |
special_stocks_from_vendor |
ECC | sales_order_stock と同じ 5 つの *_fsh_* 列 |
削除済み(IS-Fashion アドオン) |
inventory_and_special_stocks |
special_stocks_with_customer |
ECC | sales_order_stock と同じ 5 つの *_fsh_* 列 |
削除済み(IS-Fashion アドオン) |
production_orders |
production_order_header |
ECC、S/4HANA | master_production_order_fsh_mprod_ord |
削除済み(IS-Fashion アドオン) |
production_orders |
production_order_item |
ECC、S/4HANA |
season_year_fsh_season_year、season_fsh_season、collection_fsh_collection、theme_fsh_theme、allocated_stock_quantity_fsh_salloc_qty |
削除済み(IS-Fashion アドオン) |
purchasing_documents |
purchasing_document_account_assignments |
S/4HANA |
service_document_type_service_document_typeservice_document_service_document_idservice_document_item_service_document_item_id
|
service_document_type_service_doc_typeservice_document_service_doc_idservice_document_item_service_doc_item_id
|
purchasing_documents |
purchasing_document_headers |
ECC、S/4HANA |
discount_days1_zbd1_t、discount_days2_zbd2_t、discount_days3_zbd3_tcash_discount_percentage1_zbd1_p、cash_discount_percentage2_zbd2_plogical_system_logsy
|
discount_days1_zbd1t、discount_days2_zbd2t、discount_days3_zbd3tcash_discount_percentage1_zbd1p、cash_discount_percentage2_zbd2plogical_system_logsys
|
purchasing_documents |
purchasing_document_items |
ECC、S/4HANA |
inflation_index_j_1_aindxpinflation_index_date_j_1_aidatep
|
inflation_index_j_1aindxpinflation_index_date_j_1aidatep
|
purchasing_documents |
purchasing_document_types |
ECC |
9 個の *_fsh_* 列: vas_active_flag_fsh_vas_act、determination_procedure_fsh_vas_kalsm、vas_deletion_criteria_fsh_vas_del、vas_determination_date_fsh_vas_detdt、excl_return_items_fsh_excl_return、determination_procedure_fsh_var_kalsm、determination_procedure_fsh_dpr_detpro、generic_material_creation_fsh_po_idoc、auto_distribution_fsh_auto_dc |
削除済み(IS-Fashion アドオン) |
purchasing_documents |
purchasing_document_types |
S/4HANA |
同じ 9 つの ECC *_fsh_* 列と vas_quantity_correlation_fsh_vas_corr、variants_optional_fsh_vm_act(合計 11) |
削除済み(IS-Fashion アドオン) |
purchasing_documents |
purchasing_document_vendor_confirmations |
ECC、S/4HANA | allocated_stock_quantity_fsh_salloc_qty |
削除済み(IS-Fashion アドオン) |
purchasing_documents |
purchasing_documents_history |
ECC、S/4HANA |
logical_system_logsy(ECC、S/4HANA)quantity_quantity_diff(S/4HANA)season_year_fsh_season_year、season_fsh_season、
collection_fsh_collection、theme_fsh_theme(ECC、S/4HANA)
|
logical_system_logsys(ECC、S/4HANA)quantity_qty_diff(S/4HANA)削除済み(IS-Fashion アドオン) |
universal_journal |
universal_journal_entry_line_items |
S/4HANA |
business_transaction_type_bttypecustom_business_transaction_type_not_used_yet_cbttypeaccount_assignment_type_accastypartner_account_assignment_type_paccasty
|
business_transaction_category_bttypebusiness_transaction_type_cbttypeobject_type_accastypartner_object_type_paccasty
|
vendor_invoices |
vendor_invoice_headers |
ECC、S/4HANA | logical_system_logsy |
logical_system_logsys(改行なしの company_code_bukrs も追加) |
vendor_invoices |
vendor_invoice_items |
ECC、S/4HANA |
season_year_fsh_season_year、season_fsh_season、
fashion_collection_fsh_collection、fashion_theme_fsh_theme
|
削除(IS-Fashion アドオン、改行なしの company_code_bukrs も追加) |
vendors |
vendors |
ECC、S/4HANA |
name_of_representative_j_1_kfrepretype_of_business_j_1_kftbustype_of_industry_j_1_kftind
|
name_of_representative_j_1kfrepretype_of_business_j_1kftbustype_of_industry_j_1kftind
|
1 回限りのフル更新用の追加テーブル
該当する場合は、次の増分テーブルで 1 回限りのターゲットを絞った完全更新(ターゲットを絞った完全更新を実行する)を実行します。
- 最初のバージョン 7.1 の増分実行(S/4HANA)の前または実行時に必要:
material_documents(cortex.sap.products.materials_movement)は 13 個のMATDOC在庫列を追加し、uniqueKeyをmaterial_document_record_typeで拡張します。 - 小数点以下 2 桁以外の通貨(
TCURXスケーリング)を転記する場合に必要:asset_annual_cumulative_balances(S/4HANA)とvendor_open_items、vendor_cleared_items、customer_open_items、customer_cleared_items(ECC)。(accounts_payable、accounts_receivable、purchasing_document_headersは、上記の 23 個のテーブルのリストにすでに含まれています)。 sales_performanceSAP ERP サンプルを有効にする場合に必要:sales_performance(cortex_samples.sap.products.sales_performance、customers後に更新)は、新しいsigned_net_value_boundsアサーションによって検証されたsigned_net_value_in_document_currencyなどの v7.1 列を追加します(販売実績の分析情報をご覧ください)。
展開して、推奨されるフル更新テーブル(結合と一意キーのクリーンアップ)を表示
これらの増分テーブルで 1 回限りのフル更新を実行して、バージョン 7.0.x の結合と null 値を許容する LEFT JOIN 一意キーの不具合による以前の重複を削除します。
- 顧客、ベンダー、住所の結合:
business_partner_addresses、business_partner_bank_details、ダウンストリームのsupplier_spend_analysis(vendorsの後に更新)。 - 強化された
uniqueKey(ECC、S/4HANA):vendor_invoice_account_assignmentsとcountries。 - 保護された null 許容の
LEFT JOIN一意キー(ECC、S/4HANA):asset_transaction_types、cost_elements、cost_centers、profit_centers、currency_codes、set_headers、depreciation_terms、fixed_assets_master、general_ledger_accounts、country_tax_regions、languages、ledger_master、material_cross_plant_batches、material_plant_batches、material_batch_stocks、material_plants、material_movement_types、flattened_product_hierarchies、project_structure、distribution_channels、divisions、sales_organizations、units_of_measurement。 - 保護された null 許容の
LEFT JOIN一意キー(ECC のみ):special_stocks_with_vendor。 - null 値を許容する
LEFT JOIN一意キーの保護(S/4HANA のみ):financial_hierarchy_nodesとgroup_journal_entries(クラスタリングも追加)。
動作の変更と孤立したオブジェクト
sales_document_flowのマテリアライズ: ECC と S/4HANA でデフォルトのmaterializationTypeがincrementalからtableに変更され、未請求の出荷が引き続き表示されるようになりました(行数が増加)。コンパイルする前に、古いmaterializationType: incrementalオーバーライドを削除します。これは、uniqueKeysのないincrementalモデルではコンパイルが失敗するためです。--full-refreshは必須です。- 孤立した S/4HANA テーブル:
materials_by_storage_locationがcortex.sap.products.materialsから ECC 専用のcortex.sap.products.inventory_and_special_stocksに移動されました。S/4HANA で、下流のコンシューマがクエリを実行していないことを確認した後、以前のPRODUCT_DATASET.materials_by_storage_locationテーブル(および、他の有効な S/4HANA プロダクトが参照していない場合は、未使用のmard、mbew、mbewh、t001l基盤テーブル)を削除します。 - 既存のデータに対するアサーション: 1 回限りの完全更新が完了するまで、アップグレード前の重複行でデフォルトのアサーションが失敗することがあります。重大度タグは
severity_LEVELを出力し、ブロック動作はルールごとに設定されます(blocking: true)。
カスタム データ プロダクトと Python ビルダーを移行する
カスタム モジュールまたは Python ビルダーを管理している場合は、ビルドする前に次の更新を適用します(詳細については、拡張性ガイドをご覧ください)。
カスタム YAML と JavaScript のデータ プロダクト
publisher.publish()/publisher.operate()を使用する:publish(...)とoperate(...)の呼び出しをconst publisher = require("includes/publisher.js");に置き換えて、ブロッキング アサーションと行 / 列レベルのセキュリティ フックが実行されるようにします。incremental.getFilter()呼び出しを更新する: 3 番目の引数として、オプション オブジェクト({ targetColumn: "..." }または{ timestampColumn: "..." })または既知のソースタイプの省略形("sap"、"sfdc"、"salesforce")を渡します。他の文字列はエラーをスローするようになりました。- アサーションを明示的に宣言する: バージョン 7.0.x の暗黙的なキーアサーションを
table_settings.default.yamlのassertions.standardRulesに置き換えます(データ品質アサーションをご覧ください)。 - 非推奨のキーとビルダー エイリアスをクリーンアップ:
manifest.yamlからtype:を、config/config.yamlからmoduleType:を削除しました。非推奨のエイリアスを置き換えます(generic_product、composite_product、generic_composite_product、sap_bdc_product→flat_product、sfdc→sfdc_foundation)。flat_productのデフォルトはincrementalです(以前のgeneric_product/composite_productのデフォルトはtableでした)。そのため、materializationTypeを明示的に設定するか、uniqueKeysを指定してください。
カスタム Python ビルダー
common.sdkからインポートする:common.builders.*、common.schemas.*、削除されたcommon.registryのインポートをcommon.sdkに置き換えます。- 具体的なサブクラスを使用する:
FlatProductBuilderまたはFoundationBuilderを直接サブクラス化し(ProductBuilder[DataProductModuleConfig]ではなく)、build()で(self, node, ctx)を受け入れます。 - プログラム ビルダーに
table_settings_schema = Noneを設定する:FlatProductBuilderをサブクラス化するビルダーは、デフォルトでtable_settingsファイルを想定しています。 ビルダーが ファイルなしで SQL を生成する場合は、table_settings_schema = Noneを設定します。 - ビルダーを再配置する: 非推奨のブループリント ローカル
./builder.pyモジュールをNAMESPACE/builders/に移動し、manifest.yamlで参照されるplugin_idを使用して、名前空間ツリー内の__init__.pyファイルを削除します。
次のステップ
- Cortex Framework をアップグレードするのエンドツーエンドのチェックリストに沿って操作します。
- バージョン 8.0 で削除が予定されている項目については、Cortex Framework の非推奨をご覧ください。
- データ品質アサーションを確認して、ブロッキング ルールと重大度タグをカスタマイズします。