0
votes

I'm trying to create a U-sql table from two tables using Create table as select (CTA's) as below -

DROP TABLE IF EXISTS tpch_query2_result;

CREATE TABLE tpch_query2_result 
(
  INDEX idx_query2
  CLUSTERED(P_PARTKEY ASC)
  DISTRIBUTED BY HASH(P_PARTKEY)
) AS
  SELECT 
a.P_PARTKEY
  FROM part AS a INNER JOIN partsupp AS b ON a.P_PARTKEY == b.PS_PARTKEY;

But while running the U-sql query im getting the below error -

E_CSC_USER_QUALIFIEDCOLUMNNOTFOUND: Column 'P_PARTKEY' not found in rowset 'a'.
Line 11
E_CSC_USER_QUALIFIEDCOLUMNNOTFOUND: Column 'PS_PARTKEY' not found in rowset 'b'.

Not sure about the error. Can someone provide some insights on this error.Thanks

1

1 Answers

1
votes

The error normally indicates that the specified column does not exists in the specified rowset referenced by a (i.e., part) or b (i.e., partsupp). What is the schema of either of these tables? do they have columns of the expected names?