elasticsearch-jdbc icon indicating copy to clipboard operation
elasticsearch-jdbc copied to clipboard

"type_mapping" format date time doesn't work???

Open YangFangXin opened this issue 4 years ago • 0 comments

Hello my Configuration like this:

`echo '{ "type" : "jdbc", "jdbc" : { "elasticsearch.cluster":"my-application", "url" : "jdbc:mysql://10.179.38.6:3306/mammon", "user" : "root", "password" : "123456", "sql" : "select * from '${table}'", "elasticsearch" : { "host" : "'${esHost}'", "port" : "'${esTcpPort}'" }, "index" : "'${esIndex}'", "type" : "'${table}'", "type_mapping":{ "'${table}'":{ "properties": { "to_account_time": { "type": "date", "format" : "yyyy-MM-dd HH:mm:ss" }, "created_at": { "type": "date", "format" : "yyyy-MM-dd HH:mm:ss" }, "updated_at": { "type": "date", "format" : "yyyy-MM-dd HH:mm:ss" } } } }

}

}' | java
-cp "${lib}/*"
-Dlog4j.configurationFile=${bin}/log4j2.xml
org.xbib.tools.Runner
org.xbib.tools.JDBCImporter`

i want to format this three date Type,but it doesn't worked,still
"format" : "strict_date_optional_time||epoch_millis"

YangFangXin avatar Apr 08 '20 16:04 YangFangXin