You can translate the question and the replies:

Can we variabilize the connection string of jdbc and use to other query ?

Hello, I have some database ( more than 100 ) with different name but the same table name. I would like to have into my column after each base view created a database "unique id" on each base view. For my use case, I would like to union all my base view from all database with same name but the problem is I can have dup row. Further I want to create more dynamic view with dynamic "variable". I already see the doc for get_var and set_var but not really understand how its work.. Thanks for help
user
03-05-2022 10:23:50 -0400

3 Answers

Hi When a union view is created, the output tab contains only the unique fields. Hence, you will not get any duplicate fields when you create a union view upon all the base views from all the databases with the same name. Regarding creating dynamic base views, you could create base views using the option ‘create from query’ option with interpolation variable. For more information, you can have a look at the section [Creating Base Views from SQL Queries](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-sql-queries) of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
04-05-2022 08:02:48 -0400
Hi and thanks The interpolation string can only be used for url ? how can I use this for create or alter my view ? For exemple my database a,b,c, ...x have 200 tables each, and I want to "union" my table 1 from database a with table 2 and db b and table3 and db c ... etc... What should the best solution ? Thank you for helping
user
04-05-2022 10:14:53 -0400
Hi In general, when using the** 'Create from Query**' option, the SQL query may have interpolation variables that allow the SQL query sent to the database to be parameterized according to the specified query conditions. You could refer to the section [Creating Base Views from SQL Queries](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-sql-queries) of the Virtual DataPort Administration Guide for more information. Regarding creating a dynamic Union view, I would follow the steps mentioned below: * Create a self-referential JDBC data source for the VDP server. * Now, use the 'Create from query' option to create a base view using the **SELECT UNION** statements in the query with an interpolation parameter. For your information, you can have a look at the section [UNION Clause](https://community.denodo.com/docs/html/browse/8.0/en/vdp/vql/queries_select_statement/union_clause/union_clause#union-clause) of the Virtual DataPort VQL Guide. If you need further assistance and if you are a valid support user, you could create a support case in [Denodo Support Site](https://support.denodo.com/) so that our support team will assist you. Hope this helps!
Denodo Team
06-05-2022 04:14:37 -0400
You must sign in to add an answer. If you do not have an account, you can register here