export_objects function not working?

Moderator: NorbertKrupa

Post Reply
User avatar
Josh
Intermediate
Intermediate
Posts: 106
Joined: Thu Jan 26, 2012 9:38 pm

export_objects function not working?

Post by Josh » Thu Dec 01, 2016 4:52 pm

Hey,

I am trying to use the export objects function to get the code to create a table. But when I run it, I don't get the code.

This is what I am doing

Code: Select all

dbadmin=> \dt default_data;
                  List of tables
 Schema |     Name     | Kind  |  Owner  | Comment
--------+--------------+-------+---------+---------
 public | default_data | table | dbadmin |
(1 row)

dbadmin=> select export_objects('','default_data');
                        export_objects
---------------------------------------------------------------
 CREATE SCHEMA default_data;




SELECT MARK_DESIGN_KSAFE(0);

(1 row)
Thank you!
Joshua

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: export_objects function not working?

Post by JimKnicely » Thu Dec 01, 2016 5:33 pm

Do you have a schema named "default_data"? I bet you do, and that is what the EXPORT_OBJECTS function is referencing :)

Just add the schema "PUBLIC" to your command:

select export_objects('','public.default_data');
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

User avatar
Josh
Intermediate
Intermediate
Posts: 106
Joined: Thu Jan 26, 2012 9:38 pm

Re: export_objects function not working?

Post by Josh » Thu Dec 01, 2016 10:24 pm

Heh heh. That was it! Thanks for that :oops:
Thank you!
Joshua

Post Reply

Return to “New to Vertica”