Advertisement
JBOliveira

Struct - after

Dec 22nd, 2021 (edited)
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.76 KB | None | 0 0
  1. SCHEMA = StructType([
  2.     StructField('Foo', StringType()),
  3.     StructField('TimeA', TimestampType()),
  4.     StructField('ListOfItems', ArrayType(StructType([
  5.         StructField('Bar', StringType()),
  6.         StructField('Item', StructType([
  7.             StructField('TimeB', TimestampType()),
  8.             StructField('Baz', StringType()),
  9.         ])),
  10.     ]))),
  11.     StructField('ComplexStruct', StructType([
  12.         StructField('ComplexLevel1', StructType([
  13.             StructField('TimeC', TimestampType()),
  14.             StructField('Field', StringType()),
  15.             StructField('ComplexLevel2', StructType([
  16.                 StructField('TimeD', TimestampType()),
  17.             ])),
  18.             StructField('Foo', IntegerType()),
  19.         ])),
  20.     ])),
  21. ])
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement