Page 2 of 3

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 5:17 pm
by dbmsuser7
sKwa wrote,
and what if schema is bigger than 65000 chars in v6 for example?
For what it's worth, I did the dump directly in vsql, and it's about 82,000 chars. Does that explain why pyodbc can't do it?

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 8:03 pm
by id10t
Hi!

[DELETED]

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 9:58 pm
by id10t
Hi!

[DELETED]

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 10:10 pm
by dbmsuser7
Thanks, sKwa!

Yes, my workaround also involved using vsql directly. I didn't want to do it that way, because we already have a nice set of wrappers set up for pyodbc, but the vsql solution (which we've used for some other stuff) isn't too ugly or anything.

Best wishes,

S

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 10:24 pm
by id10t
Hi!

[DELETED]

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 10:47 pm
by dbmsuser7
Yeah, we have a small codebase where we use tricks like that. Though then there's issues like connecting to the host in the cluster where the stuff was dumped. So what's easiest and reliable seems to depend on the context. (Specifically, the host from which we run all the python stuff has vsql and pyodbc, but it's not the Vertica cluster.)

For me the vsql method was appealing because I just pulled some code that had already been written, and tweaked it to capture standard out.

...adding on edit: I wonder if it would be possible to create a table that consists of a single column belonging to a really large text datatype, then INSERT INTO that table by SELECTing the EXPORT_OBJECTS(), and then retrieve that using pyodbc. Meaning, I'm guessing the problem is that maybe the data type of the result from EXPORT_OBJECTS() isn't really specified in advance, and pyodbc picks something large but not large enough...

Re: pyodbc: export_objects returns nothing for schema

Posted: Wed Feb 26, 2014 11:07 pm
by NorbertKrupa
What's the use case here? Perhaps there's another way to go about your problem.