Skip to content

Dataset

Teradata warehouse table datasets for AI training

A Teradata dataset is an export of chosen databases from a business's Teradata Vantage system: tables with their SHOW TABLE definitions, the views, macros and stored procedures layered over them, join index definitions, the BTEQ and load scripts that feed the warehouse, and the DBQL query log where it was kept. SourceX sources it to a buyer's spec from established businesses that run Teradata as their enterprise data warehouse. Each dataset is de-identified, with customer and account identifiers replaced by keys that still join, and licensed for an agreed permitted use.

Dataset manifest

Sourced to your spec
What it is
Tables from chosen Teradata databases with their definitions, view layers, macros, procedures, load scripts and, where kept, the query log
Typical systems
Teradata Vantage or an earlier Teradata Database release, with DBQL logging and a PDCR history database where the site ran them
Typical history
Specified by the buyer; warehouses often span many years, and row versions exist only in history or temporal tables
Modality
Relational rows; SQL text of views, macros, procedures and scripts; logged requests
Delivery formats
Agreed per order; Parquet or delimited files per table, the SHOW text of every object, and JSONL for query log rows
Preparation
Customer, account and subscriber identifiers replaced with keys that still join; literals in logged SQL masked; logon lines removed from scripts
Licensing
Rights reviewed per business and per subject area; permitted use set in the license
Availability
Sourced to your spec from businesses that agree; supply is not guaranteed
Structured recordsIllustrative

What a delivery contains

Fields vary by source system and are fixed per order. A typical delivery includes:

FieldTypeWhat it holds
database_namestringThe Teradata database or user that owns the object, as DatabaseName in DBC.TablesV gives it.
object_namestringTableName from DBC.TablesV, which lists tables, views, macros and procedures alike.
object_kindenumTableKind from DBC.TablesV: T for a table, V for a view, M for a macro, P for a stored procedure, with other codes for join indexes and the rest.
ddl_textstringThe text SHOW TABLE, SHOW VIEW, SHOW MACRO or SHOW PROCEDURE returned for the object, with COMPRESS value lists reviewed.
set_or_multisetenumWhether the table was created SET or MULTISET, read from its SHOW TABLE text.
primary_indexobjectPrimary index columns and whether the index is unique, from DBC.IndicesV, with the PARTITION BY expression from the SHOW TABLE text if the table is partitioned.
columnsarrayDBC.ColumnsV rows: ColumnName, the ColumnType code, length, decimal digits, Nullable and comment, plus CASESPECIFIC, FORMAT and TITLE from the DDL.
temporalobjectWhether the table carries VALIDTIME or TRANSACTIONTIME period columns, and the temporal qualifier the export query used.
row_countintegerCOUNT(*) on the table at export time, since the DBC views hold no live row count.
exportobjectThe utility that wrote the files (TPT Export, FastExport, BTEQ or WRITE_NOS), the format, delimiter, null marker and session character set.
view_layerarrayViews that select from the table, from the one-to-one access view up to business views, each with its own SHOW VIEW text.
query_logarrayDBQL rows that touched the object, from DBC.DBQLogTbl or the site's history table: QueryID, a key for UserName, StartTime, StatementType, ErrorCode, AMPCPUTime and the SQL text.
scriptsarrayBTEQ scripts and TPT, FastLoad or MultiLoad job files that load or read the object, with .LOGON lines and other credentials removed.
Sample recordIllustrative

Field names from the table above; values are masked placeholders.

Example record

{
  "database_name": "EDW_CORE",
  "object_name": "ACCT_BAL_HIST",
  "object_kind": "T",
  "ddl_text": "CREATE SET TABLE EDW_CORE.ACCT_BAL_HIST ,FALLBACK\n  (\n   ACCT_KEY DECIMAL(18,0) NOT NULL,\n   BAL_DT DATE FORMAT 'YYYY-MM-DD' NOT NULL,\n   PROD_CD CHAR(4) CHARACTER SET LATIN NOT CASESPECIFIC COMPRESS ('CHK ','SAV '),\n   LEDGER_BAL_AMT DECIMAL(18,2) COMPRESS 0.00)\nPRIMARY INDEX ( ACCT_KEY );",
  "set_or_multiset": "SET",
  "primary_index": {
    "columns": [
      "ACCT_KEY"
    ],
    "unique": false,
    "partitioned_by": null
  },
  "columns": [
    {
      "name": "ACCT_KEY",
      "column_type": "D",
      "digits": 18,
      "nullable": "N",
      "comment": "Surrogate key for the account"
    }
  ],
  "temporal": {
    "valid_time": false,
    "transaction_time": false,
    "qualifier_used": null
  },
  "row_count": 412883910,
  "export": {
    "utility": "TPT Export",
    "format": "Delimited",
    "delimiter": "|",
    "null_marker": "",
    "session_charset": "UTF8"
  },
  "view_layer": [
    {
      "view": "EDW_V.ACCT_BAL_HIST",
      "kind": "access view",
      "locking": "ROW FOR ACCESS"
    },
    {
      "view": "FIN_BV.MONTH_END_BALANCE",
      "kind": "business view"
    }
  ],
  "query_log": [
    {
      "query_id": "q_30711882",
      "user_key": "u_batch_07",
      "start_time": "2024-02-01T02:14:07",
      "statement_type": "Insert",
      "error_code": 0,
      "sql_text": "INSERT INTO EDW_CORE.ACCT_BAL_HIST SELECT * FROM EDW_STG.ACCT_BAL_DLY;"
    },
    {
      "query_id": "q_30745120",
      "user_key": "u_analyst_112",
      "start_time": "2024-02-01T09:41:55",
      "statement_type": "Select",
      "error_code": 0,
      "sql_text": "SEL PROD_CD, SUM(LEDGER_BAL_AMT) FROM EDW_V.ACCT_BAL_HIST WHERE BAL_DT = DATE '2024-01-31' GROUP BY 1;"
    }
  ],
  "scripts": [
    {
      "path": "etl/load_acct_bal_hist.bteq",
      "kind": "BTEQ",
      "logon_removed": true
    }
  ]
}

Synthetic record for illustration. Field names, structure and format are agreed per order.

What AI teams use it for

Train text-to-SQL on Teradata's dialect

Logged requests against real views show QUALIFY, SEL and macro calls that public SQL sets rarely contain.

Translate warehouse code between platforms

DDL, views, macros, procedures and BTEQ scripts are source material for converting Teradata SQL to another warehouse.

Train tabular models on integrated data

Many subject areas keyed to the same customers and accounts give wide, joined tables with real distributions and nulls.

Teach agents to read load pipelines

Load scripts beside the tables they fill show staging, deduplication and history handling as coded.

Build SQL evaluation sets

Logged requests with error codes, against a delivered schema, give queries whose outcome is known.

Use-case guides: Coding agents, Enterprise and computer-use agents, Private evaluation sets

What makes this data valuable

Every layer's text

SHOW output exists for each table, view, macro and procedure the logged SQL names.

Table kind stated

Each table is marked SET or MULTISET, with the load statement that fills it.

Full SQL text

Log rows join to complete statements, not only the truncated QueryText.

Reconciled counts

File row counts match a COUNT(*) taken at export for every table.

Keys that still join

Replaced customer and account keys are consistent across subject areas.

Comments and titles

Column comments and TITLE phrases give business names for terse columns.

System export

Teradata dataset

This page covers teradata warehouse tables.Illustrative

A warehouse reached through views, where SET tables drop duplicate rows

A Teradata system is typically the central warehouse of a large business, often a bank, telecom or retailer: one store modeled by subject area, loaded from many source systems and kept for years. Its users seldom query base tables. Sites commonly put a one-to-one access view over each table, often with a LOCKING ROW FOR ACCESS modifier so reads do not wait on loads, and build business views on top of those. Macros, which are named SQL requests run with EXEC, and stored procedures hold reporting logic. A table export without the SHOW VIEW and SHOW MACRO text loses the names analysts used, and logged queries then refer to objects the delivery lacks.

Table kind changes what a count means. A table created SET cannot hold two rows that match in every column. A single-row INSERT of such a row fails with a duplicate row error, but INSERT with SELECT, the usual load statement, discards the duplicates without any message, both inside the batch and against rows already present. In Teradata session mode, SET is also the default when CREATE TABLE names neither kind. Two identical call detail rows loaded this way are stored once, and nothing in the table records how many were dropped.

The primary index decides how rows are hashed across the system's AMPs and enforces uniqueness only when declared UNIQUE, and foreign keys are often left undeclared. Character columns default to NOT CASESPECIFIC in Teradata mode, so values that differ only in case compare as equal inside the warehouse and stop doing so once exported. History is whatever the load wrote, except in temporal tables, where VALIDTIME and TRANSACTIONTIME period columns keep row versions.

Query logs exist only where DBQL was on, and table data leaves as flat files

Teradata records users' SQL only under a BEGIN QUERY LOGGING rule, and many systems log little or nothing. Where logging ran, DBC.DBQLogTbl has one row per request with only the first part of the statement in QueryText. The full text is in DBC.DBQLSqlTbl if the rule asked for it, and the objects touched are in DBC.DBQLObjTbl on the same condition. A rule written with a SUMMARY or THRESHOLD limit counts some or all requests instead of logging each one. Sites usually move these rows on a schedule to a history database such as the PDCR tables, where retention is the site's own decision.

Table data leaves through utilities built for flat files. BTEQ, FastExport and the Export operator of Teradata Parallel Transporter normally write delimited text, fixed-width text or Teradata's binary record formats, not an open columnar format. A BTEQ report export shapes each value by the column's FORMAT phrase and the line width and by default prints a question mark for a null. Newer Vantage releases can write Parquet to object storage from inside the database with WRITE_NOS, where the site permits it. Otherwise a Parquet delivery was converted after export, and decimals, timestamps with time zones, period values and padded CHAR columns depend on that conversion.

To test a sample, reconcile each file against a COUNT(*) run at export, since DBC.TableSizeV reports space per AMP and not rows. Read SHOW TABLE for SET or MULTISET and for COMPRESS lists, which hold real column values. Ask which temporal qualifier the export query used, because by default a plain SELECT on a temporal table returns current rows only. Join a few log rows to their full SQL text and check that literals are masked.

What to check before licensing

  • Have the buyer's counsel and the data owner read Teradata's license terms on exported data, the export utilities and query log tables.
  • Check that regulated customer, account and call detail data is de-identified, that replaced keys still join across tables, and that free-text columns and COMPRESS lists in the DDL were reviewed.
  • Ask which subject areas were loaded from third parties, such as credit bureau or purchased demographic data, and confirm they are excluded or cleared.
  • Ask whether the schema follows an industry data model licensed from a vendor, and whether its table and column definitions may be passed on.
  • For each table, read SET or MULTISET from the DDL, ask how loads treated duplicates, and interpret row counts accordingly.
  • Ask which users DBQL covered and with which options, whether full SQL text was kept, where history rows were moved and how far back they go.
  • Ask which utility wrote each file, how Parquet was produced, and which temporal qualifier was used, then reconcile row counts on a sample.

Delivery No files move before a signed license. A listing or a request grants no files by itself.

How licensing works through SourceX

  1. 1

    Define

    Send the domain, modality, volume, format, timeline and permitted use you need.

  2. 2

    Source

    SourceX identifies businesses that hold matching data and are open to licensing it.

  3. 3

    Qualify

    Fit, rights and quality are checked, and you review samples before committing.

  4. 4

    License

    Scope, permitted use, exclusivity, price and obligations are agreed in writing.

  5. 5

    Deliver

    Approved data is prepared, de-identified where required and transferred securely.

Questions Acquisition Partners ask

What does a Teradata dataset contain?

It contains the tables of the databases you scope, with the definition text of every object around them. That means SHOW TABLE output, views, macros, stored procedures and join index definitions, plus the BTEQ and load scripts the business agrees to release. Query log rows are included only where the site had DBQL logging on and kept the history.

Does the export include the SQL that users ran?

Only where query logging was enabled. Teradata writes requests to its DBQL tables under logging rules a DBA sets, and many sites log some users, only summaries, or nothing. Ask which users were covered, which options were on and how long the history database keeps rows.

Why can a Teradata table hold fewer rows than its source?

Because a SET table stores only one copy of rows that match in every column. An INSERT with SELECT into a SET table drops such duplicates without an error, so repeated events from a source system can vanish at load. Check each table's kind in its DDL.

What file formats does a Teradata export arrive in?

It depends on the export route. Teradata's classic export utilities write delimited, fixed-width or binary files, and newer Vantage releases can write Parquet to object storage from inside the database. Ask which route was used, how nulls, decimals, timestamps and padded character columns were handled, and whether row counts were reconciled.

How is customer and account data handled?

Identifiers are replaced with keys before delivery so that tables still join, and direct personal fields are removed or replaced. Warehouses at banks and telecoms hold regulated account and call detail data, and some subject areas come from third parties the business cannot license on. The buyer should confirm the method with counsel, review free-text columns, and ask which areas were excluded.

Is SourceX affiliated with Teradata?

Teradata Vantage is named to identify the system the records come from. That does not imply a partnership with or endorsement by Teradata. The records belong to the business that runs Teradata Vantage, which licenses them under a signed agreement, and a request does not guarantee a matching dataset. Buyers should still confirm with counsel that the vendor's terms allow the intended use of exported data.

Evaluating this data for procurement?

Diligence packets are prepared per dataset. Rights, privacy processing and quality differ between datasets.

Request dataset diligence

Tell us what your models need

Send your spec — domain, volume, format, timeline and permitted use — and SourceX will match it against partner data and come back with what can be licensed.

Updated 26 November 2026.

See if your company qualifies