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?and what if schema is bigger than 65000 chars in v6 for example?
pyodbc: export_objects returns nothing for schema
Moderator: NorbertKrupa
Re: pyodbc: export_objects returns nothing for schema
sKwa wrote,
Re: pyodbc: export_objects returns nothing for schema
Hi!
[DELETED]
[DELETED]
Last edited by id10t on Fri May 08, 2015 4:33 pm, edited 1 time in total.
Re: pyodbc: export_objects returns nothing for schema
Hi!
[DELETED]
[DELETED]
Last edited by id10t on Fri May 08, 2015 4:33 pm, edited 1 time in total.
Re: pyodbc: export_objects returns nothing for schema
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
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
Hi!
[DELETED]
[DELETED]
Last edited by id10t on Fri May 08, 2015 4:31 pm, edited 1 time in total.
Re: pyodbc: export_objects returns nothing for schema
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...
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...
Last edited by dbmsuser7 on Wed Feb 26, 2014 11:41 pm, edited 1 time in total.
-
- GURU
- Posts: 527
- Joined: Tue Oct 22, 2013 9:36 pm
- Location: Chicago, IL
- Contact:
Re: pyodbc: export_objects returns nothing for schema
What's the use case here? Perhaps there's another way to go about your problem.
Checkout vertica.tips for more Vertica resources.