Programmatically get column lengths using vertica_python driver
Is it possible to run commands like "\d schema.table_name;" through vertica_python? I run into the following error indicating it doesn't like the leading backslash:
vertica_python.errors.VerticaSyntaxError: Severity: ERROR, Message: Syntax error at or near "\", Sqlstate: 42601, Position: 1, Routine: base_yyerror, File: /scratch_a/release/svrtar9988/vbuild/vertica/Parser/scan.l, Line: 1043, SQL: '\\d schema.table_name;'
I'm essentially trying to get the lengths of a few VARCHAR columns in my program. I could always put the command in a file, run "vertica -f my_file > out_file" and parse the out_file but I'm lookng for a better way.