Vertica – Export DDL statements for objects

Useful function for exporting individual DDL for objects or multiple



EXPORT_OBJECTS( [ 'destination' ] , [ 'scope' ] , [ 'ksafe' ] )


--if directory selected then regardless of node this is run on, file writes to node 1
SELECT EXPORT_OBJECTS('/tmp/DDL.sql','schema.id_b0,schema.id_b1',true)
--keep directory NULL to write to screen
SELECT EXPORT_OBJECTS('','schema.events_id_b0,schema.events_id_b1',true)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: