Bookshelf Home | Contents | Index | PDF |
Siebel Data Quality Administration Guide > Sample Configuration and Script Files > Sample SQL Scripts > IDS_IDT_LOAD_ANY_ENTITY.shThe following sample SQL script can be used for incremental data load. ################################################################################# ################################################################################# # Checking IIR system variables are set. If not then throw error and exit. if [ -z "$SSABIN" ] && [ -z "$SSATOP" ] echo "Err #LOAD-01: Informatica IIR system variables not set. Please use 'idsset' script" # checking if required idsbatch utility exists at $SSABIN location echo "idsbatch utility found." ################################################################################# ################################################################################# # ENVIRONMENT RELATED PARAMETERS # scriptdir=/export/home/qa1/InformaticaIR/initloadscripts # informaticadir=/export/home/qa1/InformaticaIR scriptdir=$SSATOP/initloadscripts # DEBUG OPTION - 1 for ON and 0 for OFF # Passing DB credentials as argument # ISS DATABASE CREDENTIALS and CONNECT INFO # dbcredentials=ora32155/ora32155@sdchs20n532_qa532a ################################################################################# ################################################################################# echo using Script dir: $scriptdir using Informatica Home: $informaticadir echo "Err #LOAD-03: Error in $0 - Invalid Argument Count" echo Usage LoadAnyEntity "<Entity Account,Contact or Prospect> <WorkDir> <dbuser/dbpass@tnsname> [Optional Batch Number]" echo e.g "Syntax: $0 Entity_name Account Log_directory /temp" if [ -f $scriptdir/idt_$current\_load.txt ] echo Using Load file $scriptdir/idt_$current\_load.txt Load file cannot be loaded. Please check and rerun process Specific bath to be loaded: $4 set feedback off verify off heading off pagesize 0 read_sql_stmt "select max(batch_num) from "$current"s_SNAPSHOT_VIEW" "$dbcredentials" | while read u echo number of batches to be processed is: $batches # for counter in $(seq 2 $batches); for ((counter=2; counter <= $batches; counter++)); set head off feedback off echo off pages 0 UPDATE IDS_IDT_CURRENT_BATCH set batch_num=$counter select batch_num from IDS_IDT_CURRENT_BATCH echo "#########################################" echo "# Curently Processing Batch: $currentbatch #" echo "#########################################" echo Processing following command: echo idsbatch -h$machineName:1669 -i$scriptdir/idt_$current\_load.txt -1$workdir/idt_$current\_load$counter.log -2$workdir/idt_$current\_load$counter.err -3$workdir\idt_$current\_load$counter.dbg echo "#########################################" idsbatch -h$machineName:1669 -i$scriptdir/idt_$current\_load.txt -1$workdir/idt_$current\_load$counter.log -2$workdir/idt_$current\_load$counter.err -3$workdir\idt_$current\_load$counter.dbg echo "#########################################" set head off feedback off echo off pages 0 UPDATE IDS_IDT_CURRENT_BATCH set batch_num=$counter select batch_num from IDS_IDT_CURRENT_BATCH echo "#########################################" idsbatch -h$machineName:1669 -i$scriptdir/idt_$current\_load.txt -1$workdir/idt_$current\_load$counter.log -2$workdir/idt_$current\_load$counter.err -3$workdir\idt_$current\_load$counter.dbg echo "Process completed. Please examine error and log files in "$workdir errorcnt=$(find ./ -depth 1 -name "*.err" ! -size 0 | wc -l) echo Errors encountered is: $errorcnt echo Successfully processed all the batches echo ######################################### echo ######################################### echo $errorcnt batch/es have failed. Please check the following batches: |
Siebel Data Quality Administration Guide | Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |