Hello
In a dataflow with a CSV source and CosmosDB sink I want to map the Long/Lat fields to a point array in CosmosDB so I can use geospatial queries.
It should look like this:
"location":{
"type":"Point",
"coordinates":[ 0.1055987, -4.8 ]
}
When I first did this the mapping retained the values as strings (so ["0.1055987", "-4.8" ]) and the geospatial queries didn't work - which I believe is because the values need to be numbers, not strings.
However when I try and convert the values to either decimals or floats (eg toFloat(LONGITUDE, '##.#######') ) I get this error when the data flow runs: Cannot cast 0.1055987 into a Json value. FloatType has no matching Json
I get the same error for decimals.
The Long/Lat values are decimals eg 0.1055987
Any help would be appreciated!