Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

DDL create statement of HAWQ Table

Highlighted

DDL create statement of HAWQ Table

New Contributor

Hi,

Can anyone let me know how we can see DDL (Create Statement) of table in HAWQ.

Thanks,

Narendra

3 REPLIES 3

Re: DDL create statement of HAWQ Table

Rising Star

Hi,

have you tried with

\d table_name

from the psql command line?

Re: DDL create statement of HAWQ Table

New Contributor

Hi @Marco Gaido,

Yes.. but it will give basic table structure. Was there any way to see create statement with all other properties which it is holding.?

And, if possible can you help me with script to get all the table DDL's under schema in HAWQ.

Like we see in Hive -- show create table <<Table Name>>;??

Re: DDL create statement of HAWQ Table

Rising Star

What you can do is:

- list all tables in schema

\dt YOUR_SCHEMA.*

- and then get the create table for each of them via:

\d+ table_name
Don't have an account?
Coming from Hortonworks? Activate your account here