Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is the “NOT NULL” key word not allowed in external table definition?

0
Posted

Is the “NOT NULL” key word not allowed in external table definition?

0

– External Table: ext_test DROP EXTERNAL TABLE ext_test; CREATE EXTERNAL TABLE ext_test ( a text not null, b integer ) LOCATION ( ‘gpfdist://22.104.102.102:8081/test1.txt’ ) FORMAT ‘csv’ (delimiter ‘,’ null ” escape ‘”‘ quote ‘”‘) ENCODING ‘GBK’; ALTER TABLE ext_test OWNER TO gpadmin; ERROR: syntax error at or near “not” LINE 7: a text not null, ^ ********** Error ********** ERROR: syntax error at or near “not” SQL state: 42601 Character: 103 Reply With Quote 12-28-2009 02:22 PM #2 Gavin Sherry View Profile View Forum Posts Member Join Date Nov 2009 Location France Posts 40 You’re right, it’s not allowed. Reply With Quote 12-29-2009 03:51 PM #3 tmorley View Profile View Forum Posts Private Message Junior Member Join Date Nov 2009 Location Kansas City Posts 12 You’ve probably already noticed this but the Admin Guide shows that you can use the FORMAT NULL [AS] ‘null string’ option when defining the external table so that you can quickly identify null values.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123