Код: Выделить всё
spark.sql("""
SELECT
data.data.location.geometry.coordinates[0]
FROM df""")
Код: Выделить всё
df.select("data.data.location.geometry.coordinates[0]")
Код: Выделить всё
AnalysisException: [DATATYPE_MISMATCH.UNEXPECTED_INPUT_TYPE] Cannot resolve "data.data.location.geometry.coordinates[0]" due to data type mismatch: Parameter 2 requires the "INTEGRAL" type, however "0" has the type "STRING".;
'Project [data#680.data.location.geometry.coordinates[0] AS 0#697]
+- Relation [data#680,id#681,idempotencykey#682,source#683,specversion#684,type#685] json
'.' есть ли ярлык getField для нарезки массива?
Спасибо за понимание
Подробнее здесь: https://stackoverflow.com/questions/786 ... m-shortcut