dboutput
Converts the query result into an SQL query command and provides it into an external SQL server. It has the same functionality as the dbload command, and only the default value of the rowretry
option is different.
Syntax
dboutput PROFILE [OPTIONS] table=TABLE FIELD, ...
Required Parameter
PROFILE
-
JDBC connect profile. You can configure the connect profile in the web console.
table=TABLE
-
Name of table where you want to input the data.
FIELD, ...
-
Field names to be provided in the database separated by a comma(
,
). If you prefix the plus sign (+
) with the field name, it is recognized as a key column. -
The field name must match the column name of the target table. If the field and column names do not match, use the rename command before the
dboutput
command to match the name of the column in the SQL database.
Optional Parameter
batchsize=INT
- Size of processing unit to be applied to the database batch transaction. Larger units are more efficient because they are committed at once, but if the transaction fails, the number of rollback records also increases.
2000
is recommended. If you do not specify a processing unit size, the processing speed may be slow because the command commits the transaction one by one. database=SCHEMA
- Schema or database to switch after connecting.
rowretry=BOOL
- Option to retry transaction row by row when the batch transaction fails (default:
f
). When enabled, performance may be degraded, but data loss can be minimized.t
: Retries the transaction row by row after the batch transaction fails.f
: NOT retry the transaction row by row after the batch transaction fails.
stoponfail=BOOL
- Option to stop the query when transaction fails (default:
f
).t
: Stops the query when the transaction fails.f
: Skips the failed transaction and executes the next transaction.
type=update
- Type of SQL query: either
insert
orupdate
(default:insert
). If you set it toupdate
, you need to specify one or more fields as key columns. This command checks whether the SQL database has a key column by executing an SQLSELECT
statement, and runs anINSERT
command if there is no key column or anUPDATE
command if there is a key column.