【发布时间】:2023-01-03 02:17:58
【问题描述】:
我想将我的 CSV 文件添加到 postgreSQL。但是每当我尝试连接它时显示错误: [错误][logstash.outputs.jdbc] jdbc 的未知设置 'driver_library' 这是我的 Config.conf 文件
input {
file {
path => "C:/Users/Desktop/Input.csv"
start_position => "beginning"
codec => plain
}
}
filter {
csv {
separator => ","
columns => ["Column","Metric","Source_Table","Output_Column_Alias","Method"]
}
}
output {
jdbc {
connection_string => "jdbc:postgresql://hostname:5432/Database"
username => "User"
password => "Password"
driver_library => "C:/Users/lib/postgresql-42.5.1.jar"
driver_class => "org.postgresql.Driver"
statement => "INSERT INTO CSV_to_Postgresql (Column,Metric,Source_Table,Output_Column_Alias,Method) VALUES (?, ?, ?, ?, ?)"
}
}```
【问题讨论】:
标签: logstash logstash-configuration logstash-jdbc