to_csv
function
Applies to: Databricks SQL Databricks Runtime
Returns a CSV string with the specified struct value.
Syntaxâto_csv(expr [, options] )
Argumentsâ
expr
: A STRUCT expression.options
: An optional MAP literal expression with keys and values being STRING.A STRING.
See from_csv
function for details on possible options
.
SQL
> SELECT to_csv(named_struct('a', 1, 'b', 2));
1,2
> SELECT to_csv(named_struct('time', to_timestamp('2015-08-26', 'yyyy-MM-dd')), map('timestampFormat', 'dd/MM/yyyy'));
26/08/2015
Related functionsâ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4