trying to get view ddl using python

Moderator: NorbertKrupa

Post Reply
sldahlin
Newbie
Newbie
Posts: 3
Joined: Fri Dec 27, 2013 5:48 pm

trying to get view ddl using python

Post by sldahlin » Tue Apr 28, 2015 10:05 pm

We have a need to get the ddl for a view using python. However it comes back empty using select export_objects() since the view is apparently too large for the buffer. Thought about chunking thru the ddl using substr sections but cannot use substr on the meta function export_objects. Then thought perhaps use v_internal.vs_views the view_definition but it is truncated at 8192 bytes. Some where underlying the complete ddl is stored. Is there anyway to output that using an sql query that gets around the problems using export_objects()?

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

Re: trying to get view ddl using python

Post by NorbertKrupa » Wed Apr 29, 2015 3:18 am

What driver are you using?
Checkout vertica.tips for more Vertica resources.

sldahlin
Newbie
Newbie
Posts: 3
Joined: Fri Dec 27, 2013 5:48 pm

Re: trying to get view ddl using python

Post by sldahlin » Wed Apr 29, 2015 4:06 pm

Using the odbc driver that comes with vertica 7.0.0.0: libverticaodbc.so

Post Reply

Return to “Vertica SQL Functions”