Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@zhixuanjia
Copy link
Contributor

@zhixuanjia zhixuanjia commented Aug 20, 2025

Summary
This PR adds explicit filter support in /scroll API OpenAPI v3. It has similar interface as its counterparts in RestLi ACTION_SCROLL_ACROSS_ENTITIES and GraphQL query scrollAcrossEntities.

Test
Locally deployed and tested new API with curl request.

  curl -X POST 'http://localhost:8080/openapi/v3/entity/scroll?count=10' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJhY3RvclR5cGUiOiJVU0VSIiwiYWN0b3JJZCI6ImRhdGFodWIiLCJ0eXBlIjoiUEVSU09OQUwiLCJ2ZXJzaW9uIjoiMiIsImp0aSI6IjgwMGNhZTk0LTU5MzYtNDU2NC1hZmY1LWFjNDFmMjAzODU1YyIsInN1YiI6ImRhdGFodWIiLCJleHAiOjE3NTg3NjYxOTksImlzcyI6ImRhdGFodWItbWV0YWRhdGEtc2VydmljZSJ9._aRBF3ANejVDnvySTZO5p54xNT0iDP4bQM8tOKzB6_0' \
  -d '{
  "sortCriteria": [
    {
      "field": "name",
      "order": "ASCENDING"
    }
  ],
  "aspects": [],
  "entities": [
    "dataPlatform"
  ],
  "filter": {
    "and": [
      {
        "criteria": [
          {
            "field": "name",
            "values": ["openapi"],
            "condition": "EQUAL"
          }
        ]
      }
    ]
  }
}' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   621    0   268  100   353   2585   3405 --:--:-- --:--:-- --:--:--  6029
{
  "entities": [
    {
      "urn": "urn:li:dataPlatform:OpenApi",
      "dataPlatformKey": {
        "value": {
          "platformName": "OpenApi"
        }
      },
      "dataPlatformInfo": {
        "value": {
          "name": "openapi",
          "datasetNameDelimiter": ".",
          "type": "OTHERS",
          "displayName": "OpenAPI",
          "logoUrl": "/assets/platforms/openapilogo.png"
        }
      }
    }
  ]
}

Swagger UI
Screenshot 2025-08-25 at 7 09 29 PM

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added devops PR or Issue related to DataHub backend & deployment community-contribution PR or Issue raised by member(s) of DataHub Community labels Aug 20, 2025
@codecov
Copy link

codecov bot commented Aug 20, 2025

Bundle Report

Changes will decrease total bundle size by 745 bytes (-0.0%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
datahub-react-web-esm 28.48MB -745 bytes (-0.0%) ⬇️

Affected Assets, Files, and Routes:

view changes for bundle: datahub-react-web-esm

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/index-*.js -745 bytes 18.83MB -0.0%

@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Aug 20, 2025
@codecov
Copy link

codecov bot commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Collaborator

@david-leifker david-leifker left a comment

Choose a reason for hiding this comment

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

Looks good! A few minor tweaks and open question about the implementation around a new vs existing endpoint.

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter needs-review Label for PRs that need review from a maintainer. and removed needs-review Label for PRs that need review from a maintainer. pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Aug 21, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Aug 22, 2025
@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Aug 22, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Aug 25, 2025
Schema conjunctive =
newSchema()
.type(TYPE_OBJECT)
.description("A group of criteria ANDed together.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I appreciate the documentation details here. Thanks!

@datahub-cyborg datahub-cyborg bot added needs-review Label for PRs that need review from a maintainer. and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Aug 25, 2025
@david-leifker
Copy link
Collaborator

Thank you!

@david-leifker david-leifker merged commit df02af2 into datahub-project:master Aug 26, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution PR or Issue raised by member(s) of DataHub Community devops PR or Issue related to DataHub backend & deployment needs-review Label for PRs that need review from a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants