---
schema_version: "1"
id: dc2a24cb22a81e43186e9a1dd032b3a117c8a549acdb3c368176e52916d3237c
title: DatasourceOrderField
collection: tableau
version: next
locale: en-us
portal_url: https://docs.salesforce.com/tableau/next/en-us/api/metadata_api/reference/datasourceorderfield.doc.md
canonical_url: https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/datasourceorderfield.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: 6f5498245dcdf5a0662f707815fcdf282f3296f9c4485602d4f6125e591a58a3
---
_menu_ Types

ENUM

# DatasourceOrderField

Enum for fields that can be used for sorting

## [_link_](#graphql-schema-definition) GraphQL Schema definition

`   - enum DatasourceOrderField {  - # Sort by downstreamOwners count - DOWNSTREAM_OWNERS_COUNT  - # Sort by downstreamWorkbooks count - DOWNSTREAM_WORKBOOKS_COUNT  - # Sort by fields count - FIELDS_COUNT  - # Sort by containsUnsupportedCustomSql - CONTAINS_UNSUPPORTED_CUSTOM_SQL  - # Sort by id - ID  - # Sort by name - NAME - }   `

## [_link_](#require-by) Require by

- [DatasourceSortOrder_Sort by given fields. The sort orders defined first in the list will take priority. If there are no given sort orders or a tie on the final sorted field then the resulting set will be sorted by ID in ascending order._](https://help.tableau.com/v0.0/api/metadata_api/en-us/reference/datasourcesortorder.doc.html "DatasourceSortOrder - Sort by given fields. The sort orders defined first in the list will take priority. If there are no given sort orders or a tie on the final sorted field then the resulting set will be sorted by ID in ascending order.")