Closed MrVokia closed 6 years ago
You're telling the plugin to pass it as a string in your statement. So it's doing exactly that.
What you want is;
jdbc {
connection_test => false
connection_test_query => "select 1"
driver_class => "org.apache.phoenix.queryserver.client.Driver"
connection_string => "jdbc:phoenix:thin:url=http://hostname:8765;serialization=PROTOBUF"
statement => [
"UPSERT INTO TEST(ID, NAME) VALUES(NEXT VALUE FOR TEST_SEQUENCE, ?)",
"%{name}"
]
}
Config:
Environment:
Logstash-output-jdbc version: 5.3.0 Logstash version: 5.1.1
Expected
UPSERT INTO TEST(ID, NAME) VALUES(NEXT VALUE FOR TEST_SEQUENCE, 'test')
Actual Behavior
UPSERT INTO TEST(ID, NAME) VALUES('NEXT VALUE FOR TEST_SEQUENCE', 'test')
Error Exception
How to remove quotes in value?