Outbound SQL Connector
The Outbound SQL connector supports PostgreSQL and SQLite databases.
type: sql-sink
version: 0.1.2
required
The connection string for a PostgreSQL or SQLite database
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 |
required
This is the name of a SmartModules from the SmartModule Hub.
<group>/<SmartModuleName>@<version>
This is the action
Choices:
insertmap
These are parameters to the SmartModule
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