Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings!
I am trying to use the instructions for creating Dynamic Views that appear in the Tutorial. While doing my first experiments, it seems that the $(ods_<FieldName>) dollar-expansion is not working (the Dynamic Views check box is enabled in our Qlik Analytics SaaS site).
The Tutorial does not mention how these variables work, but it seems that initial / test selection values for a field should be included in the variable initialization having the same name as the field value used in the base application ([CELDA] in the image below). I tried using a single value and the expansion did not extract the correct value, taking instead as value the JSON-like (?) structure that appears to be used as a parameter to $(ods_CELDA). I assume that the job of the $(ods_<FieldName>) is to parse a line of values and generate the proper lines with values for the VAL field.
Since the VAL field in the OdagBinding table is not fed with the proper values, the creation of the WHERE clause generated later in the script contains garbage (essentially, a portion of the JSON structure). I tried to simulate what I think the $(ods_<FieldName>) expansion should do and managed to produce a correct WHERE section for the final query.
So, my questions are:
Please advise by tagging @diagonjope , it is kind of urgent. @Nabeel_Asif , do you have any suggestions?
Cheers,
++José
Hi @diagonjope,
I believe Dynamic Views and ODAG work in a very similar way. So, Qlik created a naming convention for variables to be able to pass values from one application (selection app) to another (the template app).
So, the way you are setting your values will not work - I think you are trying to simulate a field value. You can't do like that.
However, there is a special variable called $(odagActive) that you can use to create a section in your Template app to add variables values for tests. I never tested on Dynamic Views but it should work in a similar way. Following an example:
IF '$(odagActive)'='' THEN trace ODAG variables not inserted! Loading sample data.; SET 'odag_Origin Code' = '''LAX'''; SET 'odag_Destination Code' = '''JFK'''; SET odagn_Year = 2015; SET odag_Quarter = '''1'''; SET 'odag_Ticket Carrier Code' = '''CA'''; SET 'odag_Fare Class' = '''X'''; END IF;
You can find more information about that in this link:
Creating an on-demand template app | Qlik Cloud Help
Where you can find a complete list of the variables used by ODAG and its convention:
Binding expressions in on-demand template apps | Qlik Cloud Help
Regards,
Mark Costa
Read more at Data Voyagers - datavoyagers.net
Follow me on my LinkedIn | Know IPC Global at ipc-global.com
Thanks for the feedback, @marksouzacosta !
I tried using $(odagActive) and it worked. However, the naming convention for referring to field bindings in Dynamic Views is different from the scheme used in ODAG, so I didn't used the ODAG mechanism.
For what it might be worth, based on my limited experience with using Dynamic Views in Qlik Cloud, it seems to me that the reliability or "predictability" of using Dynamic Views in the Qlik Cloud environment seems to be very low. Sometimes the refresh would hang in a loop for a while, but one would go to the console for the source and could see that no queries were being passed to the database (Snowflake in our case). Unfortunately, it seems that there is no way to stop the processing of a refresh once it begins, so, to try again, we had to wait for while until the whole thing failed completely.
Finally, it seems there is no log that can help us determine where the end-to-end mechanism for Dynamic Views fails, so we can't figure out if the problems we are experiencing are due to a communications problem between the base app and the template app, due to the template instance consuming more RAM than allowed, or caused by something wrong with the generated query itself. Occasionally we would get a "socket closed" error, others an error with an error code number (while trying, we received 2-3 different error codes), etc. We did set the record constrains very low to make sure that we were not getting a lot of records back from the source into the template app, but it would also be helpful if the UI for Dynamic Views could allow for limiting the number of selections per field passed to the template app.
In my limited view of things, if this is how Qlik plans to continue addressing the needs of handling "big data" use cases, it has a lot of work to do to make the solution truly usable and usefull (specially considering that in Qlik Cloud, even when paying for large apps, no app can consume more than 50 GB of RAM, and in this case we are consuming 46 GB for the base app to hold 1.8B records of aggregated data - the source data is 25x the number of records... per day). I sure hope that eventually Qlik will allow for customers to run its own QSE instances / containers, managed via Qlik Cloud but running in the customer's own VPC, so that one could use instances with large RAM capacities that are not limited by Qlik's pricing schemes (like in the now defunct Qlik Fort).
Cheers,
++José