Migrating To Amazon Redshift
AWSOfficialPublished by AWS
- Skill
- Workflow
- Cloud and DevOps
- Apache-2.0
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured, text-based framework for migrating Teradata Vantage environments to Amazon Redshift. It covers the entire migration lifecycle, including discovery, schema and SQL conversion, data migration, validation, and performance reporting. The skill acts as an expert guide, instructing the AI to generate execution scripts at runtime rather than providing pre-packaged code. It emphasizes secure, read-only discovery, best practices for Redshift architecture, and the conversion of legacy Teradata constructs like BTEQ, macros, and stored procedures into Redshift-compatible formats.
What it does
- Inventories Teradata source systems using read-only discovery queries.
- Converts Teradata DDL, SQL, stored procedures, and BTEQ scripts to Redshift/RSQL.
- Maps Teradata physical architecture to Redshift distribution and sort keys.
- Generates migration runners for data extraction, S3 staging, and COPY operations.
- Provides validation patterns for verifying data integrity and row counts.
- Assesses migration complexity and generates performance comparison reports.
When to use it
- When planning or executing a migration from Teradata Vantage to Amazon Redshift.
- When you need to convert legacy Teradata DDL or BTEQ scripts to Redshift syntax.
- When assessing the effort and complexity of a Teradata-to-Redshift migration project.
- When you require a structured, repeatable process for data warehouse migration.
Advantages
- Knowledge-based approach avoids dependency drift and vendor lock-in.
- Promotes secure, least-privilege practices for data extraction and migration.
- Provides clear mapping rules for complex Teradata-to-Redshift architectural differences.
- Supports both connected and disconnected migration environments.
- Enables reproducible results through a standardized project-workspace layout.
Usage examples
- “Assess the complexity of migrating my Teradata schema to Redshift.”
- The agent will guide you through the discovery phase, inventorying your Teradata objects and identifying high-complexity constructs that require manual review.
- “Convert this Teradata BTEQ script to RSQL for Redshift.”
- The agent will apply the BTEQ-to-RSQL conversion rules, replacing .IMPORT/.EXPORT with S3-based COPY/UNLOAD commands and adapting transaction logic.
- “How should I choose distribution keys for my Teradata fact tables in Redshift?”
- The agent will analyze your table sizes and join patterns to recommend appropriate DISTKEY or DISTSTYLE settings based on the architecture-mapping reference.
- “Generate a script to validate row counts between Teradata and Redshift.”
- The agent will produce a validation runner script that executes count queries on both systems and generates a comparison report.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/aws/migrating-to-amazon-redshift/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip migrating-to-amazon-redshift.zip -d .agents/skills
Documentation by AWS
Migrating to Amazon Redshift
What this skill is
This skill is AI guidance, not an execution framework. It is entirely Markdown knowledge (rules, mappings, patterns, best practices) — no executable code. All execution — conversion, the discovery/migration/validation runners, dependencies, and infrastructure — you (the AI) generate at runtime from this knowledge, tailored to the customer's environment.
Principle: knowledge over shipped code → less drift, nothing for the customer to run or depend on, reliable first-time results. Do not look for a pyproject, a tools package, an orchestrator engine, or shipped scripts — there are none by design; you generate execution.
Runtime: this skill works with or without the AWS MCP server — step guidance uses AWS CLI syntax. Running it with the AWS MCP server is recommended for sandboxed execution and audit logging; without it, the AI runs the generated scripts on the host shell (assumes Bash, Python 3, and AWS CLI + credentials). Do not assume MCP-only tools are available.
Source routing
This skill migrates a supported source data warehouse to Amazon Redshift. First identify the
source system, then load that source's knowledge under references/<source>/:
Teradata (Vantage) →
references/teradata/— supported (all references below).Other sources (e.g. Snowflake, Oracle) — unsupported; each is added as its own
references/<source>/set when ready.
The workflow is source-agnostic (discovery → convert → migrate → validate → performance → report); only the conversion knowledge is source-specific. Everything below is the Teradata set.
When to use
Migrating a Teradata system (Vantage) to Amazon Redshift.
Converting Teradata DDL, SQL, stored procedures, macros, or BTEQ to Redshift/RSQL.
Assessing Teradata→Redshift migration complexity/effort.
Operating principles
Discovery is strictly read-only (SELECT-only) on the source. Never change production state: no DDL/DML, and never enable logging (
BEGIN/REPLACE QUERY LOGGING). If DBQL is empty, mark itunavailableand fall back to always-onDBC.AMPUsageV— seereferences/teradata/discovery-queries.md.Skill provides knowledge; you generate execution. Read the
references/to reason and convert — apply the rules inreferences/teradata/conversion-rules.mddirectly for conversion, and generate the discovery/migration/validation runners (and the read-only discovery collector fromreferences/teradata/discovery-queries.md) tailored to the environment.Generate, don't assume a framework. Assume the environment has Bash, Python 3, and AWS CLI + credentials. Any Python lib a generated script needs (
teradatasql,boto3, …) ispip install-ed on demand by that script / its run-instructions — pin exact versions. Teradata TTU (BTEQ/TPT) is Linux/Windows-only — not macOS; prefer WRITE_NOS +teradatasql(cross-platform, no client) for discovery/extract unless a TTU/Linux host exists.Credentials: use a read-only Teradata user; prefer IAM roles over IAM users. For production, reference credentials from AWS Secrets Manager or Systems Manager Parameter Store. For local development only, a git-ignored
.envfile or profile may be used — never commit it. Never hard-code or echo secrets. In a portable bundle, reference a co-located credentials file and ship acredentials.env.exampletemplate — the real file is git-ignored.Persist state in files. All generated output goes under a git-ignored
output/in the user's working dir; keepoutput/state.mdcurrent so work is resumable.
Workflow (phases)
Run in order; each phase's result/ feeds the next (see references/teradata/orchestration.md).
Discovery — inventory the source. →
references/teradata/discovery-queries.md(read-only collection SQL + BTEQ driver template the AI generates) →output/discovery/result/inventory.jsonConversion — schema + code. Apply the conversion rules directly, flag the manual-rewrite long tail, and fix Redshift errors from the references. →
references/teradata/conversion-rules.md,references/teradata/data-type-mapping.md,references/teradata/architecture-mapping.md,references/teradata/stored-procedure-migration.md,references/teradata/bteq-to-rsql.md,references/teradata/common-errors.mdData migration — extract → S3 → COPY, restartable. →
references/teradata/data-migration-patterns.mdValidation — counts/aggregates/sampling. →
references/teradata/validation-patterns.mdPerformance — baseline vs Redshift; size the target. →
references/teradata/performance.md,references/teradata/sizing.mdReporting — aggregate all phases. →
references/teradata/reporting.md
Conversion (how the AI applies it)
There is no converter to run — convert by applying the rules in
references/teradata/conversion-rules.md directly (with the type / architecture / stored-procedure /
BTEQ references): apply the deterministic rules to the well-understood bulk, flag the
manual-rewrite constructs with their suggested rewrites, assign a confidence per object,
and fix any Redshift errors using references/teradata/common-errors.md. The reference docs are the
single source of truth; conversion-rules.md includes golden input→output examples to match.
Execution modes (connectivity)
Connected — your host can reach Teradata/Redshift → run the generated scripts in place.
Disconnected — it can't → generate a self-contained bundle under
output/<phase>/(script + co-located credentials template + relativeresult/+run-instructions.md); the operator runs it on a reachable host and copiesresult/back. The copied-backresult/is the durable state — read it (+state.md) and continue.
Project-workspace layout (per migration run)
<project-workspace>/
migration-config.yaml # operator-authored: endpoints, scope, strategy
.gitignore # ignores output/
output/ # everything generated (git-ignored)
state.md # progress cursor
discovery/ … result/inventory.json
conversion/ … result/{ddl,sql,procedures,rsql}/ manual_review.json
data_migration/ … result/{extract,load,templates}/ migration_manifest.json
validation/ … result/validation_report.json
performance/ … result/{perf_baseline,perf_compare}.json
reporting/ result/migration_report.mdSecurity considerations
No shipped code or dependencies. This skill is text-only — the customer runs nothing from it. Any runner the AI generates MUST pin exact dependency versions, validate/sanitize inputs (file paths, SQL, shell args), and never print or log credentials, secrets, or PII.
Least privilege + ephemeral credentials. Use a read-only Teradata user for discovery. On AWS prefer IAM roles over IAM users and IAM auth over username/password. Keep secrets in AWS Secrets Manager / Parameter Store — never hard-code, echo, or commit them (credentials files are git-ignored; ship only
*.exampletemplates).Data in transit / at rest. Use TLS to both engines; stage extracts in an encrypted S3 bucket (SSE) with a least-privilege bucket policy; load via
COPY … IAM_ROLE(not access keys). Enable encryption on the target Redshift cluster.Blast radius. Discovery is read-only by design. Migration writes to the target — validate against a throwaway / non-production Redshift first, and never point a generated write-path at production without explicit operator confirmation.
No secret leakage in artifacts. Generated
output/…(manifests, reports,state.md) MUST NOT embed credentials or endpoints beyond what the operator supplies inmigration-config.yaml.COPY
IAM_ROLEhardening. Scope the role's policy to the specific staging prefix (not bucket-wides3:*), and include condition keys in its trust policy (aws:SourceAccount/aws:SourceArn, orsts:ExternalIdfor cross-account) to prevent confused-deputy assumption — per Redshift IAM-role authorization best practices.Logging & monitoring. Enable CloudTrail (S3 data events on the staging bucket + Redshift management events), Redshift audit logging (connection/user-activity logs to S3 or CloudWatch), and CloudWatch alarms on COPY failures or unusual staging-bucket access during the migration.
The AWS MCP server (recommended runtime) additionally provides sandboxed execution and audit logging for the generated scripts.
References (specialized knowledge)
| File | Topic |
|---|---|
references/teradata/orchestration.md | phase workflow + state model |
references/teradata/conversion-rules.md | the 72 conversion rules (source of truth) |
references/teradata/data-type-mapping.md | TD→RS type mapping |
references/teradata/architecture-mapping.md | PI→DISTKEY, PPI→SORTKEY, Join Index→MV |
references/teradata/stored-procedure-migration.md | SP → PL/pgSQL |
references/teradata/bteq-to-rsql.md | BTEQ → RSQL |
references/teradata/common-errors.md | common Redshift errors + fixes |
references/teradata/discovery-queries.md | DBC system-view inventory queries |
references/teradata/data-migration-patterns.md | COPY/TPT/micro-batch/checkpoint |
references/teradata/validation-patterns.md | row-count/aggregate/sample compare |
references/teradata/performance.md | representative-query extraction + compare |
references/teradata/sizing.md | RG node type + count from the source profile |
references/teradata/reporting.md | migration status-report generation |
Files
- ATTRIBUTION.mdAdded by AutoGineer945 B
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer67 B
- SKILL.md10.8 KiB
- references/teradata/architecture-mapping.md5.8 KiB
- references/teradata/bteq-to-rsql.md4.1 KiB
- references/teradata/common-errors.md3.7 KiB
- references/teradata/conversion-rules.md16.8 KiB
- references/teradata/data-migration-patterns.md12.9 KiB
- references/teradata/data-type-mapping.md3.4 KiB
- references/teradata/discovery-queries.md14.7 KiB
- references/teradata/orchestration.md7.1 KiB
- references/teradata/performance.md6.6 KiB
- references/teradata/reporting.md4.2 KiB
- references/teradata/sizing.md7.3 KiB
- references/teradata/stored-procedure-migration.md5.1 KiB
- references/teradata/validation-patterns.md5.9 KiB
references/teradata/discovery-queries.md
Discovery — DBC system-view queries
AI-facing knowledge: the read-only
DBCcatalog queries the AI uses to build a discovery runner for the customer's environment, and theinventory.jsoncontract the runner produces. This doc is the knowledge — the AI generates the actual runner (connected) or a portable bundle (disconnected); seereferences/teradata/orchestration.md.
Purpose
Inventory the source Teradata system — version/parallelism, databases, objects (tables,
views, macros, procedures), storage, AMP skew, and an always-available workload signal —
to produce output/discovery/result/inventory.json. Every later phase (conversion,
migration, validation, performance, reporting) reads this contract.
All queries are SELECT-only against DBC catalog views. No DDL/DML, no user-table
data — safe for a DBA to run on production.
Source of truth: the queries in this doc ARE the source of truth. The skill ships no executable collector — the AI generates the runner (a BTEQ driver or a
teradatasqlscript) at run time from the SQL below, adapting to how the customer can reach the source. See Execution modes for the BTEQ driver template the AI should emit.
DBC views used
| View | Purpose | Grain |
|---|---|---|
DBC.DBCInfoV | Teradata version / release | system |
DBC.DiskSpaceV | permanent space per database (CurrentPerm/MaxPerm) | per AMP → SUM |
DBC.TableSizeV | permanent space per table and per AMP (skew) | per table × AMP → SUM |
DBC.TablesV | object counts by TableKind | per database |
DBC.ColumnsV | column inventory for DDL/conversion | per column |
DBC.IndicesV | PI / PPI / secondary indexes | per index column |
DBC.AMPUsageV | cumulative CPU/IO by account+user (always-on) | per AMP → SUM |
DBC.DBQLogTbl | query history (workload) — often disabled | per query |
DBC.ResUsageSpma | system resource time series — often disabled | per node × sample |
amp_count comes from the number of distinct Vproc rows in DBC.TableSizeV (or
HASHAMP()+1). node_count is best-effort and not always derivable offline.
System & version
-- DBC.DBCInfoV → td_version
SELECT TRIM(InfoKey) || '|' || TRIM(InfoData) AS rec
FROM DBC.DBCInfoV
WHERE InfoKey IN ('VERSION', 'RELEASE')
ORDER BY InfoKey;Collection manifest (provenance for collection_meta: collected_at + td_version).
Both rows read DBC.DBCInfoV on purpose — a constant SELECT with no FROM fails inside a
UNION (Failure 3888), so the timestamp row is anchored to a 1-row catalog read:
SELECT 'collected_at|' || CAST(CURRENT_TIMESTAMP(0) AS VARCHAR(40)) AS rec
FROM DBC.DBCInfoV WHERE InfoKey = 'VERSION'
UNION ALL
SELECT 'td_version|' || TRIM(InfoData) FROM DBC.DBCInfoV WHERE InfoKey = 'VERSION';Storage & skew
-- Per database (summed across AMPs). HAVING drops empty databases.
SELECT TRIM(DatabaseName) || '|' ||
TRIM(CAST(SUM(CurrentPerm) AS BIGINT)) || '|' ||
TRIM(CAST(SUM(MaxPerm) AS BIGINT)) AS rec
FROM DBC.DiskSpaceV
GROUP BY DatabaseName
HAVING SUM(CurrentPerm) > 0
ORDER BY SUM(CurrentPerm) DESC;
-- Per table (summed across AMPs) — total sizes + largest-table ranking.
SELECT TRIM(DataBaseName) || '|' || TRIM(TableName) || '|' ||
TRIM(CAST(SUM(CurrentPerm) AS BIGINT)) AS rec
FROM DBC.TableSizeV
GROUP BY DataBaseName, TableName
HAVING SUM(CurrentPerm) > 0
ORDER BY SUM(CurrentPerm) DESC;
-- Per AMP (Vproc) — drives system-wide skew and AMP count (~#AMPs rows).
SELECT TRIM(CAST(Vproc AS INTEGER)) || '|' ||
TRIM(CAST(SUM(CurrentPerm) AS BIGINT)) AS rec
FROM DBC.TableSizeV
GROUP BY Vproc
ORDER BY Vproc;System skew is derived from the per-AMP space: system_skew_pct = (1 - avg/max) * 100
over each AMP's SUM(CurrentPerm). High skew on the source is a signal for choosing
Redshift DISTKEY/DISTSTYLE (see references/teradata/architecture-mapping.md).
Object inventory
-- Counts by TableKind: T=table, V=view, M=macro, P=procedure; others → 'other'.
SELECT TRIM(DatabaseName) || '|' || TRIM(TableKind) || '|' ||
TRIM(CAST(COUNT(*) AS BIGINT)) AS rec
FROM DBC.TablesV
GROUP BY DatabaseName, TableKind
ORDER BY DatabaseName, TableKind;For the conversion phase, extract column and index detail per table, and the DDL.
These are NOT part of the fixed discovery bundle (the 14 inventory queries above / below). They are parameterized or dynamic, so the AI runs them on demand during conversion, not as static bundle files:
Connected mode: bind
DatabaseNameper user database (loop over the databases found indbc_tablesv), and loopSHOW TABLE/SHOW VIEWover each object.Disconnected mode: the operator either substitutes the target database name into the
WHEREbefore running (dropping the?), or the AI templates one file per database.SHOW TABLE/SHOW VIEWmust be expanded to concrete object names first — they cannot ship as a single static file. Their output is per-conversion, not part ofinventory.json.
-- Columns (feeds data-type-mapping + DDL generation). ? = one user database
SELECT DatabaseName, TableName, ColumnName, ColumnType, ColumnLength,
DecimalTotalDigits, DecimalFractionalDigits, Nullable, DefaultValue, ColumnId
FROM DBC.ColumnsV
WHERE DatabaseName = ? -- scope to user databases
ORDER BY DatabaseName, TableName, ColumnId;
-- Indexes → PI/PPI/secondary (feeds PI→DISTKEY, PPI→SORTKEY). ? = one user database
SELECT DatabaseName, TableName, IndexNumber, IndexType, UniqueFlag, ColumnName, ColumnPosition
FROM DBC.IndicesV
WHERE DatabaseName = ?
ORDER BY DatabaseName, TableName, IndexNumber, ColumnPosition;Authoritative DDL comes from SHOW (dynamic — expand <db>.<table> from dbc_tablesv):
SHOW TABLE <db>.<table>; -- canonical DDL (PI/PPI, COMPRESS, MULTISET, etc.)
SHOW VIEW <db>.<view>;Workload signal
DBC.AMPUsageV is the always-available coarse signal (cumulative since last reset);
richer history (DBQLogTbl, ResUsageSpma) is often disabled — see
references/teradata/performance.md for those plus sizing.
-- Coarse cumulative CPU/IO by account+user (always on).
SELECT TRIM(AccountName) || '|' || TRIM(UserName) || '|' ||
TRIM(CAST(SUM(CpuTime) AS BIGINT)) || '|' ||
TRIM(CAST(SUM(DiskIO) AS BIGINT)) AS rec
FROM DBC.AMPUsageV
GROUP BY AccountName, UserName
HAVING SUM(CpuTime) > 0
ORDER BY SUM(CpuTime) DESC;Availability (optional sources may be off)
DBQL and ResUsage are frequently disabled on a source system. Probe each with a row
count; 0 rows → mark the source unavailable and continue — the inventory always
parses without them.
Never enable logging on the source. Do not run BEGIN QUERY LOGGING /
REPLACE QUERY LOGGING (or any DDL/DCL) on the customer's production system — discovery
is strictly SELECT-only, and changing logging state is a production change with storage
and privilege implications. If DBQL is empty, fall back to DBC.AMPUsageV (always-on
cumulative CPU/IO by account) as the workload signal, and note the reduced granularity
in the inventory. Only the customer's own DBA may choose to enable DBQL, on their
change process — it is never a step this migration performs.
SELECT 'dbql' || '|' || TRIM(CAST(COUNT(*) AS BIGINT)) AS rec FROM DBC.DBQLogTbl;
SELECT 'resusage' || '|' || TRIM(CAST(COUNT(*) AS BIGINT)) AS rec FROM DBC.ResUsageSpma;Wrap each optional source as {status, reason, row_count} in the contract (below) rather
than assuming it is present.
inventory.json contract
Facts only — no Redshift/target judgments — so the same shape can describe other sources later. Optional workload sources are availability-wrapped.
{
"collection_meta": {
"collected_at": "2026-06-24T03:00:00",
"td_version": "20.00.30.77",
"source_host": "<host>",
"available_sources": ["ampusage", "dbql"]
},
"system": { "amp_count": 24, "node_count": 2, "td_version": "20.00.30.77" },
"storage": {
"total_current_perm_bytes": 0,
"total_max_perm_bytes": 0,
"by_database": [{ "database": "tpcds", "current_perm_bytes": 0, "max_perm_bytes": 0, "is_system": false }],
"top_tables": [{ "database": "tpcds", "table": "store_sales", "current_perm_bytes": 0 }]
},
"skew": {
"amp_space": [{ "vproc": 0, "current_perm_bytes": 0 }],
"system_skew_pct": 0.0
},
"objects": {
"by_database": [{ "database": "tpcds", "tables": 24, "views": 0, "macros": 0, "procedures": 0, "other": 0 }]
},
"workload": {
"cpu_io_by_user": [{ "account": "$M", "user": "tester", "cpu_time": 0.0, "disk_io": 0.0 }],
"query_log": { "status": "unavailable", "reason": "DBQL logging off (0 rows)", "row_count": 0 },
"resource_usage":{ "status": "available", "reason": "", "row_count": 0 },
"query_stats": null,
"resource_stats": null
}
}| Field | Source | Notes |
|---|---|---|
system.amp_count | distinct Vproc in TableSizeV | parallelism driver for sizing |
system.node_count | best-effort | often null offline |
storage.by_database[].is_system | name allowlist | DBC, TD*, TDaaS_*, Sys*, … excluded from user storage |
skew.system_skew_pct | (1 - avg/max) * 100 over per-AMP perm | DISTKEY signal |
objects.by_database[] | TablesV.TableKind | T/V/M/P, else other |
workload.query_log / resource_usage | probe row counts | unavailable when 0 rows |
workload.query_stats / resource_stats | DBQL / ResUsage | populated only when available — see performance.md |
Gotchas (learned on a live Vantage 20.00)
TableSizeVhas noRowCountcolumn and is per-AMP → alwaysSUM(CurrentPerm) GROUP BYtable/AMP. For row counts useSELECT COUNT(*)per table (or collected stats), never TableSizeV.PI on a PPI table reports
IndexType='Q', not'P'— identify the primary index byIndexNumber = 1rather than filteringIndexType='P', or PPI tables lose their PI.Constant
SELECTwithoutFROMfails inside aUNION(Failure 3888). Anchor any literal row to a 1-row catalog read, e.g.... FROM DBC.DBCInfoV WHERE InfoKey='VERSION'.GROUP BY 1fails when column 1 contains an aggregate (Failure 3625) → group by the underlying expression, not the positional alias.DBC.AMPUsageVis cumulative since the last reset — treat it as a coarse relative signal, not an absolute window.
Execution modes
The AI generates the collector at run time — nothing executable ships with the skill. Pick the mode from how the customer can reach the source:
Connected — the AI generates a runner (e.g.
teradatasql) that runs the queries and writesresult/inventory.jsondirectly.Disconnected — the AI emits a portable bundle the operator runs on a reachable host: each query as a static
.sqlfile plus a thin BTEQ driver (or plain SQL), returning the dumps that are then parsed intoinventory.json.
In both modes the queries above are the single source; the generated driver only runs them.
Client prerequisite. The BTEQ driver needs the Teradata client (TTU) — Linux/Windows only, not macOS. On a host without TTU (e.g. macOS), generate the
teradatasqlcollector instead (pure-Python, cross-platform); reserve the BTEQ driver for hosts that already have TTU.
BTEQ driver template (disconnected mode)
The AI emits one .sql file per query under a sql/ subfolder, alongside a driver
collect.btq. This is a template to generate, not a shipped file; it is READ-ONLY
(SELECT against DBC only) and safe for a DBA to run on production.
Fixed bundle contract — generate exactly these 14 files with these names. The .sql
stem, the .EXPORT CSV stem, and the parser key are all the same string, so the names are a
contract, not a free choice. Where one DBC view backs several queries, the grain suffix
disambiguates:
.sql file (→ same-stem .csv) | DBC view | grain / purpose |
|---|---|---|
manifest | DBCInfoV | provenance: collected_at + td_version |
dbc_dbcinfov | DBCInfoV | version / release |
dbc_diskspacev | DiskSpaceV | per-database perm space |
dbc_tablesizev_by_table | TableSizeV | per-table size (top tables) |
dbc_tablesizev_by_amp | TableSizeV | per-AMP space (skew + AMP count) |
dbc_tablesv | TablesV | object counts by TableKind |
dbc_ampusagev | AMPUsageV | cumulative CPU/IO by account+user |
dbc_dbqlogtbl | DBQLogTbl | availability probe (row count) |
dbc_dbqlogtbl_summary | DBQLogTbl | overall stats |
dbc_dbqlogtbl_by_statement | DBQLogTbl | statement-type mix |
dbc_dbqlogtbl_by_user | DBQLogTbl | top users |
dbc_dbqlogtbl_by_hour | DBQLogTbl | count by hour (peak_hour) |
dbc_resusagespma | ResUsageSpma | availability probe (row count) |
dbc_resusagespma_summary | ResUsageSpma | CPU-busy% summary |
ColumnsV / IndicesV / SHOW are not in this bundle — they run during conversion (see
"Object inventory" above). Driver step order follows the table top-to-bottom. Example driver:
/* collect.btq — generated BTEQ driver (READ-ONLY). Run from the bundle root. */
.LOGON <HOST>/<USER>
.SET WIDTH 500
.SET TITLEDASHES OFF
.SET FOLDLINE OFF
.EXPORT REPORT FILE=dbc_diskspacev.csv
.RUN FILE = sql/dbc_diskspacev.sql
.EXPORT RESET
/* ... one .EXPORT REPORT / .RUN FILE / .EXPORT RESET triple per query ... */
.LOGOFF
.QUITBTEQ dot-commands used, and why:
| Command | Purpose |
|---|---|
.LOGON <HOST>/<USER> | connect; BTEQ prompts for the password (never hard-code it) |
.SET WIDTH 500 | widen the line so long pipe-delimited records aren't truncated |
.SET TITLEDASHES OFF | suppress the --- dashed separator row under column titles |
.SET FOLDLINE OFF | keep each record on one physical line (no wrapping) |
.EXPORT REPORT FILE=<view>.csv | send the next query's output to a text file (REPORT, not DATA which is binary) |
.RUN FILE = sql/<view>.sql | run the query from its static .sql file |
.EXPORT RESET | close the current export before the next one |
Each query emits one TRIM(...) || '|' || TRIM(...) record per row (pipe-delimited), so
the output parses without a header. If a view is unavailable (DBQL/ResUsage logging off, or
no permission) that step yields an empty/short file and collection continues.
How a human runs the bundle: edit the .LOGON line (<HOST>/<USER>), then from the
bundle root (so the relative sql/ paths resolve) run bteq < collect.btq (BTEQ prompts
for the password) and return every dbc_*.csv plus manifest.csv produced.
Source endpoints (host/port/user) come from
migration-config.yaml— operator-provided, never hard-coded in the skill.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server, Needs Python, Needs Node.js
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- AWS
- Publisher
- AWS (Official)
- Source
- aws/agent-toolkit-for-aws · skills/specialized-skills/analytics-skills/migrating-to-amazon-redshift · commit 0a218f8
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by AWS or AWS.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download migrating-to-amazon-redshift.zip