Hello, i'm trying to create a pipeline to fetch information from one table and insert / update into two other tables with only insert / update conditional on the second table if I successfully insert / update on the first table. In the sample code below I show what this pipeline would look like.
input {
jdbc {
jdbc_connection_string => "databaseone"
statement => "select values from tableone"
}
jdbc {
jdbc_connection_string => "databasetwo"
statement => "select tabletwo_flag from tabletwo"
}
}
output {
jdbc {
connection_string => 'databasetwo'
statement => [ "update/insert tabletwo values = ?, tabletwo_flag = ? where id = ?", "values", true, "id" ]
}
if "tabletwo_flag" == true {
jdbc {
connection_string => 'databasetwo'
statement => [ "update/insert tablethree values = ? where id = ?", "values", "id" ]
}
}
}
I want to know if it is possible to make this pipeline considering how logstash works.