You can translate the question and the replies:

Getting Source Tables and Columns of a Datasource through Query

Hi Denodo team, Are there any queries to get all the tables in the datasource and also columns in a datasource for a specified table. I have seen that GET_SOURCE_TABLE() procedure is giving table but it takes view name as a parameter,but I don't want to give view as parameter,but only datasource name as parameter. Any help is highly appreciated. Thanks, Kranthi kiran.
user
13-10-2020 04:41:34 -0400

1 Answer

Hi I would use a join operation between the stored procedures GETSOURCECOLUMNS(), GETSOURCETABLE() and GETVIEWS() to pass all view names of a database and achieved the desired information. You could take a look at a similar question asked [here](https://community.denodo.com/answers/question/details?questionId=9060g000000kAyrAAE&title=Meta+data+information+-+SP%C2%B4s+get_source_table%28%29+and+GET_SOURCE_COLUMNS%28%29). You can also take a look at [Predefined stored procedures](https://community.denodo.com/docs/html/browse/latest/vdp/vql/stored_procedures/predefined_stored_procedures/predefined_stored_procedures) Virtual DataPort guide for more details on these and similar procedures. You could also use [GET_JDBC_SOURCE_TABLES](https://community.denodo.com/docs/html/browse/latest/vdp/vql/stored_procedures/predefined_stored_procedures/get_jdbc_datasource_tables) stored procedure to get the tables in the underlying data source. It accepts data source name as an input parameter. You can use [GET_VIEW_COLUMNS](https://community.denodo.com/docs/html/browse/latest/vdp/vql/stored_procedures/predefined_stored_procedures/get_view_columns) stored procedure to get information on all the columns of a view. The view accepts database name (denodo database) and view name as parameter but both are optional and can be set to null. If they are set to null column details of all the views are returned. Note that table and column details of JDBC data sources only are returned.* Hope this helps!
Denodo Team
14-10-2020 06:23:36 -0400
You must sign in to add an answer. If you do not have an account, you can register here