EXPORT_CATALOG
Generates a SQL script for recreating a physical schema design on another cluster. This function always attempts to recreate projection statements with KSAFE
clauses, if they exist in the original definitions, or OFFSET
clauses if they do not.
Syntax
EXPORT_CATALOG ( '[destination]' [, 'scope' ] )
Parameters
If you omit all parameters, EXPORT_CATALOG
exports to standard output all schemas, tables, constraints, views, and projections to which the user has access.
destination
|
Specifies where to send output, one of the following:
- An empty string (
'' ) writes the script to standard output.
-
The path and name of a SQL output file. This option is valid only for . If you specify a file that does not exist, the function creates one. If you specify only a file name, Vertica creates it in the catalog directory. If the file already exists, the function silently overwrites its contents.
|
scope
|
Determines what to export:
DESIGN (default): Exports schemas, tables, constraints, views, projections, and SQL macros to which the user has access. See also EXPORT_OBJECTS .
DESIGN_ALL : Exports all design objects plus system objects created in Database Designer—for example, design contexts and their tables. Exported objects are those to which the user has access.
TABLES : Exports all tables and constraints for which the user has access. See also EXPORT_TABLES .
DIRECTED_QUERIES : Exports all directed queries that are stored in the database. For more information, see Managing Directed Queries in the Administrator's Guide.
|
Privileges
None
Example
See Exporting the Catalog.