Skip to main content
Version: 3.5.0

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 NameTypeDescriptionDefault
batchinteger or the 'document'Maximum number of events in an output batch. If 'document' send on end of document-
timeoutintervalInterval after which the batch is sent, to keep throughput going100ms
headertemplated textPut a header line before the batch-
footertemplated textPut a header line after the last line of the batch-
use-document-markerboolEnrich the pipe metadata with a document marker (for document handling in batch mode)false
fieldsarray of fieldsThe fields to be inserted into the table-
tablestringAn existing table-
sourceOutputSqlSourceSQL 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

Type: templated text

Put a header line before the batch

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 NameTypeDescriptionDefault
kindstringThe type of SQL server being written to-
connectionstringA 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