ODBC - query using $<<dim.hier::attr>> attribute

Issue #827 open
Wei Wang created an issue

Been trying out ODBC queries and noticed that the generated query (especially on initial page load) can be a bit unpredictable, especially when referencing settings service variable attributes (i.e., $<<dim.hier::attr>> ). Often on initial page load, Apliqo tries to compile the entire SQL query before any referenced attributes are loaded. As a result, a incorrect query is sent with blank values for the variables.

For example let’s say we have the query below where we have a dim with the year as an attribute and reference it in our SQL.

SELECT ...
FROM ... 
WHERE year = '$<<instance.dim.dim::year>>'    

In this situation, it seems that the $<<>> is often not evaluating on initial page load, even with the filterbar\getAllAttributeValues set to TRUE. No results are returned from this incorrect query. After subsequently refreshing the page, the attributes do load up and the query returns the correct result.

Perhaps this is a timing issue of when the attribute values are loaded but it would be great if these more dynamic SQL queries worked more predictable on initial page load. Thanks!

Comments (1)

  1. Joana MFC Corte-Real
    • changed status to open

    Dear Wei, Thank you for bringing this to our attention, we will reproduce the issue and get back to you.

  2. Log in to comment