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
# | Parameters | Description | Example |
---|---|---|---|
1 | connection_string | Database connection string | Server|db|user|password |
2 | table_name | Table name from which data is to be deleted. | \"tblProductTotals\" |
3 | log_file_path | Path to write logs | test-bed/balm_log.txt |
4 | diagnostics_log_file | Path to write diagnostics logs | test-bed/balm_diag_log.txt |
3.2 Non Mandatory Parameters
# | Parameters | Description | Default value | Example |
---|---|---|---|---|
1 | where_condition | Where condition for the deletion query | "" | \"Col1\"='Value1' |
2 | log_level | Level of diagnostics written to the log file. | info | error/warn/info/debug/trace/none |
3 | diagnostic_flag | The flag that decides whether performance diagnostics will be written to the diagnostics log file. | false | true or false |
4 | option | Additional 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": ""
}
.........