I have the following schema:
root
|-- id: string (nullable = true)
|-- text: string (nullable = true)
|-- user: string (nullable = true)
How can I create StructType schema from this String?
I know that I can use .schema() method in my Dataset but I asking If its possible to create Schema from string.
StructType/StructFieldstructure. If you are the one who generates the string then it is XY-problem and much better ways of exporting and manipulating schema representation. In that case please edit your question, and the context.