I would like to know how I can get the metadata of an object in a Vertica database; like metadata of a table. Is there any table that stores the metadata of objects (functions, views, tables) in Vertica Database.
For example in Oracle, I could type the following and get a detailed description of tables or see the code of a procedure.oracle :> desc table_name;
or
oracle :> edit proc_name;
I know that I can see the tables from my schemas with \dt
command, but is there any way I can see the DDL statements that created the objects?
Each user session has a search path of schemas. Vertica uses this search path to find tables and user-defined functions (UDFs) that are unqualified by their schema name. You can use the CURRENT_SCHEMA function to display the name of the current schema (i.e., the first “valid” schema in the user's search path).
Oracle Database provides information about all of the tables, views, columns, and procedures in a database. This information about information is known as metadata. It is stored in two locations: data dictionary tables (accessed via built-in views) and a metadata registry.
Tables in Vertica are logical entities and they don't store actual data. Data for tables are stored in projections (a kind of object in Vertica).
Thanks, but this is not what I want. I was looking for is the export_objects()
function:
select export_objects('','object_name')
This way you will get the creation script for the object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With