0

I created a customers table with columns has account_id.cust_id, account_id.ord_id and so on. My create external table query was as follows:

CREATE EXTERNAL TABLE spectrum.customers
(
"account_id.cust_id" numeric,
"account_id.ord_id" numeric
) 
row format delimited
fields terminated by '^'
stored as textfile
location 's3://awsbucketname/test/';

SELECT "account_id.cust_id" FROM spectrum.customers limit 100 

and I get an error as :

Invalid Operation: column account_id.cust_id does not exists in customers.

Is there any way or syntax to write column names like account_id.cust_id (text.text) while creating the table or while writing the select query?

Please help.

PS: Single quotes, back ticks don't work either.

Paul R
  • 208,748
  • 37
  • 389
  • 560
Prajakta Yerpude
  • 215
  • 6
  • 20

0 Answers0