Docs/Streams/Features

Database Structure Options

Structure options control which parts of the target table definition DBConvert Streams creates when Create structure is enabled.

Use this page when:

  • you want DBConvert Streams to create target tables for you
  • you want to skip indexes, foreign keys, or check constraints during the initial run
  • you need to understand what the advanced toggles in the wizard actually do

In the API, these settings live in target.spec.db.structureOptions.

How the UI works

In the stream wizard, the Structure & Data step has a master Create structure checkbox.

When that checkbox is enabled, you can open Advanced options and choose:

  • Tables
  • Indexes
  • Foreign keys
  • Check constraints

These toggles refine structure creation. They do not currently backfill indexes, foreign keys, or check constraints onto existing tables by themselves when table creation is off.

Options

Label in UIAPI fieldWhat it affects during table creationIgnored when
TablestablesCreates target tables when they do not exist.Create structure is off.
IndexesindexesCreates primary keys, unique indexes, and secondary indexes as part of table materialization.Create structure is off, or table creation is off.
Foreign keysforeignKeysAdds foreign key constraints after tables are created.Create structure is off, or table creation is off.
Check constraintscheckConstraintsIncludes check constraints in generated table DDL.Create structure is off, or table creation is off.

All four options default to true.

Common setups

GoalTablesIndexesForeign keysCheck constraints
Strict schema copyOnOnOnOn
Faster initial loadOnOffOffOn
DBA-managed existing schemaOffOffOffOff
Create missing tables but avoid relationship enforcementOnOnOffOn

When to disable each option

OptionDisable it when
TablesThe target schema is managed outside the stream and DBConvert Streams should only write data.
IndexesYou want to reduce write overhead during a large initial load and create indexes later.
Foreign keysYou want to avoid insert-order issues or reduce enforcement overhead during loading.
Check constraintsThe source constraints use engine-specific expressions that may not translate cleanly.

What does not happen

If Tables is off, the other toggles are not used as standalone “patch existing schema” actions for already-existing tables.

Use Target Schema and Data Policies with this page: structure options decide what to create, schema policy decides whether creation is allowed, and write mode decides what to do with existing rows.

API example

This example creates tables and check constraints, but skips indexes and foreign keys:

{
  "target": {
    "id": "conn_TARGET_ID",
    "spec": {
      "db": {
        "database": "target_db",
        "structureOptions": {
          "tables": true,
          "indexes": false,
          "foreignKeys": false,
          "checkConstraints": true
        }
      }
    }
  }
}

Verification

After you start the stream:

  • confirm the stream reaches structure creation instead of stopping on schema policy validation
  • if indexes or foreign keys are disabled, verify that the target tables exist without those extra objects
  • if Tables is off, do not expect DBConvert Streams to backfill missing indexes or constraints onto existing tables