Download Import Script

Download our SQLite import script:

curl -O https://app.chartdb.io/bash-scripts/sqlite-import.sh
chmod +x sqlite-import.sh

Usage

Run the script with your database file path and ChartDB information:

./sqlite-import.sh \
  -f your-database-file.sqlite \
  -a your-chartdb-api-key \
  -t your-diagram-id

Required Parameters

  • -f SQLite database file path
  • -a ChartDB API key
  • -t Target diagram ID

The script will connect to your database file, extract the schema, and automatically import it into your ChartDB diagram.

Automated Daily Updates

To automatically update your diagram daily using cron, add the following line to your crontab:

# Run at 2 AM every day
0 2 * * * /path/to/sqlite-import.sh -f /path/to/database.sqlite -a api_key -t diagram_id >> /path/to/sqlite-import.log 2>&1

To edit your crontab:

crontab -e

Note: Replace /path/to/sqlite-import.sh with the absolute path to the script and adjust the file path accordingly. The log file path (/path/to/sqlite-import.log) should be in a directory where your user has write permissions.