You can translate the question and the replies:

List of All DataSource

Hi team, I am using Denodo 8.0 version where I want to see details of all the DataSource created in my server.For which I tried this option 'DESC DATASOURCE <datasource_type> <datasource_name>‘, but in this I have to give one datasource name at one time and then it gives me details about that. Do we have any other option like table or procedure which can give me details of all DataSources like Name of DataSource, Coneection URI , UserName , Type in one go for all the datasources created. Also , I have checked that we have DataSourceManagementInfo MBean which contains all details about the datasource.Can you tell me how to use this Mbean. Where I can find this or execute this so that I can get the details.
user
24-01-2023 05:59:48 -0500
code

4 Answers

Hi, I was able to retrieve the datasource details of all the Datasource created in my server under a particular database by following the below steps, • Navigated to the Create from Query option and Created a view using the Denodo Predefined Stored Procedure [GET_ELEMENTS](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/stored_procedures/predefined_stored_procedures/get_elements). • Below is the query used to create the above view > select * from get_elements() where type='datasource' and subtype IN ('jdbc','odbc','json','df','xml','ldap') This created view returns information about any element: data sources, views, Web services, etc. Followed by this created an another view which retrives the datasource information like databaseuri, driverclassname by following the below steps, 1. Create a JDBC data source and choose the database adapter: Denodo Virtual DataPort 8.0. Specify the Denodo server configuration details. 2. From the Create from Query option, I created a view by specifying the below query > desc datasource jdbc @database_name.@datasource_name 3.Specify the value for the interpolation variables and saved the view. 4.Navigate to the Options -> Search methods -> wrapper source configuration of the base view and set the option "Delegate SQL sentence as subquery" to "No" 5.Next, created a join view by joining the above created views while the join condition matches the field (datasource_name )and the (name) of the created views. Upon executing this view, I was able to get the expected result. Please note that DESC DATASOURCE does not have a consolidated command for all types of data sources. For example we have the following commands for JDBC, ODBC and delimited file data sources. DESC DATASOURCE JDBC <data source name> DESC DATASOURCE ODBC <data source name> DESC DATASOURCE DF <data source name> You could refer to the [Output Schema of the DESC Commands](https://community.denodo.com/docs/html/browse/latest/en/vdp/developer/appendix/output_schema_of_the_desc_commands/output_schema_of_the_desc_commands) section of the Virtual DataPort Guide for detailed information. Further regarding the **DataSourceManagementInfo Mbean**, you could retrieve specific datasource information with the help of the Java Management Extensions (JMX) Agent. For more information you could refer to this [Java Management Extensions (JMX) Agent](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/monitoring_the_virtual_dataport_server/monitoring_with_a_java_management_extensions_jmx_agent/monitoring_with_a_java_management_extensions_jmx_agent) section of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
25-01-2023 07:56:44 -0500
code
Hi team, I tried your option but not able to get the desired result.Can we have a call so that I can show you the issue and we can resolve it.Please let me know so that I can arrange a call for the same.
user
26-01-2023 06:50:38 -0500
Hi, For further assistance and if you are a valid support user then you could raise a support case on [Denodo Support Site](https://support.denodo.com/MainPage.do ) so that our support team can help you. Hope this helps!
Denodo Team
30-01-2023 07:39:57 -0500
code
So here are the steps that you can follow. 1) Create a base view from query using this desc command - desc datasource df "@database_name"."@datasource_name". Here @ are the parameters. Lets say the name of the base view is - bv_denodo_df_datasources. Follow the process mentioned by Denodo team in the first thread of the answer. 2) Use get_elements() to filter out the type = datasource and subtype = df and then join this bv with the columns of the get_elements(). Here is a sample query, you can use. CREATE OR REPLACE VIEW dv_denodo_df_datasources FOLDER = '/3 derived views' AS with dsdf as(SELECT bv_denodo_df_datasources.name AS name, bv_denodo_df_datasources.begindelimiter_0 AS begindelimiter_0, bv_denodo_df_datasources.enddelimiter_0 AS enddelimiter_0, bv_denodo_df_datasources.columndelimiter_0 AS columndelimiter_0, bv_denodo_df_datasources.endoflinedelimiter_0 AS endoflinedelimiter_0, bv_denodo_df_datasources.headerpattern_0 AS headerpattern_0, bv_denodo_df_datasources.tuplepattern_0 AS tuplepattern_0, bv_denodo_df_datasources.dataroute_0 AS dataroute_0, bv_denodo_df_datasources.database_name AS database_name, bv_denodo_df_datasources.datasource_name AS datasource_name FROM bv_denodo_df_datasources) SELECT ge.database_name,ge.name ds_name,ge.subtype ds_type,dsdf.dataroute_0 ds_uri,'' ds_classname,''ds_platform,''ds_server,concat('{"dataroute":','"',dsdf.dataroute_0,'"}') ds_properties, ge.user_creator,ge.last_user_modifier,ge.create_date,ge.last_modification_date,ge.description,ge.folder,ge.base_view_type FROM GET_ELEMENTS() ge left outer join dsdf on ge.database_name = dsdf.database_name and ge.name = dsdf.datasource_name where ge.type = 'datasource' and ge.subtype = 'df' Hope this helps. This is working and I have tested that.
user
30-08-2023 02:31:16 -0400
You must sign in to add an answer. If you do not have an account, you can register here