Schema drivers

dbcrossbar allows you to specify a table's column names and types in a number of different ways. You can use Postgres CREATE TABLE statements, or BigQuery schema JSON, or dbcrossbar's internal schema format.

These schema formats are typically used in one of two ways:

  • As a --schema argument to the cp subcommand.

    dbcrossbar cp \
      --if-exists=overwrite \
      --schema=postgres-sql:my_table.sql \
      csv:my_table.csv \
      'postgres://postgres@127.0.0.1:5432/postgres#my_table'
    
  • As an argument to the conv subcommand, which allows you to convert between different schema formats.

    dbcrossbar schema conv postgres-sql:table.sql bigquery-schema:table.json