Hi all I want to fetch metadata of all datasets f...
# advice-metadata-modeling
e
Hi all I want to fetch metadata of all datasets from datahub.How can I do that? I tried with openAPI GET API but for that URN of the dataset has to pass to it.But I want to fetch all datasets at one time so how can I do that?
plus1 1
a
Hi, could you elaborate a bit on your usecase here?
We’re also working on an upcoming source for DataHub itself that should allow you to do this
Keep an eye out for it in the next month or so
f
If I understand you correctly you could use GraphQL for this. Something like this:
Copy code
{
  search(input: {type: DATASET, query: "", start: 0, count: 1000}) {
    start
    count
    total
    searchResults {
      entity {
        urn
        type
        ... on Dataset {
          name
          lastIngested
					editableProperties{description}
          platform {
            name
          }
          ownership {
            owners {
              owner {
                ... on CorpUser {
                  username
                }
              }
              ownershipType {
                info {
                  name
                }
              }
            }
          }
          glossaryTerms {
            terms {
              term {
                glossaryTermInfo {
                  name
                }
              }
            }
          }
          tags {
            tags {
              tag {
                properties {
                  name
                }
              }
            }
          }
          domain {
            domain {
              properties {
                name
              }
            }
          }
        }
      }
    }
  }
}