---
schema_version: "1"
id: 23a1480d4480d6697f196d2a6cc8e946ee47e24dacaf4f12366f76eb511ff6fc
title: DatasourceOrderField
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/metadata_api/reference/datasourceorderfield.doc.md
canonical_url: https://help.tableau.com/current/api/metadata_api/en-us/reference/datasourceorderfield.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: ff045984c31b61bd54840470ef118b554bf86fba0c2b0caeacda1fc27f0b3b55
---
_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/current/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.")