> **Experimental**
>
> `@aws-cdk/aws-s3tables-alpha` is an [**experimental**](/stability) (alpha) package: its API may change in any release, without a major version bump.
# SortDirection

Sort direction values for Iceberg sort fields.

- Stability: [Experimental](/cdk/api/stability.html)
- Source: [`lib/table.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0-alpha.0/packages/@aws-cdk/aws-s3tables-alpha/lib/table.ts#L386)

## Example

```ts
// Build a table with partition spec, sort order, and table properties
const advancedTable = new Table(scope, 'AdvancedTable', {
    tableName: 'advanced_table',
    namespace: namespace,
    openTableFormat: OpenTableFormat.ICEBERG,
    icebergMetadata: {
        icebergSchema: {
            schemaFieldList: [
                { id: 1, name: 'event_date', type: 'date', required: true },
                { id: 2, name: 'user_id', type: 'string', required: true },
            ],
        },
        icebergPartitionSpec: {
            specId: 0,
            fields: [
                {
                    sourceId: 1,
                    transform: IcebergTransform.IDENTITY,
                    name: 'date_partition',
                    fieldId: 1000,
                },
            ],
        },
        icebergSortOrder: {
            orderId: 1,
            fields: [
                {
                    sourceId: 1,
                    transform: IcebergTransform.IDENTITY,
                    direction: SortDirection.ASC,
                    nullOrder: NullOrder.NULLS_LAST,
                },
            ],
        },
        tableProperties: [
            { key: 'write.format.default', value: 'parquet' },
        ],
    },
});
```

## Members

| Member | Description |
| --- | --- |
| `ASC` | Sort values in ascending order. |
| `DESC` | Sort values in descending order. |

## Referenced by

- [`IcebergSortField`](/v2/docs/@aws-cdk_aws-s3tables-alpha.IcebergSortField).direction
