Output: sql
Insert data into a SQL database
Currently only Postgres and Sqlite (embedded) are supported.
Example
Pipe Language Snippet:
sql:
source:
kind: sqlite
connection: test.db
table: person
fields:
- name
- age
- birthdate
Field Summary
Field Name | Type | Description | Default |
---|---|---|---|
batch | integer or the 'document' | Maximum number of events in an output batch. If 'document' send on end of document | - |
timeout | interval | Interval after which the batch is sent, to keep throughput going | 100ms |
header | templated text | Put a header line before the batch | - |
footer | templated text | Put a header line after the last line of the batch | - |
use-document-marker | bool | Enrich the pipe metadata with a document marker (for document handling in batch mode) | false |
fields | array of fields | The fields to be inserted into the table | - |
table | string | An existing table | - |
source | OutputSqlSource | SQL connection options | - |
Fields
batch
Type: integer or the 'document'
Maximum number of events in an output batch. If 'document' send on end of document
timeout
Type: interval
Default: 100ms
Interval after which the batch is sent, to keep throughput going
header
Type: templated text
Put a header line before the batch
footer
Type: templated text
Put a header line after the last line of the batch
use-document-marker
Type: bool
Default: false
Enrich the pipe metadata with a document marker (for document handling in batch mode)
fields
Type: array of fields
The fields to be inserted into the table
If the field does not exist in the data, the output column becomes NULL (if possible)
table
Type: string
An existing table
source
Type: OutputSqlSource
SQL connection options
Field Name | Type | Description | Default |
---|---|---|---|
kind | string | The type of SQL server being written to | - |
connection | string | A valid SQL connection string to the kind of server being connected to | - |
kind
Type: string
Possible Values: postgres, sqlite, mysql
The type of SQL server being written to
connection
Type: string
A valid SQL connection string to the kind
of server being connected to