-
1. Re: Retreive metadata from a VDB data model
rareddy Mar 9, 2017 10:11 AM (in response to scheligaburt)Burt,
Each VDB comes with "SYS" model/schema, there is variety of information you can glean from these tables. Also if you are using JDBC driver, then JDBC metadata layer can also provide lot of this information.
Ramesh.. -
2. Re: Retreive metadata from a VDB data model
scheligaburt Mar 12, 2017 8:07 AM (in response to scheligaburt)Thank you Ramesh!
-
3. Re: Retreive metadata from a VDB data model
funknor Apr 4, 2017 1:46 PM (in response to scheligaburt)here is a query, that I use against any given VDB (see below), it returns a flat list of schema (model), tables and column with types as an example
SELECT
n.nspname,
c.relname,
a.attnum AS ordinal_position,
a.attname AS column_name,
t.typname AS data_type,
a.attlen AS character_maximum_length,
a.atttypmod AS modifier,
a.attnotnull AS notnull,
a.atthasdef AS hasdefault
FROM pg_class c,
pg_attribute a,
pg_type t,
pg_namespace n
WHERE a.attnum > 0
AND a.attrelid = c.oid
AND a.atttypid = t.oid
AND c.relnamespace = n.oid
ORDER BY
n.nspname,
c.relname,
a.attnum
I have tried this against VDB importing other VDB, having oracle data sources and also Excel data sources