You can translate the question and the replies:

Create BV with variable

Hello: I want to create a BV from a JDBC resource, and I have a csv, with some fields and I want to get the value of the variable from this CSV. the query is select name, address from people where country=@country and I have this CSV: | LANGUAGE | COUNTRY | | -------- | -------- | -------- | | spanish | Spain | | english | England | | spanish | Cuba | And In this example I want to get only the countries where the language is spanish
user
13-11-2019 12:49:29 -0500

1 Answer

Hi, From your question, it is understood that you have a JDBC data source and a CSV data source. Your requirement is to select the fields of the JDBC data source whose data should retrieve only the countries where the language is Spanish. To do that, please follow the below steps, * Create a [JDBC data source](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#importing-jdbc-sources) and [create a Base view](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-a-jdbc-data-source) (say, people_jdbc) of your table. * Create a [Delimited File data source](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_data_sources_and_base_views/delimited_file_sources/delimited_file_sources#delimited-file-sources) for the CSV file and create a Base view (say, people_csv). * [Create a JOIN view](https://community.denodo.com/docs/html/browse/7.0/vdp/administration/creating_derived_views/creating_join_views/creating_join_views#creating-join-views) of the two Base views created based on the condition (people_jdbc.country=people_csv.country) and add a where condition people_jdbc.language=’spanish’. * Once done, Save the view and execute to check if view results are as expected. Hope this helps!
Denodo Team
14-11-2019 06:04:52 -0500
You must sign in to add an answer. If you do not have an account, you can register here