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

update client's get_database_details() method to return only display tagged tables #435

Closed
LavMatt opened this issue Jun 17, 2024 · 2 comments · Fixed by #509
Closed

update client's get_database_details() method to return only display tagged tables #435

LavMatt opened this issue Jun 17, 2024 · 2 comments · Fixed by #509
Assignees

Comments

@LavMatt
Copy link
Contributor

LavMatt commented Jun 17, 2024

Filter for tagged tables

@LavMatt LavMatt converted this from a draft issue Jun 17, 2024
@LavMatt LavMatt changed the title update client's list_database_tables() method to return only display tagged tables update client's get_database_details() method to return only display tagged tables Jun 20, 2024
@MatMoore MatMoore self-assigned this Jun 26, 2024
@MatMoore MatMoore moved this from Todo to In Progress in Data Catalogue Jun 26, 2024
@MatMoore
Copy link
Contributor

MatMoore commented Jun 26, 2024

This isn't applying the filter as expected:

  {
    container(urn: "urn:li:container:06d3f8d11aa556b104a09cc454be2f82") {

    entities(
      input: {
        start: 0
        count: 500
        filters: [
          { field: "tags", values: ["urn:li:tag:dc_display_in_catalogue"] }
        ]
      }
    ) {
      total
      searchResults {
        entity {
          urn
          ...datasetDetails
        }
      }
    }

  }
}

fragment datasetDetails on Dataset {
  urn
  properties {
    name
  }
}

even this doesn't work:

        filters: [
          { field: "tags", values: ["garbage"], condition:EQUAL }
        ]

Need to dig into the source a bit and see if there is a bug here

@MatMoore
Copy link
Contributor

It looks like the entities field is handled by this resolver: https://github.com/datahub-project/datahub/blob/master/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/resolvers/container/ContainerEntitiesResolver.java

But this does not use the filter param, even though it is a valid field.

    final String query = input.getQuery() != null ? input.getQuery() : "*";
    final int start = input.getStart() != null ? input.getStart() : 0;
    final int count = input.getCount() != null ? input.getCount() : 20;

I'll report this as a bug but for now we can workaround it by filtering in python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done ✅
Development

Successfully merging a pull request may close this issue.

2 participants