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

feature: run generateExploreDiagram on selected explore only #97

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Juventin
Copy link

… and use exploreName in queryCacheKey

Description

This pull request introduces a new feature to filter the generation of LookML diagrams by the selected explore. Previously, diagrams were generated for all explores in the model, which could lead to hours-long loading on Looker instances having lots of big explores.
By leveraging the exploreName parameter, we now optimize the diagram generation process, focusing only on the selected explore.

Key Changes

diagrammer.ts:

  • Modified generateModelDiagrams function to filter explores based on the provided exploreName.
  • Added conditional logic to ensure diagrams are only generated for the selected explore when exploreName is specified.
  • Adjusted minimap generation to align with the new filtering behavior.

fetchers.ts:

  • Integrated exploreName into the query cache key for useModelDiagrams to ensure cache accuracy.
  • Passed the exploreName parameter to the generateModelDiagrams function to enable the filtering mechanism.

bundle.js and bundle.js.map:

  • Rebuild bundle.

Testing

  • Verified that diagrams are correctly filtered when an exploreName is provided.
  • Ensured no regression occurs when exploreName is omitted (default behavior processes all explores).
  • Tested with various explore names to confirm accurate diagram generation and minimap updates.

Impact

  • Optimized service performance for diagram generation.
  • Enhanced functionality by allowing users to focus on specific explores.
  • Reduced unnecessary computation for large LookML models.

Feel free to suggest edits or provide feedback! 😊

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.

1 participant