コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
アップグレードの推奨事項
このページでは、カスタマイズされた Cortex Framework Data Foundation から新しいバージョンにアップグレードするための推奨事項について説明します。Cortex チームは、リリースごとに Cortex Framework に新機能を追加しながら、中断を最小限に抑えることに取り組んでいます。新しいアップデートでは、下位互換性が優先されます。ただし、このガイドでは、発生する可能性のある問題を最小限に抑える方法を説明します。
Cortex Framework Data Foundation には、BigQuery に複製されたデータから価値を引き出すための事前定義されたコンテンツとテンプレートのセットが用意されています。組織は、提供されているテンプレート、モジュール、SQL、Python スクリプト、パイプラインなどのコンテンツをニーズに合わせて調整します。
コア コンポーネント
Cortex Framework Data Foundation のコンテンツは、オープン性という原則を念頭に置いて設計されています。組織は、提供された BigQuery データモデルを操作する際に、最適なツールを使用できます。基盤が緊密に依存している唯一のプラットフォームは BigQuery です。他のすべてのツールは、必要に応じて交換できます。
- データ インテグレーション: 元のテーブルと構造を複製できる限り、BigQuery との相互接続性があるインテグレーション ツールを活用できます。たとえば、元のテーブルは、SAP で作成されたものと同じスキーマ(同じ名前、フィールド、データ型)に似ている必要があります。さらに、統合ツールは、BigQuery との互換性を確保するためにターゲット データ型を更新するなどの基本的な変換サービスや、新規レコードと変更レコードをハイライト表示するためのタイムスタンプやオペレーション フラグなどの追加フィールドを追加するなどの基本的な変換サービスを提供できる必要があります。
- データ処理: 変更データ キャプチャ(CDC)処理スクリプトは、Cloud Composer(または Apache Airflow)で作業を提供します(省略可)。逆に、SQL ステートメントは可能な限り Airflow 固有のファイルとは別に生成されるため、必要に応じて別のツールで個別の SQL ファイルを使用できます。
- データ可視化: Looker ダッシュボード テンプレートが提供されており、可視化と最小限のロジックが含まれていますが、コアロジックは、任意のレポートツールで可視化を作成できるように、設計上 BigQuery 内のデータ基盤で引き続き使用できます。
主なメリット
Cortex Framework Data Foundation は、さまざまなビジネスニーズに適応するように設計されています。コンポーネントは柔軟に構築されているため、組織はプラットフォームを特定の要件に合わせて調整し、次のようなメリットを得ることができます。
- オープン性: BigQuery 以外のさまざまなデータ統合、処理、可視化ツールとシームレスに統合できます。
- カスタマイズ: 組織は、データモデルとビジネス ロジックに合わせて、SQL ビューなどの事前構築済みコンポーネントを変更して拡張できます。
- パフォーマンスの最適化: パーティショニング、データ品質チェック、クラスタリングなどの手法は、個々のワークロードとデータ量に基づいて調整できます。
- 下位互換性: Cortex は、今後のリリースで下位互換性を維持し、既存の実装の中断を最小限に抑えることを目指しています。バージョンの変更については、リリースノートをご覧ください。
- コミュニティへの貢献: ユーザー間の知識共有とコラボレーションを促進します。
プロセスの更新
以降のセクションでは、デベロッパーがカスタマイズを維持しながら、Cortex Framework Data Foundation リポジトリでコードを最新の状態に保つ方法について説明します。CI/CD パイプラインで事前提供されたデプロイ スクリプトを使用する。ただし、組織は、Dataform や、さまざまな Git ホストから提供される自動化ツール(GitHub Actions など)など、好みに応じて代替のツールと方法論を採用できます。
リポジトリを設定する
このセクションでは、リポジトリを設定する 1 つの方法について概説します。これらの手順を行う前に、Git を十分に理解しておくことをおすすめします。
コア リポジトリをフォークする: Cortex Framework Data Foundation リポジトリのフォークを作成します。フォークにより、そのリポジトリは Google Cloud リポジトリから更新を受け取り、会社のメイン用に別のリポジトリを保持します。
会社のリポジトリを作成する: 会社のリポジトリ用に新しい Git ホスト(Cloud Source など)を設定します。新しいホストに、フォークしたリポジトリと同じ名前のリポジトリを作成します。
会社リポジトリを初期化する: フォークしたリポジトリから、新しく作成した会社リポジトリにコードをコピーします。次のコマンドを使用して、元のフォークされたリポジトリをアップストリーム リモート リポジトリとして追加し、リモート リポジトリが追加されたことを確認します。これにより、会社のリポジトリと元のリポジトリ間の接続が確立されます。
git remote add google <<remote URL>>
git remote -v
git push --all google
リポジトリの設定を確認する: クローンを作成したコードと履歴が会社のリポジトリに含まれていることを確認します。このコマンドを使用すると、2 つのリモート(origin と追加したリモート)が表示されます。
git remote -v:
これで、デベロッパーが変更を送信できるリポジトリ(会社のリポジトリ)が作成されました。デベロッパーは、新しいリポジトリのブランチをクローン化して作業できるようになりました。
変更を新しい Cortex リリースと統合する
このセクションでは、会社のリポジトリからの変更と Google Cloud リポジトリからの変更を統合するプロセスについて説明します。
フォークを更新する: [フォークを同期] をクリックして、リポジトリのフォークをリポジトリの変更で更新します。 Google Cloud たとえば、会社のリポジトリに対して次の変更が行われます。また、新しいリリースでは、 Google Cloud による Data Foundation リポジトリにもいくつかの変更が加えられています。
- SQL で新しいビューの使用を作成して組み込んだ
- 既存のビューを変更した
- スクリプトを独自のロジックで完全に置き換えました
次のコマンド シーケンスは、フォーク リポジトリをアップストリーム リモート リポジトリとして追加して、更新されたリリースを GitHub から pull し、そのメインブランチを GitHub-main としてチェックアウトします。この例では、 Google Cloud Source の会社のリポジトリからメインブランチをチェックアウトし、merging_br
という結合用のブランチを作成します。
git remote add github <<github fork>>
git fetch github main
git checkout -b github-main github/main
git checkout main
git checkout -b merging_br
このフローを構築する方法は複数あります。マージ プロセスは GitHub のフォークで行うことも、マージではなくリベースに置き換えることもできます。また、マージ ブランチをマージ リクエストとして送信することもできます。プロセスのこれらのバリエーションは、現在の組織のポリシー、変更の深さ、利便性によって異なります。
この設定により、受信した変更をローカルの変更と比較できます。任意のグラフィック IDE のツールを使用して変更を確認し、マージする内容を選択することをおすすめします。(例: Visual Studio)。
差分プロセスを容易にするために、視覚的に目立つコメントを使用してカスタマイズにフラグを立てることをおすすめします。
マージ プロセスを開始する: 作成したブランチ(この例では merging_br
というブランチ)を使用して、すべての変更を統合し、ファイルを破棄します。準備ができたら、このブランチを会社のリポジトリのメインブランチまたは別のブランチに統合して、マージ リクエストを作成できます。会社のリポジトリのメイン(git checkout merging_br
)からチェックアウトしたマージ ブランチから、リモート フォークからの変更をマージします。
## git branch -a
## The command shows github-main which was created from the GitHub fork
## You are in merging_br
git merge github-main
## If you don't want a list of the commits coming from GitHub in your history, use `--squash`
このコマンドは、競合のリストを生成します。グラフィカルな IDE 比較を使用して変更を把握し、[現在の]、[受信]、[両方] のいずれかを選択します。カスタマイズに関するコメントをコードに記述しておくと便利です。変更をすべて破棄する、統合しないファイルをすべて削除する、すでにカスタマイズしたビューやスクリプトに対する変更を無視するなどの選択ができます。
変更を統合する: 適用する変更を決定したら、概要を確認し、次のコマンドで commit します。
git status
## If something doesn't look right, you can use git rm or git restore accordingly
git add --all #Or . or individual files
git commit -m "Your commit message"
どの手順でも不安がある場合は、Git の基本的な取り消しをご覧ください。
テストとデプロイ: これまでは、「一時的な」ブランチにのみマージしていました。この時点で cloudbuild\*.yaml
スクリプトからテスト デプロイを実行して、すべてが想定どおりに実行されていることを確認することをおすすめします。自動テストを使用すると、このプロセスを効率化できます。このマージ ブランチが問題ないと判断したら、メインのターゲット ブランチをチェックアウトし、merging_br
ブランチをそのブランチにマージします。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-09-10 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-10 UTC。"],[[["\u003cp\u003eThis guide provides instructions for upgrading to new versions of the Cortex Framework Data Foundation while maintaining customizations made to fit organizational needs.\u003c/p\u003e\n"],["\u003cp\u003eCortex Framework Data Foundation is designed with openness and customization in mind, allowing organizations to utilize a variety of data integration, processing, and visualization tools alongside BigQuery.\u003c/p\u003e\n"],["\u003cp\u003eThe core components of Cortex Framework Data Foundation offer flexibility, enabling organizations to interchange tools, customize SQL views, and adjust performance optimization techniques to align with their specific needs.\u003c/p\u003e\n"],["\u003cp\u003eThe upgrade process involves forking the core repository, setting up a company repository, merging changes from the new Cortex release, and strategically addressing conflicts to retain customizations, and can be done with multiple variations.\u003c/p\u003e\n"],["\u003cp\u003eThe recommended process includes thorough testing and deployment of merged changes to ensure compatibility and proper functionality within the company's customized environment, before merging it into the main branch.\u003c/p\u003e\n"]]],[],null,["# Upgrade recommendations\n=======================\n\nThis page describes recommendations to upgrade to new versions from customized\n[Cortex Framework Data Foundation](https://github.com/GoogleCloudPlatform/cortex-data-foundation).\nOn every release, the Cortex team commits to minimize disruptions while it add\nnew features to the Cortex Framework. New updates prioritize backward\ncompatibility. However, this guide helps you minimize the possible issues.\n\n[Cortex Framework Data Foundation](https://github.com/GoogleCloudPlatform/cortex-data-foundation)\nprovides a set of predefined content and templates to accelerate value from\ndata replicated into [BigQuery](https://cloud.google.com/bigquery).\nOrganizations adapt these templates, modules, SQL, Python scripts, pipelines\nand other content provided to fit their needs.\n\nCore components\n---------------\n\nCortex Framework Data Foundation content is designed with a principle of openness in mind.\nOrganizations can use the tools that work best for them when working with\nthe BigQuery data models provided. The only platform on which\nthe foundation has a tight dependency on is BigQuery. All\nother tools can be interchanged as required:\n\n- **Data Integration:** Any integration tool that has interconnectivity with BigQuery can be leveraged provided it can replicate raw tables and structures. For example, raw tables should resemble the same schema as they were created in SAP (same names, fields, and data types). In addition, the integration tool should be able to provide basic transformation services such as updating target data types for BigQuery compatibility as well as adding additional fields like timestamp or operations flag for highlighting new and changed records.\n- **Data Processing:** The Change Data Capture (CDC) processing scripts provide work with [Cloud Composer](https://cloud.google.com/composer) (or Apache Airflow) are optional. Conversely, the SQL statements are produced separately from the Airflow-specific files where possible, so that customers can make use of the separate SQL files in another tool as needed.\n- **Data Visualization:** While [Looker](https://cloud.google.com/looker) dashboarding templates are provided and contain visualizations and minimum logic, the core logic remains available in the data foundation within BigQuery by design to create visualizations with their reporting tool of choice.\n\nKey benefits\n------------\n\nCortex Framework Data Foundation is designed to be adaptable to\nvarious business needs. Its components are built with flexibility,\nallowing organizations to tailor the platform to their specific\nrequirements and getting the following benefits:\n\n- **Openness**: Integrates seamlessly with various data integration, processing, and visualization tools beyond BigQuery.\n- **Customization:** Organizations can modify and expand pre built components like SQL views to match their data models and business logic.\n- **Performance Optimization:** Techniques like partitioning, data quality checks, and clustering can be adjusted based on individual workloads and data volumes.\n- **Backward Compatibility:** Cortex strives to maintain backward compatibility in future releases, minimizing disruption to existing implementations. For information about version changes, see the [Release Notes](/cortex/docs/release-notes).\n- **Community Contribution:** Encourages knowledge sharing and collaboration among users.\n\nUpdate process\n--------------\n\nThe following sections share the instructions for one way in which developers\ncan keep their code up-to-date with the Cortex Framework Data Foundation repository while\nretaining their customizations. Use of the pre-delivered deployment scripts in\nCI/CD pipelines. However, organizations can employ alternative tools and\nmethodologies to suit their preferences, such as [Dataform](/dataform/docs),\nor automation tools provided by the different Git hosts, such as GitHub actions.\n\n### Set up your repository\n\nThis section outlines one approach to setting up your repository. Before following\nthese steps, a solid understanding of Git is recommended.\n\n1. **[Fork](https://github.com/GoogleCloudPlatform/cortex-data-foundation/fork) core repository** :\n Create a fork of the Cortex Framework Data\n Foundation repository. The fork keeps\n that repository receiving updates from the Google Cloud repository, and a\n separate repository for the *Company's main*.\n\n2. **Create Company Repository**: Establish a new Git host for your\n company's repository (for example, Cloud Source). Create a repository with the same\n names as your forked repository on the new host.\n\n3. **Initialize Company Repository** : Copy the code from your forked Repository\n into the newly created company repository. Add the original forked repository as an\n [upstream remote repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) with the following command,\n and verify the remote has been added. This establishes a connection between\n your company repository and the original repository.\n\n git remote add google \u003c\u003cremote URL\u003e\u003e\n git remote -v\n git push --all google\n\n4. **Verify Repository Setup**: Ensure your company repository contains the\n cloned code and history. You should see the two remotes,\n origin and the one you added after using the command:\n\n git remote -v:\n\n You now have the repository, the *Company's repository*, where\n developers can submit their changes. Developers can now clone and work in\n branches in the new repository.\n\n### Merge your changes with a new Cortex release\n\nThis section describes the process of merging changes from the *Company's repository*\nand changes coming from the Google Cloud repository.\n\n1. **Update forks** : Click **Sync fork** to update your forks for your\n repository with the changes from the Google Cloud repository. For example,\n the following changes to the *Company's repository* are done. And there has\n been some other changes in the Data Foundation repository by Google Cloud in a\n new release.\n\n - Created and incorporated the use of a new view in SQL\n - Modified existing views\n - Replaced a script entirely with our own logic\n\n The following commands sequence adds the fork repository as\n an upstream remote repository to pull the updated release from as *GitHub*\n and checks out its main branch as *GitHub-main.* Then, this example checks\n out the main branch from the *Company's repository* in Google Cloud Source\n and creates a branch for merging called `merging_br`. \n\n git remote add github \u003c\u003cgithub fork\u003e\u003e\n git fetch github main\n git checkout -b github-main github/main\n git checkout main\n git checkout -b merging_br\n\n There are multiple ways to build this flow. The merging process could also\n happen in the fork in GitHub, be replaced by a rebase instead of a merge,\n and the merging branch could also be sent as a merge request. These variations\n of the process depend on current organizational policies, depth of changes\n and convenience.\n\n With this setup in place, you can compare the incoming changes to your local\n changes. It's recommended to use a tool in a graphic IDE of choice to see the\n changes and choose what gets merged. For example, Visual Studio.\n\n It's recommended flagging customizations using comments that stand out\n visually, to make the diff process easier.\n2. **Start the merge process** : Use the created branch (in this example, is\n the branch called `merging_br`) to converge all changes\n and discard files. When ready, you can merge this branch back into the main or\n another branch for your Company's repository to create a merge request. From\n that merging branch that was checked out from your Company's repository's main\n (`git checkout merging_br`), merge the incoming changes from the remote fork.\n\n ## git branch -a\n ## The command shows github-main which was created from the GitHub fork\n ## You are in merging_br\n\n git merge github-main\n\n ## If you don't want a list of the commits coming from GitHub in your history, use `--squash`\n\n This command generates a list of conflicts. Use the graphical IDE comparison\n to understand the changes and choose between *current* , *incoming* and *both*.\n This is where having a comment in the code around customizations becomes handy.\n Choose to discard changes altogether, delete files that you don't want to\n merge at all and ignore changes to views or scripts that you have already customized.\n3. **Merge changes**: After you have decided on the changes to apply, check the\n summary and commit them with the command:\n\n git status\n ## If something doesn't look right, you can use git rm or git restore accordingly\n git add --all #Or . or individual files\n git commit -m \"Your commit message\"\n\n If you feel insecure about any step, see [Git basic undoing things](https://git-scm.com/book/en/v2/Git-Basics-Undoing-Things).\n4. **Test and deploy** : So far you are only merging into a \"temporary\" branch.\n It's recommended running a test deployment from the `cloudbuild\\*.yaml` scripts\n at this point to make sure everything is executing as expected. Automated\n testing can help streamline this process. Once this merging branch looks good,\n you can checkout your main target branch and merge the `merging_br` branch into it."]]