UP10050 Materialized View illegal column expression

Possible Causes

  • You tried to create a MATERIALIZED VIEW and the select statement contained an illegal expression such as *.

For example:

CREATE SYNC MATERIALIZED VIEW default_glue_catalog.database_16e31b.physical_store_orders_materialized_view_t AS 
    SELECT orderid,*
    FROM default_glue_catalog.database_16e31b.orders_raw_data
    GROUP BY orderid;

Possible Solutions

  • Define one or more key columns and use those in the GROUP BY. Define additional aggregated columns using one of the aggregated functions.

For example:

CREATE SYNC MATERIALIZED VIEW default_glue_catalog.database_16e31b.physical_store_orders_materialized_view_t AS 
    SELECT orderid, 
       LAST(saleinfo.store.location.country) as country,
       LAST(saleinfo.store.location.name) as name,
       LAST(saleinfo.store.servicedby.employeeid) as employeeid,
       LAST(saleinfo.store.servicedby.firstname) as firstname,
       LAST(saleinfo.store.servicedby.lastname) as lastname
    FROM default_glue_catalog.database_16e31b.orders_raw_data
    GROUP BY orderid;

Last updated