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:
Web UI:
See How to create apply in Web UI
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
Prev page:
Initial LoadNext page:
SQL Server Apply Parameters