Skip to main content Skip to complementary content

Script file samples

From MS SQL Server source on NT server, to any target

: Test Script  SQL Server  WFRDEV01/SQL Server/WFRDEV01@INST1
connect  <SourceDbIpAddress>/SQL Server/WFRDEV01@INST1
:select-target DE5
select-env  BB
:create-env BB
:	EnvType	:=	2
:	Description	:=	SFEnvirt Training 01
:	Hold		:=	0
:	SrcId		:=	S01
:	Tempo		:=	1
:	Retry		:=	5
:end-create
:create-metadata

:	#ALIAS# 	:= VENUS

:	#SRCTYPE#	:= AS400
:end-create
:start-journalisation
:	Database := DD_TRAINING
:	StoragePath := D:\DD_JOURNAL\INST1
:end-journalisation
select-model F01
:create-model F01
:        GrpType := 0
:        Description     :=   SFo-Replication a l'identique
:        DataBase := DD_TRAINING
:        ManualDistrib := 0
:        AllMembers := 0
:        AccesMode := 3
:        OrpheanMgt := 1
:        ContError := 0
:        repair := 2
:        DDLchange := 1
:        Truncate := 0
:        RGZPFM := 1
:        ADDPFM := 1
:        RMVMBR := 1
:        DLTF := 1
:        NullProcess := 1
:        DateAschar := 1
:        MetaScript := Begin
:        script ligne 1
:        { ma 2ème ligne
:        } fin
:        MetaScript :=   End
:end-create 
:add-table category Categ Id:1
:add-table sales    Ventes Id:2
create-target DE5
	Description := WFRDEV01
	TargetType :=   1
	TargetName := WFRDEV01
	TargetAdress := <TargetDbIpAddress>
end-create

From AS/400 IBMi source to Kafka target

:Setting TG - INFOLOG04
connect <SourceDbIpAdress>/AS400/
create-env TQ
EnvType := 3
Description := Test AUTODEPLOY-03012023
Hold := 0
SrcId := TQ1
Tempo := 1
Retry := 5
end-create
create-metadata
#MD_PROJECT# := TQ
#MD_SERVER# := S06B6D0T
#MD_SERVER_TYPE# := AS400
end-create
create-target RQ1
Description := LT-GN595M3
NewSourceId := TQ1
TargetType := 1
Hold := 0
TargetName := LT-GN595M3
: TargetAdress := LT-GN595M3
TargetAdress := 10.33.224.96
end-create
select-env TQ
create-model M01
GrpType := 0
Description := AUTODEPLOY-M01
iASPgroup := *NONE
TCAP-77-DDMRGAUTO
3
LibJrn := PHIL
JrnName := JOURNALP
ManualDistrib := 0
AllMembers := 0
AccesMode := 3
OrpheanMgt := 0
ContError := 0
Repair := 2
DDLchange := 3
Truncate := 2
RGZPFM := 2
ADDPFM := 2
RMVMBR := 2
DLTF := 0
NullProcess := 0
DateAschar := 0
MetaScript := Begin
FORMAT_JSON
{
"id": "#FC.JRN_DATTIM##FC.JRN_SEQ_10#",
"schemaVersion": 1,
"header": {
"project": "#MD_PROJECT#",
"source": "CDC",
"messageDateTime": "#FC.DATETIME#",
"env": {
"server": "#MD_SERVER#",
"serverType": "#MD_SERVER_TYPE#",
"serverTz": "#FC.TIMEZONE#"
},
"journal": {
"eventType": "#FC.JRN_OPNAT#",
"eventSource": "#FC.RCV_LIB#.#FC.RCV_NAME#",
"eventDateTime": "#FC.JRN_DATTIM#",
"eventId": "#FC.JRN_SEQ_10#"
},
"eventSource": "#FC.SRC_TBL#"
},
"data": {
#O.DATA#
},
"footer": {
}
}
MetaScript := End
end-create
select-model M01
add-table PHIL CATEGORY CATEGORY Id:1
add-table PHIL CUSTOMER PHIL_TEST1 Id:8
add-table PHIL SALES PHIL_TEST1 Id:14
TCAP-77-DDMRGAUTO
4
select-table 1
begin-transformation
if I.PRDCATKEY = 1 Then
I.PRDCATNAME = 'Test'
Endif
Copy_I_to_O
end-transformation
select-target RQ1
distribute
Hold := 0
scheduled := 0
TgtBDType := V
UseLibName := 0
TargetDB := PHIL_TEST1
LoadByFlatFile := 0
KdSConnectString := broker=sfrkafka01:9092,sfrkafka02:9092,sfrkafka03:9092;version=0.10;mode=1
Planning :=
111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
111111111111111111111111111111111111111111111111111111111111111111111111111111
RecoveryType :=
CaseSensitive := 0
CacheSize := 0
end-distribute
change-distributed-table 1 default PHIL_TEST1

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!