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

fix: Better scope pragmas to fix data cube preview query #1285

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Nov 30, 2023

This PR attempts to better scope pragmas when fetching the cube preview by using a clean Source, without pragmas, as having #pragma join.hash off breaks previews for some cubes for yet unknown reasons (see e.g. https://test.visualize.admin.ch/en/browse?previous=%7B%7D&dataset=https%3A%2F%2Fenvironment.ld.admin.ch%2Ffoen%2Fnfi%2Fnfi_C-94%2Fcube%2F2023-1&dataSource=Prod).

Context

For more information see this conversation on Zulip.

Notes

I aimed for a simple solution by overriding getMainSource View's method, which might not be ideal, but:

How to test

  1. Go to the deployment preview.
  2. Look at the homepage examples to see if they load fast (<5 s).
  3. Go to dataset browse page.
  4. Change data source to PROD.
  5. Search for a NFI: Topics by ownership cube.
  6. Open the preview.
  7. See that only 10 observations are loaded.
  8. See the same cube preview on TEST and see that 1530 observations are loaded there.

Copy link

vercel bot commented Nov 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview Nov 30, 2023 2:21pm

Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it is somewhat clear to me, and the comment makes it explicit why this was added 👍

@bprusinowski bprusinowski merged commit 08fbffb into main Nov 30, 2023
4 of 6 checks passed
@bprusinowski bprusinowski deleted the refactor/scope-pragmas branch November 30, 2023 14:46
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

Successfully merging this pull request may close these issues.

2 participants