Skip to main content

bulk_insert

1. Description

bulk_insert is used to load the data present in the data_file into the table present in ORACLE/MSSQL specified in the input.

2. Program location

<installation_path>/bulk_insert

3. Input

3.1 Mandatory Parameters

#ParametersDescriptionExample
1db_nameDatabase nameORACLE/MSSQL
2connection_stringDatabase connection stringuserid|password|ip:port/sid(for oracle) and Server|db|user|pssword(for mssql)
3schema_nameSchema namedbo/RUNCTROL_ORADB3
4data_filePath to the data file to be loaded.test-bed/a-summary.txt
5log_filePath to write logstest-bed/log.txt
6diagnostics_log_filePath to write diagnostics logstest-bed/diag_log.txt
7table_nameTable name into which data is to be loaded.tblProductTotals

Note: In case of MSSQL provide full path of data_file.

3.2 Non Mandatory Parameters

#ParametersDescriptionDefault valueExample
1log_levelLevel of diagnostics written to the log file.infoerror/warn/info/debug/trace/none
2diagnostics_flagThe flag that decides whether performance diagnostics will be written to the diagnostics log file.falsetrue or false
3terminatorSeparator used in between columns.Given only in case of MSSQL, for oracle provide in CTL file.|
4rowterminatorTerminator used in between rows.Given only in case of MSSQL, for oracle provide in CTL file.0x0a
5headercountNumber of rows to be skipped at the start.Given only in case of MSSQL, for oracle provide in CTL file.01
6ctl_filePath to the control file.Required for ORACLE only.""test-bed/tblProductTotals.ctl
7optionAdditional parameters to be used for sqlcmd,sqlldr & sqlplus.The option parameters should be pipe seperated,containing the identification key and its value.""m,2|l,10

4. Output

4.1 Healthcheck report

The health check report gives summary about the number of rows loaded into the table and number of rows discarded.🔗.

5. Process configuration in streamdef table:

  .........
"processName": "Bulk Insert",
"processId": "1",
"processBinary": "{SH_PROGRAMS}/bulk_insert",
"processArguments": [
"--connection-string",
"{CONN_STR}",
"--schema-name",
"{SCHEMA}",
"--db-name",
"{DB}",
"--data-file",
"{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/a-summary.txt",
"--log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/log.txt",
"--diagnostics-log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/diag.txt",
"--table-name",
"tblProductTotals"
],
"processDependencies": [],
"processReport": "{SH_SUMMARYDATA}/IND/BALM/{ddmmyyyy}/a-summary-tblProductTotals-health-check-report.json",
"processType": "LOADER",
"infoLog": "{SH_LOGS}/IND/BALM/{ddmmyyyy}/log.txt",
"errorLog": ""
.........