CrossjoinSync Commands and Switches
This guide explains how to run CrossjoinSync from the command line, including all supported commands, switches, and common usage patterns.
Basic Syntax
.\CrossjoinSync.exe <command> [options]
You can also show help:
.\CrossjoinSync.exe --help
.\CrossjoinSync.exe -?
-? is treated the same as --help.
Command: extract
Runs enabled extracts defined in metadata (dbo.Extract + dbo.Connection).
Syntax
.\CrossjoinSync.exe extract [--job <JobName>] [--extract-name <ExtractName>] [--param Name=Value ...]
Switches
--job,-j
Run only extracts whereJobNamematches.--extract-name,-e
Run only the specified extract byExtractName.--param,-p(repeatable)
Override runtime token values in the formName=Value.Example:
--param DateFrom='2025-02-24' --param Status='1,2,5,8'
Notes
- If no
--jobis supplied, all enabled extracts are considered. - If no
--extract-nameis supplied, all enabled extracts in scope are considered. --paramvalues override values loaded fromdbo.ParameterValue.- Parameter names must start with a letter and contain only letters, numbers, or underscore.
Examples
# Run all enabled extracts
.\CrossjoinSync.exe extract
# Run one job
.\CrossjoinSync.exe extract --job DailySync
# Run one extract
.\CrossjoinSync.exe extract --extract-name SalesOrders
# Run with runtime parameter overrides
.\CrossjoinSync.exe extract --job DailySync --param DateFrom='2025-02-24' --param Region=APAC
Command: create-destination
Creates destination table structures (or scripts them) based on source schema inference from each extract query.
Syntax
.\CrossjoinSync.exe create-destination [--job <JobName>] [--extract-name <ExtractName>] [--file <path>] [--source]
Switches
--job,-j
Process only extracts whereJobNamematches.--extract-name,-e
Process only one extract byExtractName.--file,-f
Write generatedDROP/CREATEstatements to a file instead of executing them.--source,-s
Include source type comments in output (source type to translated destination type).
Notes
- If
--fileis provided, CrossjoinSync writes SQL to that file and does not execute DDL. - If
--fileis not provided, CrossjoinSync executes drop/create directly on the destination. - You can combine
--sourcewith--fileto produce self-documented DDL output.
Examples
# Create destination tables for all enabled extracts
.\CrossjoinSync.exe create-destination
# Limit by job
.\CrossjoinSync.exe create-destination --job DailySync
# Limit by extract name
.\CrossjoinSync.exe create-destination --extract-name SalesOrders
# Script to file instead of executing
.\CrossjoinSync.exe create-destination --job DailySync --file .\sql\daily-ddl.sql
# Add source type mapping comments
.\CrossjoinSync.exe create-destination --job DailySync --file .\sql\daily-ddl.sql --source
Command: initialize
Initializes metadata schema in the metadata SQL Server database.
Syntax
.\CrossjoinSync.exe initialize
What it does
- Verifies metadata connectivity.
- Creates missing metadata tables.
- Adds missing columns when tables already exist.
- Ensures primary keys exist for metadata tables.
Example
.\CrossjoinSync.exe initialize
Global Switch: --license
Shows the main project license text and lists available license files in the licenses folder.
Syntax
.\CrossjoinSync.exe --license
Convenience Alias
--run-test is normalized internally to extract.
Example:
.\CrossjoinSync.exe --run-test --job DailySync
This behaves like:
.\CrossjoinSync.exe extract --job DailySync
Typical End-to-End Flow
# 1) Create/upgrade metadata schema
.\CrossjoinSync.exe initialize
# 2) Create destination structures from metadata
.\CrossjoinSync.exe create-destination --job DailySync
# 3) Execute data load
.\CrossjoinSync.exe extract --job DailySync