on 11-17-2023 3:33 PM
in this blog you show how to set the delimiter using /f in interactive mode, but i have a request that requires the output of ~200 million lines and as we all know in this day and age, foreground processes get timed out for security reasons way before this finishes. i can run hqbsql in background using a script, but any attempt to set the /f value cause the process to fail. and you provide the syntax for setting the delimiter to "|"?
example - this runs, but default delimiter is comma, which is an issue since there are commas in the ARKTX field.
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -x "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv
i attempted this
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> /f | -x "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv
and this
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -x /f | "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv
but neither worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
if you look at the blog, it shows f\ | and when running in interactive mode that command works. are you saying when running as a script iit should be -F | ? if this is correct, can you provide the proper syntax as trying various ways to write this all failed.
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -F | -x "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv - command -x not found.
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -x "-F | select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv - tty not foiund - suspended.
Hello
yes, in interactive mode only it is \f | for pipe symbol as separator.
Explanation for formatting
So try for batch/script with default '|' separator
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -F -x "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv
If you will try a different separator e.g. semicolon try
$DIR_EXECUTABLE/hdbsql -n <server> -u <user> -p <password> -F ';' -x "select * from "SAPABAP1"."VBAP" " > /hana/backup/dump1/10232023_vbap.csv
KR
Klaus
User | Count |
---|---|
69 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.