You can translate the question and the replies:

Passing interpolation variable as default value in selection field of derived view.

Hi, I would like to know how to use the interpolation varaible in selection field of the query for example : create or replace view_sample as select table1.*,@ interpolation_var * 1000 as calc1 from table 1. The variable @interolation_var should be passed dynamically all the time when the interface view is executed implemnted by view_sample.You help is appreciated.
user
21-07-2021 19:28:17 -0400

2 Answers

Hi, For your scenario, you could use the **View Parameters** option of derived views for passing the value for a field dynamically. You can add this option either using the GUI or use it in the view definition like below: >CREATE OR REPLACE VIEW iv_student AS SELECT id, name, dept FROM bv_student USING PARAMETERS ( id : int ); This will create a new field "id" whose value should be passed dynamically during execution(everytime the user runs the query). For detailed information, take a look at the [Parameters of Derived Views](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_selection_views/creating_selection_views#parameters-of-derived-views) section of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
22-07-2021 07:35:17 -0400
Thank you, It works. If i need to cache this view and schedule the job in scheduler to pre-load te cache, how shoud I pass the parameter for this view through scheduler.
user
22-07-2021 17:16:22 -0400
You must sign in to add an answer. If you do not have an account, you can register here