Skip to content

Commit 7d8bc0f

Browse files
stm85rainerleber
andauthored
add -E option to filepath command (#42)
* add -E option to filepath command -E Specifies the <exit-code> if HDBSQL returns an error. Values are: OKAY = 0, ERROR = 1, USAGE = 2, SQLERROR = 3, and VAR = 4. if -E is not set when using-I option the sql will not fail on first error and still continue running the sql commands inside the file. If the last command is successfully, the whole run is market as successfully * Create 0044-hdbsql_sqlfile_faile_on_first_error.yaml * Update 0044-hdbsql_sqlfile_faile_on_first_error.yaml * Update and rename 0044-hdbsql_sqlfile_faile_on_first_error.yaml to 0044-hdbsql_sqlfile_fail_on_first_error.yaml --------- Co-authored-by: Rainer Leber <[email protected]>
1 parent f9d3cce commit 7d8bc0f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
minor_changes:
2+
- Add -E 3 Option to hdbsql run, if filepaht is selected, to fail on first sql error

plugins/modules/sap_hdbsql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def main():
223223
command.extend(['-x', '-i', instance, '-u', user, '-p', password])
224224

225225
if filepath is not None:
226-
command.extend(['-I'])
226+
command.extend(['-E 3', '-I'])
227227
for p in filepath:
228228
# makes a command like hdbsql -i 01 -u SYSTEM -p secret123# -I /tmp/HANA_CPU_UtilizationPerCore_2.00.020+.txt,
229229
# iterates through files and append the output to var out.

0 commit comments

Comments
 (0)