Hi guys I am new to GeoMesa. And trying to import my MySQL table to it. As given on their http://www.geomesa.org/documentation/user/commandline_tools.html website.
To ingest a .csv file, a SimpleFeatureType named renegades and a converter named renegades-csv can be placed in the application.conf file:
geomesa {
sfts {
renegades = {
attributes = [
{ name = "id", type = "Integer", index = false }
{ name = "name", type = "String", index = true }
{ name = "age", type = "Integer", index = false }
{ name = "lastseen", type = "Date", index = true }
{ name = "friends", type = "List[String]", index = true }
{ name = "geom", type = "Point", index = true, srid = 4326, default = true }
]
}
}
converters {
renegades-csv = {
type = "delimited-text"
format = "CSV"
options {
skip-lines = 1 //skip the header
}
id-field = "toString($id)"
fields = [
{ name = "id", transform = "$1::int" }
{ name = "name", transform = "$2::string" }
{ name = "age", transform = "$3::int" }
{ name = "lastseen", transform = "date('YYYY-MM-dd', $4)" }
{ name = "friends", transform = "parseList('string', $5)" }
{ name = "lon", transform = "$6::double" }
{ name = "lat", transform = "$7::double" }
{ name = "geom", transform = "point($lon, $lat)" }
]
}
}
}
But the problem is that:
- I can't find any tutorial or help on how to make this file some of the datatype has been given in above example. But some of my sql DB values are varchar, tinyint, float and datetime. Now, what datatype in GeoMesa is similar to these datatype both for renegade and converters.
- And also when to make index= true or false for renegades.