I am trying to log all the new lines coming from a postgres database. I want to use the SQL_input integration, but I cannot achieve what I want. The documentation is not complete, so that I cannot figure out how to do.
Here is my query:
- query: "SELECT reg, aircraft_type, airline, is_uplink_enabled, uplink_routing, is_downlink_enabled, downlink_routing, updated_at FROM datalink.aircraft where updated_at > :sql_last_value order by updated_at ASC"
response_format: table
sql_tracking_column: "updated_at"
As you can see, I want to use the updated_at column as the tracking point. Unfortunately, it does not work. According to some AI searches, the SQL metrics does not accept the tracking. If I disable it in the kbn HMI, still does not work. it always complains about the : in the query in the elastic-agent logs
error while fetching:fetch table mode failed: pq: syntax error at or near \":\"
So please can you point me the correct and complete documentation ? and explain a bit here?
Once done, I’d like to know if it is possible to define a _id
as a column, and perform some upserts
(here the column reg should be the _id
thank’s