Ringloop / mr-plow

Minimal memory usage, cloud native logstash alternative
Apache License 2.0
28 stars 3 forks source link

Configure postgres json data parsing as optional config #10

Closed feed3r closed 2 years ago

feed3r commented 2 years ago

The idea is to add an optional list of fields named json to the query entry, this entry will contains an optional list of items named attribute, indicating name and type of each attribute. If the attribute is not listed, it will be parsed as string by default.

Following, a complete configuration example:

database: databaseValue
queries:
- index: index1
- query: select * from table
- jsonFields:
  - fieldName: dataField
  - attributes:
    - attributeName: attributeName
    - attributeType: attributeType
- index: index2
- query: select * from table2
feed3r commented 2 years ago

Done with the PR