schema_of_csv
function
Applies to: Databricks SQL Databricks Runtime
Returns the schema of a CSV
string in DDL
format.
Arguments
csv
: ASTRING
literal with validCSV
data.options
: An optionalMAP
literals where keys and values areSTRING
.
Returns
A STRING
composing a struct.
The field names are derived by position as _Cn
.
The values hold the derived formatted SQL types.
For details on options see from_csv function.