Hi,
I'm using a JDBC input to fetch data from a specific table. I want to put this data in a new file. For this I'm using the CSV output. What I'm seeing, is that the file remains open. I want this file to be closed, because after the creation of the CSV file, I want to place it into a different endpoint (like a blob storage). Is there a way to do this? My conf looks like this:
input {
jdbc {
jdbc_driver_library => "/driver/mssql-jdbc-7.2.2.jre8.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string => "jdbc:sqlserver://xxxxx\xxxx;database=xxxx;user=xxxxx; password=xxxxxx"
jdbc_user => nil
schedule => "16 15 * * *"
statement => "SELECT * from [dbo].[yyyyyy]
}
}
filter {
mutate {
add_field => {"filename" => "%{+YYYY-MM-dd}" }
}
}
output {
csv {
path => "zzz-yyyy-%{filename}.csv"
fields => ["@timestamp","seq_num","delete_session_id","create_user"]
}
}
Thanks