Vertica – Export DDL statements for objects

Useful function for exporting individual DDL for objects or multiple

EXPORT_OBJECTS

Syntax

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

Examples

--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)
Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: