Hi, I am writing a UDF to convert parts of geoJson to other representation.
Having a query like this:

 select json.features.geometry as geoJson from (select FLATTEN(features) as 
features from dfs.`/home/k255/CA-cities.json`) json limit 2;

and result:

 {"type":"Point","coordinates":[-121.2785588,38.1746398]}
 {"type":"Point","coordinates":[-121.9591252,37.3946626]}

I need to pass the output (which is map) to UDF which expects string 
(VarCharHolder) to pass it to other function inside.
Is there a way in drill (other than handling FieldReader) to convert this part 
of a json object to string like this:

 '{"type":"Point","coordinates":[-121.2785588,38.1746398]}'
 '{"type":"Point","coordinates":[-121.9591252,37.3946626]}'

?

Thanks,
Karol Potocki

Reply via email to