|
|
|
---
|
|
|
|
title: 'MQTT Topic: frontend_thing_update'
|
|
|
|
---
|
|
|
|
|
|
|
|
# `frontend_thing_update`
|
|
|
|
|
|
|
|
:warning: This is still WIP
|
|
|
|
|
|
|
|
## Version 5
|
|
|
|
|
|
|
|
```py
|
|
|
|
{
|
| ... | ... | @@ -14,11 +16,37 @@ title: 'MQTT Topic: frontend_thing_update' |
|
|
|
"ingest_type": <string>
|
|
|
|
"mqtt_device_type": <string> | null
|
|
|
|
"project": <PROJECT>
|
|
|
|
<PROJECT> = {
|
|
|
|
"database": <DATABASE>
|
|
|
|
"qaqc": <QC>
|
|
|
|
"parsers": {
|
|
|
|
'default': <integer>, # index in parsers
|
|
|
|
'parsers': [<PARSER>, ...]
|
|
|
|
}
|
|
|
|
"raw_data_storage": <S3>
|
|
|
|
"mqtt": <MQTT>
|
|
|
|
"external_sftp": <EXT_SFTP>
|
|
|
|
"external_api": <EXT_API>
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
<PARSER> = {
|
|
|
|
'type': <string>, # e.g CsvParser
|
|
|
|
'name': <string>,
|
|
|
|
'settings': {
|
|
|
|
'delimiter': <string>, # e.g ','
|
|
|
|
'skipfooter': <integer>, # lines to skip at the end of the file
|
|
|
|
'skiprows': <integer>, # lines to skip at the beginning of the file
|
|
|
|
'timestamp_column': <integer>,
|
|
|
|
'timestamp_format': <string>,
|
|
|
|
'pandas_read_csv': <object> | null # a dictionary of kwargs passed to `pandas.read_csv`
|
|
|
|
}
|
|
|
|
|
|
|
|
<PROJECT> = {
|
|
|
|
"name": <string>,
|
|
|
|
"uuid": <string>,
|
|
|
|
}
|
|
|
|
"database": {
|
|
|
|
|
|
|
|
<DATABASE> = {
|
|
|
|
"username": <string>
|
|
|
|
"password": <string> # encrypted
|
|
|
|
"url": <string> # i.e. postgresql://user@postgres:5432/foodb
|
| ... | ... | @@ -26,29 +54,6 @@ title: 'MQTT Topic: frontend_thing_update' |
|
|
|
"ro_password": <string> # encrypted
|
|
|
|
"ro_url": <string> # i.e. postgresql://ro_user@postgres:5432/foodb
|
|
|
|
"schema": <string> # i.e. foodb (same as in url)
|
|
|
|
},
|
|
|
|
"qaqc": <QC>
|
|
|
|
"parsers": {
|
|
|
|
'default': <integer>,
|
|
|
|
'parsers': [
|
|
|
|
{
|
|
|
|
'type': <string>, # e.g CsvParser
|
|
|
|
'name': <string>,
|
|
|
|
'settings': {
|
|
|
|
'delimiter': <string>, # e.g ','
|
|
|
|
'skipfooter': <integer>,
|
|
|
|
'skiprows': <integer>,
|
|
|
|
'timestamp_column': <integer>,
|
|
|
|
'timestamp_format': <string>,
|
|
|
|
'pandas_read_csv': <object> | null # a dictionary of kwargs passed to `pandas.read_csv`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
"raw_data_storage": <S3>
|
|
|
|
"mqtt": <MQTT>
|
|
|
|
"external_sftp": <EXT_SFTP>
|
|
|
|
"external_api": <EXT_API>
|
|
|
|
}
|
|
|
|
|
|
|
|
<S3> = {
|
| ... | ... | @@ -77,87 +82,31 @@ title: 'MQTT Topic: frontend_thing_update' |
|
|
|
"private_key": <string> # encrypted
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
<EXT_API> = {
|
|
|
|
"type": <string> | null,
|
|
|
|
"enabled": <bool> | null
|
|
|
|
"sync_interval": <integer> | null
|
|
|
|
"settings": <object> | null
|
|
|
|
}
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
## Version 6
|
|
|
|
|
|
|
|
- Changes in parsers timestamp columns
|
|
|
|
Changes in parsers timestamp columns.
|
|
|
|
|
|
|
|
```py
|
|
|
|
{
|
|
|
|
"version": 6
|
|
|
|
"uuid": <string>
|
|
|
|
"name": <string>
|
|
|
|
"description": <string>,
|
|
|
|
"project": {
|
|
|
|
"name": <string>,
|
|
|
|
"uuid": <string>,
|
|
|
|
},
|
|
|
|
"ingest_type": <string>
|
|
|
|
"database": {
|
|
|
|
"username": <string>
|
|
|
|
"password": <string> # encrypted
|
|
|
|
"url": <string> # i.e. postgresql://user@postgres:5432/foodb
|
|
|
|
"ro_username": <string>
|
|
|
|
"ro_password": <string> # encrypted
|
|
|
|
"ro_url": <string> # i.e. postgresql://ro_user@postgres:5432/foodb
|
|
|
|
"schema": <string> # i.e. foodb (same as in url)
|
|
|
|
},
|
|
|
|
"qaqc": ... # TODO
|
|
|
|
"parsers": {
|
|
|
|
'default': <integer>,
|
|
|
|
'parsers': [
|
|
|
|
{
|
|
|
|
'type': <string>, # e.g CsvParser
|
|
|
|
'name': <string>,
|
|
|
|
'settings': {
|
|
|
|
'delimiter': <string>, # e.g ','
|
|
|
|
'skipfooter': <integer>,
|
|
|
|
'skiprows': <integer>,
|
|
|
|
'pandas_read_csv': <None | Object>,
|
|
|
|
'timestamp_columns': [
|
|
|
|
{
|
|
|
|
'column': <integer>,
|
|
|
|
'format': <string>
|
|
|
|
},
|
|
|
|
...
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
"mqtt_device_type": <string> | null
|
|
|
|
"raw_data_storage": {
|
|
|
|
"bucket_name": <string>
|
|
|
|
"username": <string>
|
|
|
|
"password": <string> # encrypted
|
|
|
|
"filename_pattern": <string>
|
|
|
|
},
|
|
|
|
"mqtt": {
|
|
|
|
"username": <string>
|
|
|
|
"password_hash": <string>
|
|
|
|
"password": <string> # encrypted, deprecated
|
|
|
|
"topic": <string>
|
|
|
|
"uri": <string>
|
|
|
|
},
|
|
|
|
"external_sftp": {
|
|
|
|
"sync_enabled": <bool>
|
|
|
|
"uri": <string>
|
|
|
|
"path": <string>
|
|
|
|
"username": <string>
|
|
|
|
"password": <string> # encrypted
|
|
|
|
"sync_interval": <number>
|
|
|
|
"public_key": <string>
|
|
|
|
"private_key": <string> # encrypted
|
|
|
|
},
|
|
|
|
"external_api": ... # TODO
|
|
|
|
# same as in version 5
|
|
|
|
}
|
|
|
|
|
|
|
|
<PARSER> = {
|
|
|
|
# same as in version 5
|
|
|
|
'timestamp_columns': [<TS_COL>, ...] # any number of timestamp columns
|
|
|
|
}
|
|
|
|
|
|
|
|
<TS_COL> = {
|
|
|
|
'column': <integer>,
|
|
|
|
'format': <string>
|
|
|
|
}
|
|
|
|
``` |
|
|
\ No newline at end of file |