Notiz
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Iech unzemellen oder Verzeechnesser ze änneren.
Zougrëff op dës Säit erfuerdert Autorisatioun. Dir kënnt probéieren, Verzeechnesser ze änneren.
Returns the merged schema in the SQL format of a variant column.
Syntax
from pyspark.sql import functions as sf
sf.schema_of_variant_agg(v)
Parameters
| Parameter | Type | Description |
|---|---|---|
v |
pyspark.sql.Column or str |
A variant column or column name. |
Returns
pyspark.sql.Column: a string column representing the variant schema
Examples
from pyspark.sql import functions as sf
df = spark.createDataFrame([ {'json': '''{ "a" : 1 }'''} ])
df.select(sf.schema_of_variant_agg(sf.parse_json(df.json)).alias("r")).collect()
[Row(r='OBJECT<a: BIGINT>')]