---
schema_version: "1"
id: 36c8ceb794a10d8123dd5b0eb3fc358009cfab50fc235471ea2e4ab2c8e8d4bb
title: PublishedDatasourceSortOrder
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/api/metadata_api/reference/publisheddatasourcesortorder.doc.md
canonical_url: https://help.tableau.com/current/api/metadata_api/en-us/reference/publisheddatasourcesortorder.doc.html
source_site: help.tableau.com
content_type: documentation
content_hash: 2d3a49a52be44cb08c6f21c2a7857d115d0ea50c680b3ddf7114a62d42037b0b
---
_menu_ Types

INPUT\_OBJECT

# PublishedDatasourceSortOrder

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.

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

`   - input PublishedDatasourceSortOrder {  - # GraphQL field to sort on - field: [PublishedDatasourceOrderField](https://help.tableau.com/current/api/metadata_api/en-us/reference/publisheddatasourceorderfield.doc.html)!  - # Order direction to sort output - direction: [OrderDirection](https://help.tableau.com/current/api/metadata_api/en-us/reference/orderdirection.doc.html)! - }   `

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

- [BinField_GraphQL type for a binned continuous measure field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations\_bins.html_](https://help.tableau.com/current/api/metadata_api/en-us/reference/binfield.doc.html "BinField - GraphQL type for a binned continuous measure field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_bins.html")

- [CalculatedField_GraphQL type for a calculated field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations\_calculatedfields.html_](https://help.tableau.com/current/api/metadata_api/en-us/reference/calculatedfield.doc.html "CalculatedField - GraphQL type for a calculated field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/calculations_calculatedfields.html")

- [CloudFile_A cloud file connection_](https://help.tableau.com/current/api/metadata_api/en-us/reference/cloudfile.doc.html "CloudFile - A cloud file connection")

- [Column_GraphQL type for a table column_](https://help.tableau.com/current/api/metadata_api/en-us/reference/column.doc.html "Column - GraphQL type for a table column")

- [ColumnField_ColumnFields are a type of field which directly connects to a column in some type of table._](https://help.tableau.com/current/api/metadata_api/en-us/reference/columnfield.doc.html "ColumnField - ColumnFields are a type of field which directly connects to a column in some type of table.")

- [CombinedField_GraphQL type for a combined field. Combined fields concatanate fields together into one string._](https://help.tableau.com/current/api/metadata_api/en-us/reference/combinedfield.doc.html "CombinedField - GraphQL type for a combined field. Combined fields concatanate fields together into one string.")

- [CombinedSetField_GraphQL type for a combined set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_sets\_create.html#Combine_](https://help.tableau.com/current/api/metadata_api/en-us/reference/combinedsetfield.doc.html "CombinedSetField - GraphQL type for a combined set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.html#Combine")

- [CustomSQLTable_A table that represents the result of evaluating a custom SQL query. These "tables" are owned by the Tableau data source (embedded or published) which contains the SQL query, so they only exist within that data source._](https://help.tableau.com/current/api/metadata_api/en-us/reference/customsqltable.doc.html "CustomSQLTable - A table that represents the result of evaluating a custom SQL query. These \"tables\" are owned by the Tableau data source (embedded or published) which contains the SQL query, so they only exist within that data source.")

- [Database_A database containing tables_](https://help.tableau.com/current/api/metadata_api/en-us/reference/database.doc.html "Database - A database containing tables")

- [DatabaseServer_A database server connection_](https://help.tableau.com/current/api/metadata_api/en-us/reference/databaseserver.doc.html "DatabaseServer - A database server connection")

- [DatabaseTable_A table that is contained in a database_](https://help.tableau.com/current/api/metadata_api/en-us/reference/databasetable.doc.html "DatabaseTable - A table that is contained in a database")

- [DataCloud_A Data Cloud connection \*Available in Tableau Cloud February 2024 / Server 2024.2 and later.\*_](datacloud.doc.html "DataCloud - A Data Cloud connection  
    *Available in Tableau Cloud February 2024 / Server 2024.2 and later.*")

- [DatasourceField_GraphQL type for a data source field. Data source fields can only exist in embedded data sources which connect to a published data source. A data source field is an embedded data source's 'layered' representation of a field that already exists in the published data source and is mostly a copy of the field in the published data source. Data source fields can get their own descriptions and renames local to the embedded data source, but cannot otherwise be modified in the embedded data source._](https://help.tableau.com/current/api/metadata_api/en-us/reference/datasourcefield.doc.html "DatasourceField - GraphQL type for a data source field. Data source fields can only exist in embedded data sources which connect to a published data source. A data source field is an embedded data source's 'layered' representation of a field that already exists in the published data source and is mostly a copy of the field in the published data source. Data source fields can get their own descriptions and renames local to the embedded data source, but cannot otherwise be modified in the embedded data source.")

- [EmbeddedDatasource_A data source embedded in a workbook_](https://help.tableau.com/current/api/metadata_api/en-us/reference/embeddeddatasource.doc.html "EmbeddedDatasource - A data source embedded in a workbook")

- [Field_Base GraphQL type for a field_](https://help.tableau.com/current/api/metadata_api/en-us/reference/field.doc.html "Field - Base GraphQL type for a field")

- [File_A file connection_](https://help.tableau.com/current/api/metadata_api/en-us/reference/file.doc.html "File - A file connection")

- [Flow_Flows are used to prepare data, which can include aggregation, cleaning, preprocessing, etc._](https://help.tableau.com/current/api/metadata_api/en-us/reference/flow.doc.html "Flow - Flows are used to prepare data, which can include aggregation, cleaning, preprocessing, etc.")

- [FlowColumnInputField_Column input field implementation_](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowcolumninputfield.doc.html "FlowColumnInputField - Column input field implementation")

- [FlowColumnOutputField_Column output field implementation_](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowcolumnoutputfield.doc.html "FlowColumnOutputField - Column output field implementation")

- [FlowFieldInputField_Field input field implementation_](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowfieldinputfield.doc.html "FlowFieldInputField - Field input field implementation")

- [FlowFieldOutputField_Field output field implementation_](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowfieldoutputfield.doc.html "FlowFieldOutputField - Field output field implementation")

- [FlowInputField_A wrapper for an input field contained in a published flow._](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowinputfield.doc.html "FlowInputField - A wrapper for an input field contained in a published flow.")

- [FlowOutputField_A wrapper for an output field contained in a published flow._](https://help.tableau.com/current/api/metadata_api/en-us/reference/flowoutputfield.doc.html "FlowOutputField - A wrapper for an output field contained in a published flow.")

- [GroupField_GraphQL type for a group field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_groups\_creating.html_](https://help.tableau.com/current/api/metadata_api/en-us/reference/groupfield.doc.html "GroupField - GraphQL type for a group field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_groups_creating.html")

- [HierarchyField_GraphQL type for a hierarchy. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/qs\_hierarchies.html_](https://help.tableau.com/current/api/metadata_api/en-us/reference/hierarchyfield.doc.html "HierarchyField - GraphQL type for a hierarchy. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/qs_hierarchies.html")

- [Lens_Lenses are curated, embeddable Ask Data experiences. \*Introduced in Tableau Cloud June 2022 / Server 2022.3.\* \*Retired in Tableau Cloud February 2024 / Server 2024.2.\*_](lens.doc.html "Lens - Lenses are curated, embeddable Ask Data experiences.  
    *Introduced in Tableau Cloud June 2022 / Server 2022.3.*  
    *Retired in Tableau Cloud February 2024 / Server 2024.2.*")

- [Metric_Metrics are time series data constructed from fields contained in views. \*Retired in Tableau Cloud February 2024 / Server 2024.2.\*_](metric.doc.html "Metric - Metrics are time series data constructed from fields contained in views.  
    *Retired in Tableau Cloud February 2024 / Server 2024.2.*")

- [MetricDefinition_A Tableau Pulse metric definition. \*Available in Tableau Cloud June 2024 and later. Tableau Pulse is not available in Tableau Server.\*_](metricdefinition.doc.html "MetricDefinition - A Tableau Pulse metric definition.  
    *Available in Tableau Cloud June 2024 and later. Tableau Pulse is not available in Tableau Server.*")

- [PublishedDatasource_A Tableau data source that has been published separately to Tableau Server. It can be used by multiple workbooks._](https://help.tableau.com/current/api/metadata_api/en-us/reference/publisheddatasource.doc.html "PublishedDatasource - A Tableau data source that has been published separately to Tableau Server. It can be used by multiple workbooks.")

- [Query_Query root for Metadata GraphQL interface_](https://help.tableau.com/current/api/metadata_api/en-us/reference/query.doc.html "Query - Query root for Metadata GraphQL interface")

- [SetField_GraphQL type for a set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup\_sets\_create.html_](https://help.tableau.com/current/api/metadata_api/en-us/reference/setfield.doc.html "SetField - GraphQL type for a set field. See https://onlinehelp.tableau.com/current/pro/desktop/en-us/sortgroup_sets_create.html")

- [Table_A table containing columns_](https://help.tableau.com/current/api/metadata_api/en-us/reference/table.doc.html "Table - A table containing columns")

- [TableauSite_Site on Tableau server_](https://help.tableau.com/current/api/metadata_api/en-us/reference/tableausite.doc.html "TableauSite - Site on Tableau server")

- [TableauUser_User on a site on Tableau server_](https://help.tableau.com/current/api/metadata_api/en-us/reference/tableauuser.doc.html "TableauUser - User on a site on Tableau server")

- [Tag_A tag associated with content items_](https://help.tableau.com/current/api/metadata_api/en-us/reference/tag.doc.html "Tag - A tag associated with content items")

- [VirtualConnection_A virtual connection. \*Available in Tableau Cloud March 2022 / Server 2022.1 and later.\*_](virtualconnection.doc.html "VirtualConnection - A virtual connection.  
    *Available in Tableau Cloud March 2022 / Server 2022.1 and later.*")

- [VirtualConnectionTable_A table in a virtual connection. \*Available in Tableau Cloud March 2022 / Server 2022.1 and later.\*_](virtualconnectiontable.doc.html "VirtualConnectionTable - A table in a virtual connection.  
    *Available in Tableau Cloud March 2022 / Server 2022.1 and later.*")

- [WebDataConnector_A web data connector_](https://help.tableau.com/current/api/metadata_api/en-us/reference/webdataconnector.doc.html "WebDataConnector - A web data connector")

- [Workbook_Workbooks are used to package up Tableau visualizations (which are called "sheets" in the Metadata API) and data models (which are called "embedded data sources" when they are owned by a workbook)._](https://help.tableau.com/current/api/metadata_api/en-us/reference/workbook.doc.html "Workbook - Workbooks are used to package up Tableau visualizations (which are called \"sheets\" in the Metadata API) and data models (which are called \"embedded data sources\" when they are owned by a workbook).")