Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

Rising Star

Hi,

have you tried with

\d table_name

from the psql command line?

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>>;??

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
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.