Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi! Team,
I have requirement of fetching data from HANA Calc view. However it is mandatory to pass input parameter to generate data set. The data set is very huge and there are multiple set of parameters. So to provide flexibility and ease to user rather going with QVD generation i decided to go with ODAG approach. Although i am kindl of stuck what to include in template app and selection app.
I wrote something like this in my template app. But now i need some help what to do with my selection help.
UData:
Load
*
where match([StartDate], $(ODAG_START_DATE)) and match([Month], $(ODAG_MONTH)) and match ([period], $(ODAG_Period));
sql select
StartDate,
Month,
period,
product
from "_sys_bic"."folder/cv_name"
('PLACEHOLDER' = ('$$IP_START_DATE$$', '$(ODAG_START_DATE)'),
('PLACEHOLDER' = ('$$IP_Month$$', '$(ODAG_Month)'),
('PLACEHOLDER' = ('$$IP_LAG$$', '$(ODAG_LAG)'))
Group by
StartDate,
Month,
period,
product
The above script is to fetch data from HANA calc view. After doing this I created a new app navigation link by going to Sheets for binding ODAG.
Now what should i do with my selection app. I can not point it to any qvd as I am not creating any. Is it possible to fetch data from another app? Also when i am running the app it is getting errored out as there is not value for the input parameter is provided.
kindly help.
Thanks
For your Selection app, you need to provide the values the user will select from in order to run the Template app. This can be directly from the database, from a QVD, autogenerated, or from any other source. In your example, it would be the possible values for START_DATE, MONTH, and LAG, seemingly.
In the Template app, you basically use the same code you already have for the Load script, but the specifics depend on whether or not users can select multiple values in these fields or a single value and what you want to compare these values to. You will also want to pass these to the underlying query, presumably - this is typically something like:
Where DatabaseLagFieldHere = '$(ODAG_LAG)' // For a single value, otherwise use In rather than =
If you want to run the Template app directly, you'll need to provide values for cases where it's not run via ODAG - see https://help.qlik.com/en-US/sense/February2023/Subsystems/Hub/Content/Sense_Hub/LoadData/creating-On... for an example of how to do this.
Once you have both of these set up, you should be okay to go, though you may need to mess around with the quotes and separators. This is all covered in the documentation, though, so I'd recommend using that.
Well! Thanks for the reply but that will not work in my case. My ask is to pass input parameter to hana cv dynamically.
So for Date, Month and Lag fields user will pass an integer value from selection app vizualization.
I am struggling to figure out the way.
First I though of creating a qvd for all the combination of the input parameter for above fields. And thn loading selection app from that QVD. However there are 24 Months and 12 date and lags each. So there will be 3456 combination. And to loop through all this combinations to generate the qvd it is taking hell lot of a time.
Kindly suggest better way to achieve this ask.
TIA
M
3456 is not a lot of combinations, but regardless you don't actually need to create combinations, only the individual component fields. This should be easy to do and you presumably already have this data in your database (if not, you can create it using an inline load, autogenerate, or an Excel file).
Would you be able to provide example of what you are suggesting.