Skip to content

feat(schema-compiler,api-gateway): Nested folders support #9659

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

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

KSDaemon
Copy link
Member

@KSDaemon KSDaemon commented Jun 5, 2025

This PR brings nested folder support into views.
So now you can define this:

  - name: test_view
    folders:
      - name: folder1
        includes:
          - users_city
          - name: inner folder 2
            includes:
              - renamed_orders_status
          - name: inner folder 3
            includes: "*"

/meta endpoint was extended with additional cube property nestedFolders, which holds the recursive nested folders structure. Original folders property is kept untouched for backward compatibility.

Additional env flag CUBEJS_NESTED_FOLDERS_DELIMITER was introduced. It controls how to form the flatten folders property in meta data. If it is not set - all nested folders members will be merged to the root folder members. If it is set to some string (e.g. "/"), then nested folders are bubbled to the root level with their names being constructed as root folder/nested folder/deep nested simulating a nested structure for those APIs (probably some BI tools) that don't support nested folders out of the box.

Check List

  • Tests have been run in packages where changes made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • Docs have been added / updated if required

@KSDaemon KSDaemon marked this pull request as ready for review June 5, 2025 14:01
@KSDaemon KSDaemon requested review from a team as code owners June 5, 2025 14:01
Copy link
Member

@ovr ovr left a comment

Choose a reason for hiding this comment

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

Please regenerate /rust/cubeclient client. Thanks

@KSDaemon KSDaemon force-pushed the feat/nested-folders branch from 71b3efd to d568f13 Compare June 18, 2025 12:28
@KSDaemon KSDaemon requested a review from a team as a code owner June 18, 2025 12:40
@KSDaemon KSDaemon force-pushed the feat/nested-folders branch from 190f6ae to 4e548a7 Compare June 18, 2025 12:42
@KSDaemon KSDaemon requested a review from ovr June 18, 2025 12:42
Copy link

codecov bot commented Jun 18, 2025

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.22%. Comparing base (340f97e) to head (2eddf29).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ubeclient/src/models/v1_cube_meta_nested_folder.rs 0.00% 3 Missing ⚠️
rust/cubesql/cubeclient/src/models/v1_cube_meta.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #9659   +/-   ##
=======================================
  Coverage   84.22%   84.22%           
=======================================
  Files         231      232    +1     
  Lines       85494    85507   +13     
=======================================
+ Hits        72005    72018   +13     
  Misses      13489    13489           
Flag Coverage Δ
cubesql 84.22% <69.23%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KSDaemon KSDaemon force-pushed the feat/nested-folders branch from 4e548a7 to f9d4944 Compare June 20, 2025 14:23
@KSDaemon KSDaemon requested a review from a team as a code owner June 20, 2025 14:23
@KSDaemon KSDaemon force-pushed the feat/nested-folders branch 2 times, most recently from 9fe6a5f to f7101f3 Compare June 26, 2025 18:35
@KSDaemon KSDaemon force-pushed the feat/nested-folders branch 3 times, most recently from 0369444 to 9855584 Compare July 2, 2025 13:00
@KSDaemon KSDaemon requested a review from igorlukanin July 2, 2025 14:59
@KSDaemon KSDaemon force-pushed the feat/nested-folders branch from 0c50c8b to 2eddf29 Compare July 2, 2025 15:05
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.

4 participants