Documentation & Usage

Quick Start & CLI Reference

Everything you need to configure and run iris2bq to sync InterSystems IRIS tables to BigQuery.

IRIS Native Extraction & BigQuery Sync

Run iris2bq using a YAML configuration file to stream tables from InterSystems IRIS SuperServer (port 1972) into BigQuery via GCS staging using caretdev/go-irisnative:

# Execute sync with config.yaml
./iris2bq -config config.yaml

Sample config.yaml file:

jdbc:
  driver: "iris"          # Pure-Go native driver (caretdev/go-irisnative)
  host: "localhost"
  port: 1972
  namespace: "USER"
  user: "_SYSTEM"
  password: "SYS"
  tables:
    - "Sample.Person"
    - "Sample.Company"
    - "User.Patient"

gcloud:
  project: "my-gcp-project"
  service_account_key_path: "/path/to/sa-key.json" # Leave empty for ADC
  bq:
    dataset: "iris_analytics"
    location: "US"
    write_disposition: "WRITE_TRUNCATE"
    auto_create_dataset: true
  gcs:
    tmp_bucket: "my-iris2bq-staging"
    staging_prefix: "staging"
    cleanup: true

sync:
  concurrency: 4
  dry_run: false

Dry-Run Simulation

Validate database connections and extraction logic without creating GCS objects or BigQuery jobs:

./iris2bq -config config.yaml -dry-run

Command-Line Flags & Environment Variables

Flag / Env VarDefaultDescription
-config, IRIS2BQ_CONFIG""Path to YAML configuration file
-dry-runfalsePreview connections & schemas without loading to GCP
-concurrency4Number of concurrent table extraction workers
-verbosefalseEnable detailed debug level logging
-versionfalseDisplay utility version and exit
GCP_PROJECTgcloud.projectGCP Project ID
GOOGLE_APPLICATION_CREDENTIALSgcloud.service_account_key_pathService Account JSON path
BQ_DATASETgcloud.bq.datasetTarget BigQuery dataset name
GCS_TMP_BUCKETgcloud.gcs.tmp_bucketGCS staging bucket name
IRIS_HOSTjdbc.hostInterSystems IRIS host address
IRIS_PORTjdbc.portInterSystems IRIS port (1972 for native, 52773 for REST)
IRIS_USERjdbc.userIRIS database username
IRIS_PASSWORDjdbc.passwordIRIS database password
IRIS_NAMESPACEjdbc.namespaceTarget IRIS namespace (e.g. USER)
IRIS_TABLESjdbc.tablesComma-separated table list (Table1,Table2)