Hello i am using the azure maps Geocoding API to extract lat lon information from address from flat files loaded into a datalake – i have been getting a type mismatch error when i try to use the function ‘toDecimal(body.results1.position.lon)’ in the derived column ( data flow task in ADF)
The error says "No field named results in the hierarchial structure. Thank you for your help
2
Answers
When you don’t import the schema of the body in the external call transformation, you will get this kind of errors.
Before importing schema:
To resolve it, delete the next transformations after the externalCall and first import the schema of the body in the externalCall transformation.
The schema will be generated dynamically in the
Type
of the body. Now, create the columns in the derived column and you can see the error got resolved and it will give the desired result.It looks like you are trying to get the coordinates of the second result, not the first (arrays are zero index). In that case, it’s possible that there isn’t a second result (especially if you are doing street addresses), and thus
toDecimal
is getting null or undefined as an input.