Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect Result for getHyperCubeData when using Master Measures in Viz Expressions #944

Closed
tomomni opened this issue Feb 22, 2022 · 8 comments
Assignees

Comments

@tomomni
Copy link

tomomni commented Feb 22, 2022

Description

Data returned is exclusively null for columns that reference master measures by name in their expression when calling getHyperCubeData on a visualization object.

Steps to Reproduce

  1. Use enigma to call getHyperCubeData on a visualization object that is referencing a master measure in one of it's measure expressions (not linked otherwise though)

IE:
image

  1. Check the output hypercube data, data for measures that are referencing master measures by name in their expression will output nulls instead of the correct values

Example Output When Calling getHypercube Data With Enigma:
image

Expected behavior

I would expect this to behave like it does when working with the Engine API Explorer in the Dev Hub for the same App/Object pair - data should be returned for these columns.

Example of Correct Behavior Demonstrated in Engine API Explorer (Using Same App & Object - looking at the same row as in the above example):
image

Additional Information

I added some interceptors so we could see the request before it's being sent to the engine and preview the response before we ingest it:
image

Environment

Library
[x] Node.js
[] Browser
Operating system
[x] Windows
[ ] OSX
[ ] Linux
Qlik Sense
[x] Desktop
[x] Enterprise

Versions

  • Enigma: 2.7.3
  • Node.js: 16.9.0
  • Browser: Chrome
  • Qlik Sense: Feb 2021 (Both Desktop & Enterprise)
@aihazm
Copy link
Member

aihazm commented Mar 10, 2022

Hi @tomomni,
We unfortunately couldn't reproduce this issue, but one of my colleagues suggested that this can be a permission issue: that maybe the authenticated user in node.js/enigma is not the same as the one authenticated via browser (dev-hub)

@tomomni
Copy link
Author

tomomni commented Mar 10, 2022

Hi @aihazm,

Thanks for checking this out, it's a really peculiar issue since there is no problem when using linked master measures it only occurs when referencing master measures in a measure expression.

When connecting to an enterprise environment, I am basically running my app as an SSE - on the server using the site certificates for authentication, my user in this case is typically the env service account.

I could see the potential for a permission mismatch issue here however, it's odd that a permissions issue would allow me to get data from adjacent columns in the same visualization (table). Furthermore, I can also recreate the issue when running locally using Sense Desktop too both when I have provided my user/directory info and when I leave it null.

I will take a closer look here, toy around with my user/directory settings and update this post with my findings.

Additionally, would it help if I share a repo with a re-creatable Sense Desktop example (including the QVF)? I can whip something up relatively quickly if you guys will check it out.

Thanks again for looking into this.

-Tom

Mar 10 11:15 EST UPDATE:

Confirmed not a permissions issue. Went to start creating an example app and discovered new information though! In order to trigger the issue, the master measure must have a calculated label expression (ie: 'Sample Measure') and the measure expression referencing the master measure must use a different label (ie: 'Referenced Measure'). Need to do some more testing and will update again with further findings.

Mar 10 14:10 EST UPDATE:

Created a repo with a barebones example: https://github.com/tomomni/engima.js_Issue944_Example

Please let me know if there are still any issues recreating - determined the issue only occurs when the master measure has it's own label expression & the expression referencing the master measure has it's own label (like in the example app). Removing the label expression from the master measure will resolve the issue.

@wennmo wennmo self-assigned this Apr 5, 2022
@wennmo
Copy link
Member

wennmo commented Apr 6, 2022

Hi @tomomni ,
My apologies for the late follow-up. Thank you for the provided example of reproducing the issue. I am now looking into the issue, and think I have found the cause of the problem that you are experiencing.

Just for confirmation, with your example app & script provided you are getting the following result for getHyperCubeData?

Screenshot 2022-04-05 at 15 57 17

And expected behaviour would be :

Screenshot 2022-04-05 at 15 56 56

@tomomni
Copy link
Author

tomomni commented Apr 6, 2022

Hi @wennmo, no worries on the delay - I appreciate you looking into this.

You are exactly correct with the experienced and expected behaviors.

@wennmo
Copy link
Member

wennmo commented Apr 7, 2022

Hi @tomomni, thanks for the confirmation. This problem has already been fixed in Qlik Sense SaaS, which is why @aihazm was unable to reproduce it.

Since you are testing against Qlik Sense Enterprise/Desktop Feb 2021, I will look into when/if the solution was introduced for those products.

@tomomni
Copy link
Author

tomomni commented Apr 11, 2022

@wennmo, interesting that it's solved in SaaS.

I thought @aihazm might not have been able to recreate the issue because I missed exactly what the trigger was initially - it was only in assembling my example that I realized the issue can only be triggered when the master measure has it's own label expression and the column where the master measure is being referenced has it's own label (like in the example app).

I just tested using enterprise Feb 2022 Patch 2 and the issue still exists as of that version.

@wennmo
Copy link
Member

wennmo commented Apr 27, 2022

@tomomni, sorry for the delay but now I finally got a response on when the fix was introduced.

Since Qlik Sense Enterprise for Windows has a different release cadence compared to Qlik Sense SaaS, it has so far not been part of any release for that product. It is however targeted for the May release (but was not part of the February release).

@wennmo
Copy link
Member

wennmo commented May 9, 2022

I will close this issue for now, since this is not enigma.js related.

There is a fix being planned for the next release of Qlik Sense Enterprise for Windows, and that should resolve the issue.

@wennmo wennmo closed this as completed May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants