You can translate the question and the replies:

How to read Input parameters from HANA Calculated View in Denodo

Hello All, I am new to Denodo and we have a requirement to build Denodo API on top of HANA calculated view which is parameterised. When I selected the calculated view and created base query on top of it, I did not see any input parameters like we would see for any SQL Stored Procedure. The HANA Calculated View is created on some base tables which holds 160 million of records. HANA team have built the calculated view with Input parameter on a Date field, so that if there is a Denodo service call with Date value then it should be passed as Input parameter to the Calculated View rather than as Where Clause. **Note:** Sending Where clause to the Calculated View will be too expensive as it will filter on entire 160 million data. That is the reason HANA team have created Calulated View on those base tables with Input parameter as Date field, so that whenever there Denodo service call, the calulated view should bring only required rows Can anyone help here! Thanks in Advance!
user
11-08-2021 01:55:50 -0400

1 Answer

Hi, For your scenario, I would use the[ Interpolation Variables](https://community.denodo.com/docs/html/browse/latest/en/vdp/vql/advanced_characteristics/execution_context_of_a_query_and_interpolation_strings/execution_context_of_a_query_and_interpolation_strings#execution-context-of-a-query-and-interpolation-strings) and [View Parameters](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views#parameters-of-derived-views) available in Virtual DataPort in order to filter the data based on the values obtained during runtime. With “Create from query” option I would provide any possible** sample values** as the value for interpolation Variable in the dialog that asks us to enter the value of the variable. It is mandatory to provide sample values for the parameters defined as **interpolation variables** because the server will use these values to query the source and calculate the schema of the new base view. For more information, you can have a look at the sections[ Creating Base Views from SQL Queries](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/jdbc_sources/jdbc_sources#creating-base-views-from-sql-queries) and[ Paths and Other Values with Interpolation Variables](https://community.denodo.com/docs/html/browse/latest/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
12-08-2021 00:00:47 -0400
You must sign in to add an answer. If you do not have an account, you can register here