How To
Summary
The current migration configuration guideline specifies users to disable the events for activity lineage during the execution of migration. This document provides a script and guidelines on how to run the script to resynchronize events for activities after migration.
Environment
Use Java 15+ version to run the script.
Steps
The provided steps guide the customers on how to run the script and sh file to perform the resynchronization of events for activities. It is optional for users to run this script and depends on whether the user needs activities or not.
Once the script and sh file is executed successfully, the users can view the events for each asset in the activities panel.
Supported scenarios for the script:
1. User can pass a catalog ID. The script runs for the assets in the specified catalog.
2. User can pass a project ID. The script runs for the assets in the specified project.
3. User can pass `all` as project ID. The script runs for the assets in all of the projects on that environment.
1. User can pass a catalog ID. The script runs for the assets in the specified catalog.
2. User can pass a project ID. The script runs for the assets in the specified project.
3. User can pass `all` as project ID. The script runs for the assets in all of the projects on that environment.
Supported input parameters:
1. --catalog-id="" or --project-id="": Either catalog ID or project ID is passed. For a catalog, only ID is supported. For a project, the user can enter the ID of a single project or `all` for all the projects. This parameter is required.
2. -h="env host": Environment URL. This parameter is required.
3. --folder-path="": Path to the directory where the output folders of the script are stored. This parameter is required. A new empty folder is required.
4. -t="Bearer Token": User Token. This parameter is required.
5. --fixProps=“true/false": This parameter indicates whether to fix properties or not. The default value is true.
6. --timezone="": Time zone of the pod. The default value is UTC.
7. --project-suffix="-migration": Suffix for the migration-related projects. The default value is "-migration".
Steps to run the script -
- Download the wkc-lineage-fat.jar and run_sqls.sh files.
- Note: Rename the downloaded JAR file to wkc-lineage-fat.jar.
- Set the required environment variables - token, host, and folder path
- export BT= "User Token"
- export CPDURL="https://wkc-cpd.hostname.com:443"
- export FOLDER = "Path to the directory where output folders of the script are stored"
- Run the downloaded JAR file by executing the following command to export the events for the assets into sql files in the specified folder:
-
java -jar wkc-lineage-fat.jar --host=${CPDURL} --folder-path=${FOLDER} --project-id="projectId/all" --timezone="UTC" -t=${BT} --fixProps=true --project-suffix="-migration" - Note:
- To run this command for catalog, instead of --project-id, --catalog-id = "catalogId" needs to be passed.
- To run the script in the debug mode, set the parameter -Dorg.slf4j.simpleLogger.defaultLogLevel=debug in the command.
-
- Copy the folder to Db2 pod.
- Log in to the Db2 pod c-db2oltp-wkc-db2u-0 by using bash in order to run the script.
- Bash command:
oc exec -it c-db2oltp-wkc-db2u-0 bash
- Bash command:
- Run the attached run_sqls.sh file inside the Db2 pod to insert the data for different assets.
- Note:
- It prompts the user for path to a folder of scripts. Provide the path.
- Provide the path to the main folder, which has all of the other folders within, as the script runs folder by folder and executes all of the underlying sql files.
- A successful SQL execution finishes with following logs in each row:
-
DB20000I The SQL command completed successfully.
-
- It prompts the user for path to a folder of scripts. Provide the path.
- Note:
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"DSXDOC","label":"IBM Watson Studio and Knowledge Catalog"},"ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
03 November 2023
UID
ibm17065521