Query to Get Datasets and Their Physical Columns Filtered by a Domain using GraphQL and Python SDK

Original Slack Thread

Hi all - Can you help with a query to get all the datasets and their physical columns filtered by a domain? Graph QL and Python SDK would help. TIA

Hi - just to confirm, you want to see the dataset with a certain domain (ex. Marketing) with their columns?

In that case, could you try something like this?

  search(
    input: {
      type: DATASET, 
      query: "*", 
      start: 0, 
      count: 100,
      orFilters: {
        and: [
        	{
        	field: "domain",
        	values: ["urn:li:domain:XXX"],
        	condition: EQUAL,
        	},
        ]
      }
    }
  ) {
    start
    count
    total
    searchResults {
      entity {
        ... on Dataset {
          urn
          name
          schemaMetadata {
            fields {
              fieldPath
            }
          }
        }
      }
    }
  }
}