Information schemas constraints

Hi guys.
Is it possible to check the data source constraints by running a query?

For example, I can run this query SELECT * FROM INFORMATION_SCHEMAS.COLUMNS, but it “only” returns information about the columns. I’d like to know, for instance, wich column id my Primary Key; which columns are Foreign Keys, and so on.

Is it possible to do it in community edition?

Dremio doesn’t track this kind of information from your data source in Dremio’s catalog. Is there a particular use case you had in mind?

Hi @Paulo_Vasconcellos

To find out primary key, foreign key and check constraints you would need to query the respective source dictionary tables. For example if you have a table in Oracle, you may have to run the below query via sqlplus

select constraint_name, constraint_type from dba_constraints where table_name=‘DEPARTMENTS’;

Thanks
@balaji.ramaswamy

Thank you @balaji.ramaswamy and @kelly for the answers! I’ll do what Balaji suggested, by querying each source separately and create a VDS of each one. That will solve my problem.

Hi @Paulo_Vasconcellos

Let me know how it goes and if you are able to see the user_, dba_ tables or the information schema from Mysql etc

Thanks
@balaji.ramaswamy