DB V1 (Deprecated)
Know the component and how to use it.
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
Input
{
"parameters": {
"name": "value"
...
}
}
Output
{
"data": [
{"column1":"data1", "column2":"data2", ... }
]
"rowCount": number_of_returned_rows
"updateCount": number_of_rows_updated
}
{
"data": [
{"column1":"data1", "column2":"data2", ... }
]
"rowCount": number_of_returned_rows
"updateCount": number_of_rows_updated
}
Last modified 5mo ago