SQL
SQL data connector configuration object consists of the following attributes:
| Attribute | Description |
|---|---|
| type | Connector type; must be always set to sql. |
| id | App wide unique connector id. |
| server | Provide only the domain part of the URL without scheme. |
| port | Service port number. |
| connectionParameters | Optional Map of connection parameters - up to 10. |
| credentials | Optional Username and password to connect to the broker. |
| databaseFlavour | One of postgresql, mysql, and sqlserver. |
| databaseName | Name of the database. |
| table | Name of the table. |
| columns | Names of the columns that will be modified. |
| dataProcessingMethod | Optional. Id or name of the App method that will be used for filtering and/or transforming incoming data. See Overview page for details. |
| disabled | Optional. When true data connector stops streaming. |
Create MySQL:
Update MySQL:
Create PostgreSQL:
The data connector's data processing method should return a map where Key is the column name, and Value is the value that will be inserted into that column.
By default if no data processing method is provided, a data value will be mapped like the following:
feed -> data value feed
account -> account id
app -> app id
device -> device id. If it is an app data value this is not assigned
datavalue -> complete data value in JSON stringified
Example default expected table:
For a data connector that will populate feedId and temperature columns, you can return your own map as shown below:
Data Connector Config:
Data Processing Method Example: