IMPORTANT: This documentation has been discontinued. Read the updated DB V1 documentation on our new documentation portal.
DB V1 makes SELECT, INSERT, DELETE and UPDATE operations, returning the values to a JSON structure.
IMPORTANT: be careful with the memory consumption for large datasets. If you prefer, you can use Stream DB instead. To access its article, click here.
Take a look at the configuration parameters of the component:
Account: account to be used by the component.
Database URL: connection string to the database in JBDC format.
SQL Statement: SQL statement to be executed.
Coalesce: when activated, this option controls if the data objects are coalesced into a string or if an error is generated.
Fail On Error: if the option is enabled, the execution of the pipeline with error will be interrupted; otherwise, the pipeline execution proceeds, but the result will show a false value for the “success” property.
Custom Connection Properties: specific connection properties defined by the user.
Keep Connections: if activated, the option will keep the connections to the database for 30 minutes maximum; otheriwse, it will be kept for 5 minutes only
Advanced: advanced configurations.
Connection Test Query: SQL statement to be used before each connection is established - this is an optional parameter and must be applied to databases that don't have reliable information about the connection status.
Example
{
"parameters": {
"field1": {
"a": "b"
}
}
}
coalesce = true => field1 = "{\"a\": \"b\"}"
coalesce = false => exception
coalesce = true => field1 = "{\"a\": \"b\"}"
coalesce = false => exception
Messages flow
Input
{
"parameters": {
"name": "value"
...
}
}
Output
{
"data": [
{"column1":"data1", "column2":"data2", ... }
]
"rowCount": number_of_returned_rows
"updateCount": number_of_rows_updated
}
Output with error
{
"code": error_code,
"error": error_message,
"cause": cause_of_the_error,
"sqlState": the_driver_specific_sql_state,
"vendorCode": the_driver_specific_error_code
}
To know the functions and uses for databases, click here.