How to export your data from Amazon Redshift without losing types or rows
A renewal notice, a change to Redshift Serverless or managed storage pricing, or a data residency rule can all force a team to get its tables out of Redshift on a fixed timeline. The documented export path is UNLOAD to Amazon S3, which writes query results as CSV, JSON or Parquet. Most columns move cleanly, but GEOMETRY, HLLSKETCH and VARBYTE columns can only be unloaded as text or CSV, and Parquet unloads drop time zone information from TIMESTAMPTZ columns. Those two facts decide the target format for each table before any export runs.
Before you start, inventory every table and flag the columns with these types, then choose the output format per table. Parquet is usually the better landing format for a lakehouse or ClickHouse load, but only if you accept the TIMESTAMPTZ behavior or store a separate UTC column first. Use the VERBOSE option with the JSON manifest to record column types and row counts, and compare those counts against SELECT COUNT(*) on the source. Note that the outer SELECT cannot use LIMIT, so test on a filtered subset instead. Confirm the current UNLOAD syntax and any option changes in the Amazon Redshift UNLOAD documentation before writing scripts.
Treat the export as only the first step of an exit. Unloaded files still need a destination catalog, schema mapping, encryption and retention decisions on your own S3 buckets, and a reconciliation plan that proves row counts and sampled values match after reload. Stored procedures, Python UDFs and workload rules do not travel in an export at all. Ask your migration partner or internal team to write those into the same plan so that the last Redshift read happens only after the restored copy passes its checks.
Which Redshift data types and outputs export with UNLOAD
This table compares what UNLOAD can write for each output option and data category, with the documented limits that affect file layout. Read it before you write the UNLOAD statement, so you know which columns need a text fallback and how files will be split for reloading.
| Export option | What UNLOAD does | Limit or condition to plan for | Source |
|---|---|---|---|
| Table rows to S3 | Writes query results from a table or SELECT to Amazon S3 as data files | Outer SELECT cannot use a LIMIT clause, so filter with WHERE or export in batches | AWS UNLOAD reference |
| CSV, JSON and Parquet output | Lets you choose the file format for the exported rows | Confirm which format your downstream loader (ClickHouse, Trino or Spark) reads natively | AWS UNLOAD reference |
| Hive-style partitioned folders | Uses PARTITION BY to write one folder per partition value | Choose partition columns with moderate cardinality so folders stay manageable | AWS UNLOAD reference |
| JSON manifest | Writes a manifest listing every file produced by the unload | Keep the manifest with the data so a reload can read the exact file set | AWS UNLOAD reference |
| VERBOSE metadata | Adds column types and row counts to the manifest | Use VERBOSE when you need type information to rebuild target table schemas | AWS UNLOAD reference |
| Parallel per-slice files | Writes files in parallel from each slice by default | File count follows cluster slices, so check counts against your reload plan | AWS UNLOAD reference |
| Maximum data file size | Caps each output file at 6.2 GB | Plan reload parallelism around many files of up to this size | AWS UNLOAD reference |
| GEOMETRY, HLLSKETCH and VARBYTE columns | Unload only to text or CSV, not Parquet | Cast these columns to text or CSV before exporting, and document the conversion | AWS UNLOAD reference |
| TIMESTAMPTZ columns in Parquet | Parquet unloads drop time zone information | Store UTC values or add a separate zone column before exporting to Parquet | AWS UNLOAD reference |
What UNLOAD cannot export as typed data and how to work around it
UNLOAD moves table rows well, but some column types and most database objects do not survive the trip as typed data. The cards below cover the column types that only unload to text, the time zone loss in Parquet, and the objects that sit outside UNLOAD output entirely. Each item needs a decision and a check against your own schema before you start the export.
GEOMETRY columns unload as text
Redshift can unload GEOMETRY columns only to text or CSV, so spatial values arrive as encoded strings rather than typed geometry. Decide whether the target system needs the geometry itself or only a text representation for reference. A common workaround is to cast or convert the column in the SELECT and keep the text form in a dedicated column, then rebuild the geometry type in the target from that text. Confirm the encoding you get from the cast against a sample of rows before relying on it.
UNLOAD docsHLLSKETCH columns need a text form
HLLSKETCH values hold approximate distinct-count state, and UNLOAD writes them only as text or CSV. Exporting the raw sketch does not give the target a usable counting structure unless the target can read the same sketch format. Many teams export the sketch as text for archive, then store the estimated distinct counts as a plain numeric column for reporting. Check whether downstream queries depend on merging sketches, since that behavior does not carry over.
VARBYTE columns and binary payloads
VARBYTE columns can only be unloaded to text or CSV, which changes how binary content reaches the target. Encoding the value as hexadecimal or base64 inside the SELECT gives a predictable string that the target can decode. Verify the round trip on sample rows, including empty and null values, because a mismatch in encoding is easy to miss in row counts alone. Record the chosen encoding in your migration documentation so the loader uses the same rule.
TIMESTAMPTZ loses its time zone in Parquet
Parquet unloads drop time zone information from TIMESTAMPTZ columns, so the stored instant survives but its original zone does not. Keep the instant in the Parquet file and add a companion column with the zone name or offset, populated in the SELECT from the source data. Confirm with a few rows across daylight saving transitions that the target reads back the same instant and the same zone label. Document which reporting queries depend on the local time shown to users.
Stored procedures and UDFs stay in Redshift
UNLOAD writes table data only, so stored procedures, user-defined functions and their logic are not part of the output. Export the definitions from the system catalog and version them in your repository, then translate each one by hand for the target engine. Plan for a separate review, since a procedure that looks simple may depend on Redshift-specific behavior. Ask the team which procedures run on a schedule, because those jobs need replacing too.
Users, grants and workload settings
Users, groups, grants, row-level policies and workload management queue settings are not part of UNLOAD output. Pull them from the system catalog views and record them in a permissions inventory that maps each Redshift role to an access model in the target. Treat this inventory as a separate deliverable from the data export, and have the security team review it before cutover. The target needs its own authentication and access control design, so these records describe intent rather than something to copy.
The sequence for a complete Redshift export with verification
This sequence turns a Redshift export into a repeatable process: each table is classified, unloaded with settings chosen for its reload path, and checked against Redshift's own manifest and row counts before anyone treats the files as a copy of the data.
Inventory tables and column types
Start by listing every table in scope with its columns and data types, pulled from the Redshift catalog for the schemas you plan to export. The data engineer or DBA owns this list and records it alongside the export ticket. The step is done when every column has a recorded type and every table has an owner and a target path in S3.
Flag columns that unload only to text
Mark every GEOMETRY, HLLSKETCH and VARBYTE column, and every TIMESTAMPTZ column, because these need special handling. Redshift can unload GEOMETRY, HLLSKETCH and VARBYTE only to text or CSV, and Parquet unloads drop time zone information from TIMESTAMPTZ. For each flagged column, decide whether to convert it in the query, store it as text, or keep the time zone in a separate column before unloading. The step is done when each flagged column has a written decision that the reload team has reviewed.
Choose the file format for each table
Select CSV, JSON or Parquet for each table based on the target system and on whether the table contains flagged columns. Tables that include text-only types or need explicit time zones will often be better served by CSV or JSON, while tables with no restrictions can be unloaded as Parquet for columnar reloads. The data architect records the format choice per table, and the step is done when the choice is documented next to the flagged-column decisions from the previous step.
Set partitioning, manifest and VERBOSE options
Add PARTITION BY where the reload needs Hive-style folders, and set MANIFEST with VERBOSE on every export that will be reloaded. The manifest lists every file the unload wrote, and VERBOSE adds column types and row counts, which become the reference numbers for checks later. Write the exact UNLOAD statements into version-controlled scripts so the options can be reviewed. The step is done when every statement contains the options the reload plan requires.
Run UNLOAD with encryption configured
Run the UNLOAD statements against a non-production or agreed maintenance window using an IAM role with write access only to the target prefix. Configure encryption on the S3 destination and in the UNLOAD options before the first run, and confirm the bucket policy limits access to the export role and the reload team. Save the UNLOAD query logs, the job identifiers and the S3 paths. The step is done when every table has a complete set of files and a manifest in its target prefix.
Verify file counts and row counts
Compare the files in S3 against the manifest, confirming that every listed file exists with the expected size and that no extra files sit in the prefix. Then compare the row counts reported with VERBOSE against counts taken directly from the source tables at the same point in time, so that any difference from concurrent writes is explained. The manifest and VERBOSE row counts are the main checks in this sequence. The step is done when each table's file count and row count match, or each difference is recorded with a cause.
Test a reload into a non-production target
Load the exported files into a non-production target such as a test ClickHouse, Trino or staging table, using the same schema and load path planned for production. Run row counts and sample checks on flagged columns, especially TIMESTAMPTZ values and text-converted types, against the source. Confirm that the reload path reads the manifest as intended. The migration lead signs off when the reload matches the source for every table in scope.
Keep evidence for the migration record
Archive the UNLOAD logs, manifests, VERBOSE output, checksums computed on the exported files, the verification results and the reload test report together, with the scripts used and their version history. Confirm with your security and compliance teams how long this evidence must be kept and where it is stored, because the record of what left the warehouse is often requested later. The step is done when the evidence bundle is stored under access control and the owners have confirmed its retention.
How UNLOAD writes files to S3 and why parallelism matters
UNLOAD writes in parallel, one stream per slice by default, so the number of files you get depends on how many slices your cluster has and how much data the query returns. A small result from a multi-slice cluster can still land as several files, and a large table will be split further because each data file is capped at a maximum of 6.2 GB. Before you plan a load, check the slice count of your own cluster and run a row-count test on a representative table, so you know roughly how many objects will appear under your S3 prefix. Downstream loaders read whatever files they find, so the file count affects load concurrency and object-request costs in S3.
Partitioned output with PARTITION BY writes Hive-style folders, such as one folder per column value, which lets downstream engines prune files they do not need. A ClickHouse s3 table function pattern or a Trino external table over those prefixes can read the folder structure directly, but you must confirm that the partition column names and value formats match what your target table definition expects. Using MANIFEST with VERBOSE writes a JSON manifest that lists every file the unload produced, and the verbose form adds column types and row counts. The manifest is the safest reference for reconciliation: compare its row counts with the source table, and feed its file list to the loader so a rerun cannot silently pick up stale objects from an earlier export.
Choosing an S3 bucket, encryption and access for the export
The security team should treat the export bucket as a new store of the same sensitive data that sits in Redshift, because the unloaded files are a complete copy in a format that is easy to read elsewhere. Decide the bucket policy, encryption and access before the first UNLOAD runs, and record the decisions so they can be shown in a compliance review.
- Bucket policy: Block public access at the account and bucket level, restrict writes to the role that runs UNLOAD, and deny requests that do not use TLS.
- Encryption: Choose the server-side encryption option your policy requires and confirm which options UNLOAD supports in the Amazon Redshift UNLOAD reference before you standardize on one.
- IAM role: Give the Redshift role used by UNLOAD write access only to the staging prefix, and keep read access for the reloading team in a separate role.
- Retention and deletion: Set a lifecycle rule that deletes staging files after the reload is verified, and document who approves exceptions.
- Logging: Turn on server access or CloudTrail data event logging for the bucket so every write and read of the export can be traced.
Before sign-off, confirm the encryption options and key handling against your own compliance requirements with your assessor, since those requirements decide what is acceptable.
Data engineers decide how the exported files are organized, named and separated from the production data. A clear layout makes the later reload repeatable, lets Trino or ClickHouse read the files without guesswork, and prevents an export from overwriting data that other jobs still need.
- Path layout: Use a prefix per source cluster, schema, table and export date, such as
redshift/<cluster>/<schema>/<table>/<run-date>/, so a reload can target one table at a time. - Naming: Keep file names stable and include the run identifier, so the manifest and the files on disk can be matched when something is missing.
- Separation from production: Export to a dedicated bucket or prefix that no production Redshift or application workload reads from, and never point UNLOAD at a path that lakehouse tables already use.
- Partitioned output: When you use PARTITION BY, choose keys that match how the target system will filter, and record them in the table definition.
- Manifests: Write the manifest with each run and store it next to the data, because it is the list the reload job should trust.
Before the first full run, ask the platform team to confirm the layout and naming rules, and test a single table end to end.
Access decisions show up in two places: the permissions attached to the UNLOAD role and the permissions given to people and services that read the files afterwards. Separating them keeps the export job from becoming a general read path into the bucket.
- Export role: Grant the role only the S3 actions needed to write the staging prefix and nothing else, and review it when the cluster or bucket changes.
- Reader roles: Create distinct roles for the loading job and for ad hoc analysts, with read access limited to the prefixes they need.
- Human access: Route administrative access through your identity provider and short-lived sessions rather than long-lived access keys.
- Key scope: If a customer managed key is used, limit its use to the export and reload roles, and track key policy changes.
- Review cadence: Re-check role and policy changes on a schedule set by your security team, and after any change to the Redshift cluster.
Confirm with your cloud and security leads which identity provider and key management setup your organization uses, since those choices change how the roles are written.
What to plan before the Redshift contract renewal or termination
A Redshift renewal or termination date sets the clock for the export. The cards below cover the decisions that have to be made before the first UNLOAD runs, so the export finishes, can be repeated and does not break the reports and jobs that depend on it.
Confirm the export window
Set the export window against your contract end date and the date your billing or storage commitment stops. Work backwards from that date to find when the final full export, the incremental exports and the verification passes must finish. Confirm with your AWS account team whether any commitment or reservation terms affect when the cluster or Serverless workgroup can be stopped. Treat the window as a deadline for data you can prove you hold, not only for the UNLOAD statements that ran.
UNLOAD referenceReserve the S3 bucket
Create the destination bucket and its retention budget before the first export. Decide the bucket owner, region, encryption setting, lifecycle rules and who can read the files. Estimate the stored volume from current Redshift managed storage, then add room for repeated exports, since a parallel run keeps two copies until cutover. Ask your cloud finance team to confirm how S3 storage and request charges will be billed after the Redshift contract ends.
- Per GB-month storage
- $0.024
Record the Redshift pricing model
Write down whether the workload is billed as Redshift Serverless RPU-hours or as provisioned nodes, and which region it runs in. Record the base capacity and the managed storage volume at the start of the export. Redshift Serverless bills RPU-hours at $0.375 in US East (N. Virginia), with base capacity from 4 RPUs, and managed storage at $0.024 per GB-month. Use these figures as context only, and confirm your negotiated rates and any commitment discounts with AWS.
Redshift pricing pagePlan a re-runnable parallel run
Keep Redshift available until the exported files reconcile with the source tables. Design each UNLOAD so it can be run again for the same partition or date range without duplicating files, using a stable S3 prefix per table and run. Use manifests to record which files belong to each run. Compare row counts and key totals between source and output, and retest the restore path at least once before the cluster is stopped.
List dependent tools to repoint
Inventory every consumer that reads from Redshift: BI dashboards, scheduled queries, ETL jobs, reverse ETL syncs and any Python UDFs that hold logic inside the warehouse. Record the owner, refresh schedule and connection string for each. Python UDFs have their own end of support date, so check them first, because a function that stops working can break a report silently. Plan the cutover order so each consumer moves once its source data is confirmed.
- Python UDF end
- June 30, 2026
Assign owners and sign-offs
Name one owner for the export, one for the S3 bucket and one for each dependent system, and agree who signs off that the exported data is complete. Compliance and data protection leads should confirm that the export, the storage location and the retention period meet your records rules. Record the decisions in writing so the contract exit has an audit trail that an auditor or a future team can follow.
Questions buyers ask before exporting Redshift data
How long does a Redshift export take, and what drives the time?
The duration depends mostly on data volume, how many slices the cluster or workgroup has, and how busy the warehouse is while the export runs. UNLOAD writes files in parallel per slice by default, so more slices generally means more parallel output, while heavy concurrent queries compete for the same capacity. Output files can be as large as 6.2 GB each, so very large tables produce fewer, bigger files. The AWS documentation for UNLOAD is the right place to check how these settings apply to your configuration. Before committing to a window, run a test unload on a representative table and time it, since that measurement will tell you more than any general estimate.
Can our own team run the export without outside help?
Yes for simple tables with plain integer, varchar and date columns, a single schema and a small number of tables. The work becomes harder when tables use GEOMETRY, HLLSKETCH or VARBYTE columns, which can only be unloaded as text or CSV, when TIMESTAMPTZ values must keep their time zone through Parquet, or when dozens of schemas need consistent naming and reload order. Your team will also need to write verification queries and maintain manifests. Ask your engineers which of these cases appear in your estate before deciding. DeployOpen plans and implements exports as fixed-scope work when the team wants that support, with scope and deliverables agreed in writing first.
What do we need to prepare before running UNLOAD?
Plan four things before the first run. First, an IAM role that Redshift can assume to write to the target S3 bucket, with permissions limited to that bucket and prefix. Second, one or more S3 buckets in the right region, with encryption and access logging configured to your standards. Third, a schema inventory listing every table, column type, row count estimate and any unsupported types. Fourth, a verification plan that defines row counts, checksums or sampled comparisons for each table. The exact IAM policy statements and bucket settings should be confirmed against the Redshift UNLOAD documentation and your own security baseline.
Does UNLOAD export every table and column type in Redshift?
No. UNLOAD can write data to CSV, JSON or Parquet, but some column types have restrictions. According to the AWS documentation, GEOMETRY, HLLSKETCH and VARBYTE columns can only be unloaded to text or CSV, and Parquet unloads drop time zone information from TIMESTAMPTZ columns. Those cases need explicit handling in the export design, such as separate text outputs or casting values before export. Views, stored procedures, Python UDFs, users, grants and workload management settings are not part of table data and must be handled separately. The section on what cannot be exported covers these cases in detail.
How do we verify that an export is complete and correct?
Verify each table against its source before you treat the export as finished. Compare row counts between Redshift and the unloaded files, and use the JSON manifest that UNLOAD can write to confirm every file is listed. Adding the VERBOSE option to the manifest also records column types and row counts, which gives you a second reference point. Then run aggregate checks such as sums of numeric columns, distinct counts on keys and checksums on sampled rows, and compare the results after a test reload. Keep the manifest and the check results as evidence. The ClickHouse documentation also recommends restore or reload tests before relying on any copy, which applies here as well.
Can the exported files feed ClickHouse or Trino directly?
Yes, both can read files that UNLOAD writes to S3. ClickHouse documents a path from Redshift that unloads to S3 and then loads the data with the s3 table function, and the Redshift migration guide describes the options. Parquet is usually the simplest format for loading, though the TIMESTAMPTZ and text-only type limits still apply. Trino can register the same Parquet files as Hive or Iceberg tables through its connectors, which suits a lakehouse layout on S3 that needs a table catalog such as an Iceberg REST catalog or Hive Metastore. Confirm the exact load steps and catalog setup in each vendor's documentation before you commit to a target.
How the Redshift export flows from cluster to verified files
The export starts with the Redshift cluster, where each slice writes its share of the UNLOAD result in parallel to an S3 staging bucket. The UNLOAD options set the format, Hive-style partition folders and the JSON manifest that lists every file. Before anything downstream reads the files, compare the manifest with the VERBOSE row counts and column types. The bucket is the trust boundary, so its encryption and access policies must be in place before the export runs. Downstream, ClickHouse or Trino reads the same verified files.
Redshift UNLOAD writes parallel files and a manifest to S3 before verification and loading.
What the exported files mean for the next platform
Files produced by UNLOAD are open formats. Parquet, CSV and JSON can be read by a self-hosted ClickHouse or Trino stack without any Redshift software in the path. ClickHouse documents loading from Redshift by unloading to S3 and then reading the files, so the export you run here is the same first step its migration guide describes. For Parquet, the schema travels with the files, which makes it the most useful choice when the destination will read typed columns directly. Confirm with your target engine's documentation which Parquet logical types it maps to its own column types before you commit to a load pattern.
The export carries rows, column types and file layout. It does not carry Redshift-specific logic. Stored procedures, views, workload management rules, distribution and sort key design, and any SQL that relies on Redshift functions stay behind in the cluster. Those objects need to be inventoried and rewritten or redesigned on the new platform, and that work is separate from moving the bytes. Your data engineers should list every view and procedure that feeds a downstream report before the first production export, because a successful unload says nothing about whether the queries built on top of it still return the same results.
Plan the checks that prove the move worked. Compare row counts and key aggregates between the Redshift source and the loaded tables, and keep the manifest from the export as the record of which files were produced. ClickHouse's backup documentation warns that a backup never test-restored will probably not restore properly, and the same caution applies to an export that has never been loaded and queried. The schema redesign, query rewrites and migration sequencing are covered in the migration guides linked from this hub.
How DeployOpen works on this
DeployOpen approaches a Redshift export as a fixed-scope piece of work agreed in writing before anything runs. We map which tables, column types and unload paths your exit needs, then build, test and document the export pipeline inside your own AWS account and handover package.
How we scope
- Inventory every schema, table and column type that must leave Redshift, flagging GEOMETRY, HLLSKETCH and VARBYTE columns early.
- Agree the output format, partitioning, file size and manifest requirements in a written scope before any UNLOAD runs.
- Confirm which S3 buckets, KMS keys, IAM roles and retention rules the export will use inside your AWS environment.
How we build
- Build UNLOAD scripts with PARTITION BY layouts, a manifest file and VERBOSE metadata so reloads can be verified.
- Test exports on representative data, checking row counts, timestamp handling and text fallbacks for unsupported types.
- Configure encryption and access controls on the target S3 location so exported data stays under your governance.
How we hand over
- Deliver the export scripts, manifests, runbook and a reconciliation report comparing source and exported row counts.
- Document the timestamp and time zone decisions made for Parquet output, so downstream teams know what changed.
- Run a restore or reload rehearsal on a spare environment and record the results in the handover package.
How we support
- Engagements are fixed-scope, and ongoing support, upgrades and continuous testing are available as a retainer.
- Ask any provider for a quote that itemizes scoping, build, testing, handover and retainer effort as separate lines.
- Confirm with your own AWS and security teams how S3 costs, data transfer and retention will recur after the export ends.

