Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Consigli per l'upgrade
Questa pagina descrive i consigli per eseguire l'upgrade alle nuove versioni da Cortex Framework Data Foundation personalizzato.
A ogni release, il team di Cortex si impegna a ridurre al minimo le interruzioni durante l'aggiunta di nuove funzionalità a Cortex Framework. I nuovi aggiornamenti danno la priorità alla compatibilità con le versioni precedenti. Tuttavia, questa guida ti aiuta a ridurre al minimo i possibili problemi.
Cortex Framework Data Foundation fornisce un insieme di contenuti e modelli predefiniti per accelerare il valore dei dati replicati in BigQuery.
Le organizzazioni adattano questi modelli, moduli, script SQL, Python, pipeline
e altri contenuti forniti in base alle proprie esigenze.
Componenti principali
I contenuti di Cortex Data Foundation sono progettati in base al principio di apertura.
Le organizzazioni possono utilizzare gli strumenti più adatti alle loro esigenze quando lavorano con i modelli di dati BigQuery forniti. L'unica piattaforma su cui la Fondazione ha una dipendenza stretta è BigQuery. Tutti gli altri strumenti possono essere scambiati in base alle esigenze:
- Integrazione dei dati:qualsiasi strumento di integrazione che abbia interconnettività con BigQuery può essere utilizzato a condizione che possa replicare strutture e tabelle non elaborate. Ad esempio, le tabelle non elaborate devono avere lo stesso schema di quelle create in SAP (stessa denominazione, campi e tipi di dati). Inoltre, lo strumento di integrazione deve essere in grado di fornire servizi di trasformazione di base come l'aggiornamento dei tipi di dati di destinazione per la compatibilità con BigQuery, nonché l'aggiunta di campi aggiuntivi come timestamp o indicatore di operazioni per evidenziare i record nuovi e modificati.
- Elaborazione dei dati: gli script di elaborazione di Change Data Capture (CDC)
forniscono il lavoro con Cloud Composer
(o Apache Airflow) sono facoltativi. Al contrario,
ove possibile,
le istruzioni SQL vengono prodotte separatamente dai file specifici di Airflow, in modo che i clienti possano utilizzare i file SQL separati in
un altro strumento, se necessario.
- Visualizzazione dei dati: anche se sono forniti modelli di dashboard di Looker che contengono visualizzazioni e logica minima, la logica di base rimane disponibile nella base dati di BigQuery per impostazione predefinita per creare visualizzazioni con lo strumento di generazione di report preferito.
Vantaggi principali
Cortex Framework Data Foundation è progettato per essere adattabile alle varie esigenze aziendali. I suoi componenti sono progettati per essere flessibili,
consentendo alle organizzazioni di personalizzare la piattaforma in base alle loro esigenze specifiche e di ottenere i seguenti vantaggi:
- Apertura: si integra perfettamente con vari strumenti di integrazione, elaborazione e visualizzazione dei dati oltre a BigQuery.
- Personalizzazione:le organizzazioni possono modificare ed espandere i componenti predefiniti come le visualizzazioni SQL in base ai propri modelli di dati e alla propria logica aziendale.
- Ottimizzazione delle prestazioni: tecniche come la partizione, i controlli della qualità dei dati e il clustering possono essere regolate in base ai singoli carichi di lavoro e ai volumi di dati.
- Compatibilità con le versioni precedenti: Cortex si impegna a mantenere la compatibilità con le versioni precedenti nelle release future, riducendo al minimo le interruzioni delle implementazioni esistenti. Per informazioni sulle modifiche alle versioni, consulta le note di rilascio.
- Contributo della community:incoraggia la condivisione delle conoscenze e la collaborazione tra gli utenti.
Aggiornamento processo
Le sezioni seguenti descrivono un modo in cui gli sviluppatori possono mantenere aggiornato il proprio codice con il repository Data Foundation di Cortex Framework mantenendo le proprie personalizzazioni. Utilizzo degli script di deployment pre-caricati nelle
pipeline CI/CD. Tuttavia, le organizzazioni possono utilizzare strumenti e metodi alternativi in base alle proprie preferenze, come Dataform o gli strumenti di automazione forniti dai diversi host Git, come GitHub Actions.
Configura il tuo repository
Questa sezione illustra un approccio alla configurazione del repository. Prima di seguire
questi passaggi, ti consigliamo di avere una buona conoscenza di Git.
Esegui il fork del repository principale:
crea un fork del repository Data
Foundation di Cortex Framework. Il fork mantiene il repository in cui vengono ricevuti gli aggiornamenti dal repository Google Cloud e un repository separato per il codice principale dell'azienda.
Crea repository dell'azienda: stabilisci un nuovo host Git per il repository della tua azienda (ad esempio Cloud Source). Crea un repository con gli stessi nomi del repository sottoposto a fork sul nuovo host.
Inizializza il repository dell'azienda: copia il codice dal repository sottoposto a forking nel repository dell'azienda appena creato. Aggiungi il repository sottoposto a forking originale come
repository remoto upstream con il seguente comando
e verifica che il repository remoto sia stato aggiunto. In questo modo viene stabilita una connessione tra il repository della tua azienda e il repository originale.
git remote add google <<remote URL>>
git remote -v
git push --all google
Verifica la configurazione del repository: assicurati che il repository della tua azienda contenga il codice e la cronologia clonati. Dovresti vedere i due telecomandi,
origin e quello che hai aggiunto dopo aver utilizzato il comando:
git remote -v:
Ora hai il repository, il repository dell'azienda, dove gli sviluppatori possono inviare le loro modifiche. Ora gli sviluppatori possono clonare e lavorare nei branch del nuovo repository.
Unisci le modifiche con una nuova release di Cortex
Questa sezione descrive la procedura di unione delle modifiche provenienti dal repository dell'azienda
e da quello Google Cloud .
Aggiorna i fork: fai clic su Sincronizza fork per aggiornare i fork del tuo repository con le modifiche apportate al repository. Google Cloud Ad esempio,
vengono apportate le seguenti modifiche al repository dell'azienda. Inoltre, sono state apportate altre modifiche al repository Data Foundation da Google Cloud in una nuova release.
- È stata creata e incorporata l'utilizzo di una nuova vista in SQL
- Visualizzazioni esistenti modificate
- Abbiamo sostituito completamente uno script con la nostra logica
La seguente sequenza di comandi aggiunge il repository del fork come
un repository remoto upstream da cui estrarre la release aggiornata come GitHub
e ne esegue il check-out del ramo principale come GitHub-main. Poi, questo esempio esegue il check-out del ramo principale dal repository dell'azienda in Google Cloud Origine
e crea un ramo per l'unione denominato 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
Esistono diversi modi per creare questo flusso. La procedura di unione potrebbe anche avvenire nel fork su GitHub, essere sostituita da un rebase anziché da un'unione e il ramo di unione potrebbe anche essere inviato come richiesta di unione. Queste variazioni della procedura dipendono dai criteri organizzativi attuali, dall'entità delle modifiche e dalla praticità.
Con questa configurazione, puoi confrontare le modifiche in arrivo con le modifiche locali. Ti consigliamo di utilizzare uno strumento in un'IDE grafica di tua scelta per vedere le modifiche e scegliere cosa unire. Ad esempio Visual Studio.
Per semplificare la procedura di confronto, ti consigliamo di segnalare le personalizzazioni utilizzando commenti che risaltano visivamente.
Avvia la procedura di unione: utilizza il ramo creato (in questo esempio, il ramo chiamato merging_br
) per unire tutte le modifiche e ignorare i file. Quando è tutto pronto, puoi unire nuovamente questo ramo al ramo principale o a un altro ramo del repository della tua azienda per creare una richiesta di unione. Dal ramo di unione che è stato estratto dal ramo principale del repository della tua azienda (git checkout merging_br
), unisci le modifiche in arrivo dal fork remoto.
## 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`
Questo comando genera un elenco di conflitti. Utilizza il confronto grafico dell'IDE per comprendere le modifiche e scegliere tra attuale, in entrata e entrambi.
È qui che diventa utile inserire un commento nel codice relativo alle personalizzazioni.
Scegli di ignorare del tutto le modifiche, di eliminare i file che non vuoi
e di ignorare le modifiche apportate a visualizzazioni o script che hai già personalizzato.
Unisci modifiche: dopo aver deciso le modifiche da applicare, controlla il riepilogo e esegui il commit con il comando:
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"
Se hai dubbi su un passaggio, consulta Annullamento di operazioni di base in Git.
Test e deployment: finora hai eseguito l'unione solo in un ramo "temporaneo".
A questo punto, ti consigliamo di eseguire un deployment di prova dagli script cloudbuild\*.yaml
per assicurarti che tutto funzioni come previsto. I test automatici possono contribuire a semplificare questa procedura. Una volta che il ramo di unione è corretto,
puoi eseguire il checkout del ramo di destinazione principale e unire il ramo merging_br
.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-09-10 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]