Thanks Kevin,
That helps
regards
Eric


Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: "Xu, Kai-Hua (Kevin)" <[email protected]>
Date: 3/2/17 3:59 AM (GMT-06:00)
To: Eric Owhadi <[email protected]>
Cc: [email protected], [email protected]
Subject: RE: trafodion jdbc metadata related question

Hi Eric,

As you see, it’s true that some columns are hidden. Another way is to retrieve 
metadata table directly as follows:
--retrieve all columns
select c.* from "_MD_".objects o left join "_MD_".columns c on 
o.object_uid=c.object_uid where o.schema_name='ERIC' and o.object_name='TBL';
--retrieve all clustering key columns
select k.* from "_MD_".objects o left join "_MD_".keys k on 
o.object_uid=k.object_uid where o.schema_name=' ERIC' and o.object_name='TBL';


Best Regards,
Kevin Xu

From: Eric Owhadi [mailto:[email protected]]
Sent: Thursday, March 02, 2017 3:24 AM
To: [email protected]; [email protected]
Subject: trafodion jdbc metadata related question

Hello trafodioneers,
I am trying to use jdbc metadata api to retrieve the equivalent of what a 
showddl or invoke would provide in sqlci or trafci.

If I use

                                                DatabaseMetaData metadata = 
conn.getMetaData();
                                                ResultSet rs = 
metadata.getColumns("TRAFODION", "ERIC","TBL", "%");

The resulting resultset does not provide hidden columns. For example the 
“_SALT_” and “_DIVISION_1_”.

And when doing a
rs = metadata.getPrimaryKeys("TRAFODION",primarySchema, primaryTable);

the “_DIVISION_1_” column is returned, but not the _SALT_.

Any idea if it is possible to use jdbc to get same level of info I would get 
with showddl or invoke in SQLCI/trafci?

Thanks in advance for the help,
Eric

Reply via email to