In my MS SQL table, i have a column with date stored as string on format "dd-mm-yyyy"
During my import, i want to convert this column's values into date type.
I saw a feature called filter which could do this type of transformation. I found examples but only for parsing logs full text lines brought by Beats with sort of regex.
Can I use it for a sql column?
If yes , how to use this feature for a sql column? For example, how adapt this conf file for making it working for real?
Sorry if it is a too easy question I an new
input {
jdbc {
jdbc_connection_string => "jdbc:localhost;"
jdbc_user => "user"
jdbc_password => "pass"
jdbc_driver_library => "C:\Program Files (x86)\jdbc\sqljdbc_6.0\enu\sqljdbc42.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
statement => "SELECT * FROM SOLD"
}
}
filter
{
date {
match => [ "STRING_DATE", "dd-MM-YYYY" ]
}
}
output {
elasticsearch {
hosts => "localhost:9200"
index => "indexname"
document_type => "typename"
` }`
}
as it is it creates this string field in ES:
"string_date": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}