Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Returns the schema of a CSV string in DDL format.
Syntax
schema_of_csv(csv [, options] )
Arguments
csv: ASTRINGliteral with validCSVdata.options: An optionalMAPliterals 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 a complete list of options, see CSV.
Examples
> DESCRIBE SELECT schema_of_csv('1,abc');
STRUCT<`_c0`: INT, `_c1`: STRING>