Import Schema

Available to: Developers, Admins Minimum plan: Free

Instead of manually defining columns one by one, you can import a table schema from a data file. TitanRDM analyses the file's structure and automatically creates column definitions with inferred data types — a fast way to bootstrap a table definition from an existing data source.

Import schema page


Prerequisites

  • The table definition must have no existing column definitions. Import Schema is only available for brand-new tables that have not yet had columns defined.
  • You need Developer permission on the table's domain and branch.

Note: If the table already has columns, Import Schema is disabled. Use Import Mappings instead to map an incoming file to existing columns.


Supported File Formats

You can import schema from any file format supported by TitanRDM's schema probing:

FormatExtensionsNotes
CSV.csvColumn names from the header row. Types inferred from data values.
Excel.xlsx, .xlsmReads the first sheet. Column names from the header row.
JSON.jsonArray of objects. Keys become column names.
Parquet.parquetColumn names and types from the Parquet schema (most accurate).

How It Works

  1. You upload a data file to TitanRDM
  2. The file is processed by the Schema Probe service
  3. The service analyses the file structure and infers:
    • Column names — from header rows or object keys
    • Data types — by sampling values and selecting the best-fit PostgreSQL type
    • Length/precision — estimated from the maximum observed values
  4. Column definitions are created automatically on your table definition

Type Inference Rules

The schema probe maps file data to TitanRDM column types:

Detected PatternInferred TypeNotes
Whole numbersinteger or bigintbigint if values exceed integer range
Numbers with decimalsdecimalPrecision and scale inferred from observed values
True/false valuesboolean
Date strings (YYYY-MM-DD)date
Datetime stringstimestamp or timestamptz
All other valuesvarcharLength inferred from longest observed value

Tip: Parquet files provide the most accurate schema import because data types are encoded in the file format itself, rather than being inferred from string values.


Step-by-Step

Step 1: Create a Table Definition

  1. Navigate to Development > Table Definitions
  2. Click New Table Definition
  3. Fill in the name, domain, and load type
  4. Click Create Table Definition

Step 2: Import the Schema

After creation, you are taken to the Edit Columns page. Since the table has no columns:

  1. Click Import Schema (available in the toolbar or from the table definition's action menu)
  2. Upload your data file
  3. Wait for the file to be processed

Step 3: Review the Results

Once processing completes, you are redirected to the Edit Columns page with all inferred columns populated:

  • Review each column's name and data type
  • Adjust types, lengths, or scales as needed (the inference is a best guess)
  • Add primary key flags
  • Add required flags
  • Set up foreign key references if applicable
  • Add valid values constraints
  • Reorder columns if desired

Step 4: Deploy

Once you are satisfied with the column definitions, deploy the table as normal.


Column Name Normalisation

Imported column names are normalised to be valid identifiers:

  • Spaces and special characters are replaced with underscores
  • Leading digits are prefixed with an underscore
  • Names are lowercased

For example: - Product Codeproduct_code - 2024 Revenue_2024_revenue - Customer Name (Full)customer_name_full


Limitations

  • Import Schema is only available for tables with no existing columns. You cannot use it to add columns to a table that already has a defined structure.
  • The inferred types are a best effort — always review and adjust before deploying.
  • Very large files may take longer to process as the schema probe needs to sample enough rows to make accurate type decisions.
  • The uploaded file is deleted from storage after schema extraction is complete.