pyodbc: export_objects returns nothing for schema

Moderator: NorbertKrupa

dbmsuser7
Intermediate
Intermediate
Posts: 71
Joined: Tue Jan 28, 2014 3:03 am

pyodbc: export_objects returns nothing for schema

Post by dbmsuser7 » Tue Feb 25, 2014 9:13 pm

Anyone have any idea why running the query

Code: Select all

select export_objects('', 'myschema')

might fail to return any rows, even if

Code: Select all

select export_objects('', 'myschema.mytable')

does return a row?
Last edited by dbmsuser7 on Wed Feb 26, 2014 10:13 pm, edited 1 time in total.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: pyodbc: export_objects returns nothing for schema

Post by NorbertKrupa » Tue Feb 25, 2014 9:41 pm

It may have to do with permissions and/or if there is a schema & table with the same name.
Checkout vertica.tips for more Vertica resources.

dbmsuser7
Intermediate
Intermediate
Posts: 71
Joined: Tue Jan 28, 2014 3:03 am

Re: pyodbc: export_objects returns nothing for schema

Post by dbmsuser7 » Tue Feb 25, 2014 10:34 pm

Thanks for your reply.

I'm positive I have the name right, since the same command works in VSQL, and I also get the name by just deleting '.table' in the string 'schema.table', for which it works.

As for permissions, I'm running as the db superuser.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: pyodbc: export_objects returns nothing for schema

Post by NorbertKrupa » Tue Feb 25, 2014 10:50 pm

If you run the command through vsql and get the expected results, and not with pyodbc, then it's a permissions issue.
Checkout vertica.tips for more Vertica resources.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: pyodbc: export_objects returns nothing for schema

Post by id10t » Tue Feb 25, 2014 11:23 pm

Hi!

[DELETED]
Last edited by id10t on Fri May 08, 2015 4:34 pm, edited 1 time in total.

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: pyodbc: export_objects returns nothing for schema

Post by NorbertKrupa » Wed Feb 26, 2014 12:04 am

Can you test the function the OP is referring to (export_objects) ?
Checkout vertica.tips for more Vertica resources.

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: pyodbc: export_objects returns nothing for schema

Post by id10t » Wed Feb 26, 2014 12:20 am

Hi!

[DELETED]
Last edited by id10t on Fri May 08, 2015 4:33 pm, edited 1 time in total.

Post Reply

Return to “Python”