We are hiring! Apply here
Outbound SQL Connector

The Outbound SQL connector supports PostgreSQL and SQLite databases.

 

Common config values

type: sql-sink
version: 0.1.0
 

Parameters

 

database_url

required

The connection string for a PostgreSQL or SQLite database

 

Data types

This is the a table of what input types map to in PostgreSQL and SQLite

Model PostgreSQL SQLite
Bool BOOL BOOLEAN
Char CHAR INTEGER
SmallInt SMALLINT, SMALLSERIAL, INT2 INTEGER
Int INT, SERIAL, INT4 INTEGER
BigInt BIGINT, BIGSERIAL, INT8 BIGINT, INT8
Float REAL, FLOAT4 REAL
DoublePrecision DOUBLE PRECISION, FLOAT8 REAL
Text VARCHAR, CHAR(N), TEXT, NAME TEXT
Bytes BYTEA BLOB
Numeric NUMERIC REAL
Timestamp TIMESTAMP DATETIME
Date DATE DATE
Time TIME TIME
Uuid UUID BLOB, TEXT
Json JSON, JSONB TEXT
 

Transforms

required

 

Uses

This is the name of a SmartModules from the SmartModule Hub.

<group>/<SmartModuleName>@<version>

 

Invoke

This is the action

Choices:

  • insert
  • map
 

With

These are parameters to the SmartModule

 

Example

Transform with Jolt SmartModule

  - uses: infinyon/jolt@0.1.0
    invoke: insert
    with:
      spec:
        - operation: shift
          spec:
            payload:
              device: 'device'
        - operation: default
          spec:
            device:
              type: 'mobile'

Transform with json-sql SmartModule

  - uses: infinyon/json-sql@0.1.0
    invoke: insert
    with:
      mapping:
        table: 'topic_message'
        map-columns:
          'device_id':
            json-key: 'device.device_id'
            value:
              type: 'int'
              default: '0'
              required: true
          'record':
            json-key: '$'
            value:
              type: 'jsonb'
              required: true