The INI format
CSV, EBCDIC and QDDS
Compatible database drivers:
These jars are available through the links below.
MSSQL - https://go.microsoft.com/fwlink/?linkid=2259203
Note: Unzip the downloaded sqljdbc_12.6.0.0_enu.zip
and find mssql-jdbc-12.6.0.jre11.jar
under the enu > jars
folder.
ORACLE - https://repo1.maven.org/maven2/com/oracle/database/jdbc/ojdbc8/12.2.0.1/
POSTGRES - https://jdbc.postgresql.org/download/postgresql-42.6.2.jar
Follow these steps:
migrationProjectPath
.To run the data migrator in the Docker by specifying the SQL Model JSON file or database driver path in the configuration, we need to add to the Docker command: -v pathInComputer:pathInDockerImage
And in the configuration file, we need to specify pathInDockerImage as path of sql model json file or database driver.
Docker command will be like this: docker run --rm -v [migrationProjectPath]:/home -v pathInComputer:pathInDockerImage 170644325583.dkr.ecr.eu-west-3.amazonaws.com/data-migrator:latest -root /home -configurationIni [configurationFilePath];[stepsConfigurationFilePath]
Parameters
Use 'host.docker.internal' as the value for the dataBaseHost and server.host properties in your file if your database is installed on the server where you are running Docker.
By default, AWS Secret Manager doesn't provide a field to store the Oracle Service Name. Hence, with the help of edit option, add a row with key as 'dbservicename' and provides the corresponding value.
Create a SQL file with custom database creation statement. Get the absolute or relative path of the file and give it as input for the parameter stepDatabaseCreateScriptPath.
Note:
The installation guide is available here.
For CHAR and VARCHAR column, it consists in transposing the control characters from the EBCDIC page code to a UTF-8 compatible page code containing 256 non-confusing characters.
These characters are transposed to the Latin Extended-B page + the first 3 lines of the International Phonetic Alphabet page. The Latin Extended-B page starts with the character LATIN SMALL LETTER B WITH STROKE, unicode point code 0180. The EBCDIC control characters are (in general for all EBCDIC page codes) on the first 16 * 4 characters + the last character.
The first character is LOW-VALUE, the last is HIGH-VALUE.
Example:
The program inserts LOW-VALUE, 0-byte is converted to 0x180, the ƀ character is inserted into database.
The program reads the ƀ character, 0x180 is converted to 0-byte, the program gets 0-byte.
When you try to load data coming from PF files in AS400 context, Analyzer tool add technical columns to each table scripts. However those additional data are not contained in data file provided by customer, so the Data Migrator provides a mechanism to add artificially those missing data in Data loading step.
The tool try to reach out the fixed-values.properties
file into the targeted input folder. If the file is found, it is considered. He should looks like this :
TABLEPF1/TABLEPF1=NOW,NOW,TABLEPF1,TABLEPF1 TABLEPF2/TABLEPF2=NOW,NOW,TABLEPF2,TABLEPF2 ....
To each inserted row, the tool will add those column values.
To prevent to add a new entry in this file for each new table (PF), the defaultFixedValues
property exists for a loading step.
In most case, customer data comes from a unique Datafile and the sample describe above is enough.
In business term, it allows to load different DataFiles (AS400 data) by managing specific partitions for them.
This property will be used for each table that do not appear in the fixed-values.properties files.
The fixed values can still be overridden for a particular table if needed using the fixed-values.properties file.
When defining the Fixed values, you can use the special keywords: FOLDER and FILENAME that will help populating the srcfile and member column.
Example:
defaultFixedValues=NOW,NOW,FOLDER,FOLDER
FOLDER and FILENAME will be evaluated for each file being processed in the data folder.
Meaning of the special keywords:
FOLDER: last folder in the path of the file, without the separators
Example: C:\migration\data\DataFIles\PKTTYP\FILE1.txt => FOLDER = PKTTYP
FILENAME: Data file name, without the extension
Example: C:\migration\data\DataFIles\PKTTYP\FILE1.txt => FILENAME = FILE1
The engine performs a full scan rather than using defined indexed for plan execution. You have to add an ANALYZE command in a SQL script, in a last step that enables to update PostgreSQL statistics to help determine the most efficient execution plans for queries.