Oxy sync
Theoxy sync
command collects semantic information from your databases and stores it in your local repository for use by agents and other Oxy features. This semantic information includes table structures, relationships, and sample data that help agents understand your data model.
Command Overview
Arguments
DATABASE_NAME
(optional): The name of a specific database to sync, as defined in yourconfig.yml
file. If omitted, all databases will be synced.
Options
-d, --datasets <DATASETS>
: Specify one or more datasets to sync within the database. Can be used multiple times.-o, --overwrite
: Overwrite existing files during synchronization. By default, existing files are skipped.
Usage Examples
Sync All Databases
config.yml
file. By default, it will skip any files that already exist.
Sync a Specific Database
Sync Specific Datasets
Overwrite Existing Files
-o
flag, existing semantic files will be overwritten during synchronization.
Output and Warnings
Thesync
command provides feedback about the synchronization process:
- Skipped Files: When a file already exists and overwrite mode is off (default), the command will display a warning indicating which files were skipped.
-
Overwritten Files: When the
-o
flag is used, the command will display a warning showing which existing files were overwritten.
Understanding the Synced Data
When you run theoxy sync
command, Oxy will:
- Connect to each configured database
- Extract schema information, including tables, columns, relationships, and data types
- Generate semantic models representing this data
- Save these models as files in your project directory
Configuration
Before using thesync
command, ensure your databases are properly configured in your config.yml
file. For example: