This article describes how to migrate Data Services data from Solr to Pinot/SQL and how to migrate Track dictionary data from the Solr Dictionary collection to the Track SQL database.
Data migration is optional and should only be performed if existing data must be preserved and migrated to the new environment.
Data Service Data Migration
Exporting Data
Use Query Browser from Data Services 11.x to export the required data.
Export Administrative Objects
Perform this step only if you are not using the default Organization, Repository, and Access Tokens.
- Export the Organization:
- In the item list, right-click Organization.
- Then select Export.
- Export the Repository:
- In the item list, right-click Repository.
- Then select Export.
- Export the AccessToken:
- In the item list, right-click AccessToken.
- Then select Export.
Export Actions
- Select File > Backup Repository > Absolute Dates....
- Clear Include all repo items.
- Select Include repository, organization, IDs.
- Select Action from the second group of items.
- Complete the export.
Export Repository Data
- Select File > Backup Repository > Absolute Dates...
- Clear Include all repo items.
- Select Include repository, organization, IDs.
- Select the following item types:
- Activity
- Dataset
- Event
- Relative
- Resource
- Set
- Snapshot
- Source
- View
- Complete the export.
If you plan to restream data, simply select Set and View.
To export additional repositories, switch to the desired repository and repeat the repository export procedure.
Export Considerations
- Deprecated items may be included in the export.
- During import into Data Services 12.x, deprecated items are identified, logged, and skipped automatically.
- Dashboard, Viewlet, and Settings information previously stored in the Dictionary table is now stored in a dedicated Track SQL schema and must be migrated separately using the Track Data Migration procedure.
Importing Data
Before starting Query Browser, ensure that Zookeeper, Kafka, Pinot, and the Domain Server are running, as Query Browser requires the Domain Server for authentication and Kafka for writing data to Pinot.
- Start Query Browser.
- Log in as Administrator.
- Import the exported administrative objects in the following order:
- Organization
- Repository
- AccessToken
- Import the remaining repository data exports.
- Verify that the imported data is accessible and functioning as expected.
Track UI Data Migration
Dictionary data, including Dashboards, Viewlets, Settings, and related configuration, must be migrated from the Data Services (Solr) Dictionary collection to the Track SQL database.
Exporting Dictionary Data
Before exporting dictionary data, ensure that all Dashboards and Viewlets are saved.
- Log in to Query Browser as Administrator.
- Execute the following query:
Get Dictionaries fields all
- Select Results > Export.
- Save the file as dictionaries.csv.
Converting Dictionary Data
Use the track-migration.jar utility to convert the exported CSV file into SQL migration scripts.
Run the following command:
java -jar track-migration.jar -f dictionaries.csv --dialect postgres
The utility generates SQL scripts required to recreate the dictionary data in the Track database.
Generated SQL Scripts
| Script Name | Description |
|---|---|
dictionaries_migration_defaults_<db>.sql | Contains default settings migration statements. In most environments, these settings already match the Track 12.1 defaults, and no INSERT statements are generated. |
dictionaries_migration_settings_<db>.sql | Contains Track and user settings to be migrated. |
dictionaries_migration_<repoName_orgName>_<db>.sql | Contains dashboards, viewlets, and related content for a specific repository. One file is generated per repository. |
Do not import scripts generated for the Global or Sample repositories.
Generated Review Files
| File Name | Description |
|---|---|
dictionaries_migration_ignored_<db>.csv | Contains records that are not used by Track or are no longer supported, such as ML configuration and Branding entries. |
dictionaries_migration_temp_<db>.csv | Contains temporary dashboard changes that were not saved before migration. |
dictionaries_migration_unknown_<db>.csv | Contains invalid or unrecognized records, typically originating from older product versions. |
Importing Dictionary Data
Import the generated SQL scripts into the Track database using the jdbcmk utility.
Configure the Database Connection
DB_URL="jdbc:postgresql://localhost:5432/meshiq-db?user=${DB_USERNAME}&password=${DB_PASSWORD}¤tSchema=meshiq_track"Import Settings
java -cp "lib/*" com.nastel.jdbcmk \ -runsql "$DB_URL" \ dictionaries_migration_settings_postgres.sql \ org.postgresql.Driver
Import Repository Data
java -cp "lib/*" com.nastel.jdbcmk \ -runsql "$DB_URL" \ dictionaries_migration_DefaultRepo_meshIQ_postgres.sql \ org.postgresql.Driver
Repeat the repository import step for each repository migration file that must be migrated.
Verification
- Log in to Track.
- Verify that dashboards are available.
- Verify that viewlets are present and functioning correctly.
- Verify that settings have been migrated successfully.
- Review the import logs for warnings or errors.