Skip to main content

data_cleaner_mssql

1. Description

Data_cleaner_mssql is used to delete data from a table in the MSSQL database.

2. Program location

<installation_path>/data_cleaner_mssql

3. Input

3.1 Mandatory Parameters

#ParametersDescriptionExample
1connection_stringDatabase connection stringServer|db|user|password
2table_nameTable name from which data is to be deleted.\"tblProductTotals\"
3log_file_pathPath to write logstest-bed/balm_log.txt
4diagnostics_log_filePath to write diagnostics logstest-bed/balm_diag_log.txt

3.2 Non Mandatory Parameters

#ParametersDescriptionDefault valueExample
1where_conditionWhere condition for the deletion query""\"Col1\"='Value1'
2log_levelLevel of diagnostics written to the log file.infoerror/warn/info/debug/trace/none
3diagnostic_flagThe flag that decides whether performance diagnostics will be written to the diagnostics log file.falsetrue or false
4optionAdditional parameters to be used for sqlcmd.The option parameters should be pipe seperated,containing the identification key and its value.""m,2|l,10

4. Output

Healthcheck report

The health check report gives summary about the number of rows initially present in the table and number of rows deleted.🔗.

5. Process configuration in streamdef table:

  .........
{
"processName": "data_cleaner_mssql",
"processId": "1",
"processBinary": "{PROGRAMS}/IND/data_cleaner_mssql",
"processArguments": [
"--connection-string",
"{CONN_STR}",
"--log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/truncate_tblProductTotals_log.txt",
"--diagnostics-log-file",
"{SH_LOGS}/IND/BALM/{ddmmyyyy}/truncate_tblProductTotals_diag_log.txt",
"--table-name",
"tblProductTotals"
],
"processDependencies": [
""
],
"processReport": "{SH_LOGS}/IND/BALM/{ddmmyyyy}/truncate_tblProductTotals_datacleaner-health-check-report.json",
"processType": "TOOLS",
"infoLog": "{SH_LOGS}/IND/BALM/{ddmmyyyy}/truncate_tblProductTotals_log.txt",
"errorLog": ""
}
.........