The “prepare” Apply command is used to add a new Apply Process. The “prepare” command can not be used to validate the database connection, and availability of the Trail Files or the presence of the necessary database objects to be used by the Apply Process.
In order to validate that the Apply Process is configured properly and it is able to run on the Target Database, the “validate” command must be used (see chapter Validate Process).
The “prepare” command does not enable the Apply Process to write data into the Target Database until the specified Apply Process is run (see chapter Run any Capture or Apply Processes).
Depending on the Source RDBMS type the “prepare” command may utilise different set of the parameters:
The command can be invoked from repcli or via REST API or Web UI.
CLI Syntax:
repcli prepare process=apply id=applyID \
dbtype={mssql|oracle|postgresql|mysql|snowflake|redshift|s3} \
capturename=captureName \
[Target database connection parameters] \
[Target database specific parameters] \
debuglevel={0-15} \
ddlcreate=objectMask:options \
ddldrop=objectMask:options \
ddlprocessing=native|dictionary \
map=mapID,mappingClause \
skipapply=skipapplyMask
REST API:
Server response:
The following example shows how to create Apply Process for the SQL Server database consuming data from the “SQLServerCap1” Capture Process:
repcli prepare process=apply id=1 dbtype=mssql capturename=SQLServerCap1 server=10.10.11.1 port=1433 user=sa password=Passw0rd123 dbname=testDB
The following example shows how to create Apply Process for Oracle database consuming data from the “SQLServerCap1” Capture Process
repcli prepare process=apply id=2 dbtype=oracle capturename=ORACap2 connectiontype=ezconnect server=10.10.11.2 port=1521 servicename=ORA1 user=scott password=tiger
The following example shows how to create Apply Process for the PostgreSQL database consuming data from the “SQLServerCap1” Capture Process and rename schema for all the table from “dbo” to “public”. The "ddlprocessing=map" parameter enables renaming schema “dbo” to “public” for all DDL and Initial Load operations.
repcli prepare process=apply id=3 dbtype=postgresql capturename=SQLServerCap1 server=10.10.11.3 port=5432 user=repuser password=Passw0rd123 dbname=testDB ddlprocessing=map map=1,rule=(dbo.%:public.%)
The following example shows how to create Apply Process for the Snowflake database consuming data from the “SQLServerCap1” Capture Process and rename schema for all the table from “dbo” to “sqldata”. The "ddlprocessing=map" parameter enables renaming schema “dbo” to “sqldata” for all DDL and Initial Load operations.
repcli prepare process=apply id=4 dbtype=snowflake capturename=SQLServerCap1 account=ab12345 warehouse=DEMO_WH dbname=DWH region=eu-west-2.aws user=repuser password=Passw0rd123 ddlprocessing=map map=1,rule=(dbo.%:sqldata.%)
The following example shows how to create Apply Process for S3 consuming data from the “ORACap2” Capture Process:
repcli prepare process=apply id=5 dbtype=s3 capturename=ORACap2 s3.accessKeyID=AQWERTYUIOPLKJHGFDSD s3.secretAccessKey=VQwerTyuiopLkJhgFDSq/yQweRtyUi0PlKjHgFdr s3.bucketname=ora2s3
In order to create new Apply Process click the “Add Apply” button on the main dashboard:
On the “Apply Process Configuration” form provide the Id and related Capture process name and optionally the notification settings, debug level, and autostart parameter. Proceed to the database configuration by clicking on the database logo:
On the “Database Settings” form provide Target database-specific parameters (see SQL Server Apply Parameters , Oracle Apply Parameters , PostgreSQL Apply Parameters , MySQL Apply Parameters , Snowflake Apply Parameters , Redshift Apply Parameters or AWS S3 Apply Parameters for the details) and click “Save”:
Under "Process Parameters" the "Cleanup Trail" file is to determine the number of days the Apply Process must keep trail files (see repcli's cleanuptrail parameter), DDL mapping is equivalent of the ddlprocessing parameter and Restart Attempts is equivalent of restartattempts parameter. Under “Transformation Rules” tab provide the objects mapping and data transformation rules if required. Under “Data Filter” tab provide the functionality to filter out data while processing DML operations(see Objects Filtering)
Any additional parameters that are available via repcli but not present on the “Apply Process Configuration” form can be provided in the “Advanced Settings” section.
Prev page:
Initial LoadNext page:
SQL Server Apply Parameters