Hi ,
1.Created a iceberg table with struct field:
CREATE TABLE t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
(Feild struct<CH_1 DOUBLE,CH_2 DOUBLE>);
2. Inserted the data into the struct field with Json string literals. It works
insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
SELECT CONVERT_FROMJSON(‘{“CH_1”:4.5,“CH_2”:5.5}’);
-
When used Named Struct to insert dint worked.
insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
select Named_struct(cast(4.5 as Double),cast(5.5 as Double));
Error: NAMED_STRUCT does not support operand types (DOUBLE,DOUBLE) -
columns are not supported.
insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
SELECT CONVERT_FROMJSON(concat(‘{“CH_1”:’,cast(CH_1 as Double), ‘,“CH_2”:’,cast(CH_2 as Double),‘}’)) from
t13345DataLake.“sandbox-dev”.test.data.“processed_default”;
error:
Using CONVERT_FROM(*, ‘JSON’) is only supported against string literals and direct table references of types VARCHAR and VARBINARY.
insert into t13345DataLake.“sandbox-dev”.test.data.“processed_struct_temp1”
select NAMED_STRUCT(cast(CH_1 as Double),cast(CH_2 as Double)) as field from t13345DataLake.“sandbox-dev”.test.data.“processed_default”;
error:
NAMED_STRUCT does not support operand types (DOUBLE,DOUBLE)
Is there any way to insert table columns into struct fields. Is struct field is functional in dremio?.
dremio version: 24.3.7-202406042011090043-c57dfdf8
Thanks,
Pavan