Extract String from Spark DataFrame

66 views Asked by At

I have a supposedly simple problem that I've been stuck on for a while. My DataFrame has this schema:

root
 |-- _id: string (nullable = true)
 |-- created: timestamp (nullable = true)
 |-- geometry: struct (nullable = true)
 |    |-- coordinates: string (nullable = false)
 |    |-- type: string (nullable = false)

How do I extract the 'coordinates' and 'type' strings? (I know they shouldn't be strings but I'm looking to change them after isolating)

I'm using Databricks 3.0, Spark 2.2. Thank you!

0

There are 0 answers