Adding column as StructType
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 11:24 PM
Hi Team,
Just wondering, how can I add a column to an existing table.
I'd tried the below script but giving me an error:
ParseException:
[PARSE_SYNTAX_ERROR] Syntax error at or near '<'(line 1, pos 121)
ALTER TABLE table_clone ADD COLUMNS col_name1 STRUCT<
-------------------------------------------------------------------------------------------------------------------------^^^
$type:STRING,
$values:ARRAY<STRING>
>
ALTER TABLE table_clone
ADD COLUMNS col_name1 STRUCT<
$type: STRING,
$values: ARRAY<STRING>
>Cheers,
G
Labels:
- Labels:
-
ALTER TABLE Table
-
Structtype