> For the complete documentation index, see [llms.txt](https://upsolver.gitbook.io/content/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://upsolver.gitbook.io/content/reference-1/sql-commands/jobs/create-job/transformation/job-options/amazon-redshift.md).

# Amazon Redshift

The following job options are used when writing to Amazon Redshift tables. Upsolver will create missing tables in Redshift.

## Job options

```sql
[ AGGREGATION_PARALLELISM = <integer> ]
[ COMMENT = '<comment>' ]
[ COMPUTE_CLUSTER = <cluster_identifier> ]
[ END_AT = { NOW | timestamp } ]
[ FAIL_ON_WRITE_ERROR = { TRUE | FALSE } ]
[ RUN_INTERVAL = <integer> { MINUTE[S] | HOUR[S] | DAY[S] } ]
[ RUN_PARALLELISM = <integer> ]
[ SKIP_FAILED_FILES = { TRUE | FALSE } ]
[ START_FROM = { NOW | BEGINNING | timestamp } ]
[ TRUNCATE_COLUMNS = { TRUE | FALSE } ]
```

#### Jump to

Amazon Redshift job options:

* [`AGGREGATION_PARALLELISM`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#aggregation_parallelism-editable)
* [`FAIL_ON_WRITE_ERROR`](#fail_on_write_error)
* [`SKIP_FAILED_FILES`](#skip_failed_files)
* [`TRUNCATE_COLUMNS`](#truncate_columns)
* #### [`ADD_MISSING_COLUMNS`](#add_missing_columns-1)
* #### [`ON_COLUMN_TYPE_MISMATCH`](#on_column_type_mismatch-1)

General job options:

* [`COMMENT`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#comment-editable)
* [`COMPUTE_CLUSTER`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#compute_cluster-editable)
* [`END_AT`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#end_at-editable)
* [`RUN_INTERVAL`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#run_interval)
* [`RUN_PARALLELISM`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#run_parallelism-editable)
* [`START_FROM`](/content/reference-1/sql-commands/jobs/create-job/transformation/job-options.md#start_from)

#### `AGGREGATION_PARALLELISM` — editable

Type: `integer`

Default: `1`

(Optional) Only supported when the query contains aggregations. Formally known as "output sharding."

#### `FAIL_ON_WRITE_ERROR`

Type: `Boolean`

Default: `false`

(Optional) When `true`, the job will fail when an on-write error occurs.

#### `SKIP_FAILED_FILES`

Type: `Boolean`

Default: `true`

(Optional) When `true`, the job will skip any files in which the job is unsuccessful and continue with the rest of the files.

#### `TRUNCATE_COLUMNS`

Type: `Boolean`

Default: `false`

(Optional) When `true`,  data is truncated when inserting into an existing table containing `VARCHAR` or `CHARACTER VARYING` columns smaller than the incoming data size, to prevent the insert from failing.

When `false`, the insert fails if the incoming data is larger than the target column and `SKIP_FAILED_FILES` is also `false`.

#### `ADD_MISSING_COLUMNS`

Type: `Boolean`

Default: `false`

(Optional) When `true`, columns that don't exist in the target table are added automatically when encountered.

When `false`, you cannot do `SELECT *` within the `SELECT` statement of your transformation job.

#### `ON_COLUMN_TYPE_MISMATCH`

Type: `String`

Default: `None`

Possible values:  `Add Column` ,`None`

This option is applicable only if `ADD_MISSING_COLUMNS`=true.\
It determines how to handle cases where the datatype of the source data does not match the datatype of the corresponding column in the target table.

If set to `Add Column`, Upsolver will attempt to cast the incoming data to the original column's datatype. If the cast fails, a new column with the format \<originalColumnName>\_newDataType will be created, and the mismatched data will be written to this new column. For example, if the CLIENT\_ID column is a number in the target table and a VARCHAR arrives in that column, a new column called CLIENT\_ID\_VARCHAR will be added for the string data. The original column will continue to be populated if the data can be cast successfully.

If set to `None`, no new columns will be added, and only valid casts will be written to the original column.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://upsolver.gitbook.io/content/reference-1/sql-commands/jobs/create-job/transformation/job-options/amazon-redshift.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
