API Calls to Retrieve Dataset URNs by Platform for Domain Assignment

Original Slack Thread

Hello all, has anyone written any api calls to grab a list of all dataset urns by platform? I am trying to assigns domains to datasets at ingestion for non relational database sources.

Hey there! :wave: Make sure your message includes the following information if relevant, so we can help more effectively!

  1. Which DataHub version are you using? (e.g. 0.12.0)
  2. Please post any relevant error logs on the thread!

Here is GQL query

              search(input: {type: DATASET, 
               query: "*", start: 0, count: 10
                  orFilters: [
                  {
                    and: [
                    {
                          field: "platform"
                          values: ["redshift"]
                          condition: CONTAIN
                      }
                    ]
                  }
                ]
              }
              ){
                start
                count
                total
                searchResults {
                  entity {
                    urn
                    ... on Dataset {
                      urn
                      }
                    }
                  }
                }
            }```

Thank you! This is very helpful