A 10‑minute happy‑path to run your first pipeline locally and (optionally) in an E2B sandbox. We'll move a small table from MySQL to a CSV file.
- Python 3.11+
- Git
- MySQL database you can read from (host/user/password)
- (Optional) E2B account if you want to try cloud sandbox runs
Tip: All commands below assume you work from the repo’s
testing_env/folder.
# Clone and set up a virtualenv
git clone https://github.com/keboola/osiris_pipeline.git
cd osiris_pipeline
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtOsiris can scaffold helpful templates.
cd testing_env
python ../osiris.py initThis creates (or guides you to create):
.env(API keys & secrets)osiris_connections.yaml(connection aliases)
Now populate them as shown below.
Create testing_env/.env with at least:
OPENAI_API_KEY=sk-...
MYSQL_PASSWORD=your-mysql-password
Create testing_env/osiris_connections.yaml with aliases you’ll reference from OML. Secrets can come from environment variables.
version: 1
connections:
mysql:
default:
host: your-mysql-host
port: 3306
database: movies
user: root
password: ${MYSQL_PASSWORD}
filesystem:
local:
base_dir: ./output # Output directory for generated files
exports:
base_dir: ./data # Input directory for reading CSV filesThe base_dir field specifies the root directory for file operations. When using filesystem connections:
- Paths in pipeline steps are resolved relative to
base_dir - Discovery mode scans the
base_dirfor available files - Multiple profiles (like
local,exports) let you separate input/output locations
Verify everything:
python ../osiris.py connections list
python ../osiris.py connections doctor
python ../osiris.py components listSave the following OML to testing_env/pipelines/mysql_to_csv.oml.yaml.
oml_version: "0.1.0"
id: mysql-to-csv-demo
steps:
- id: extract-movies
component: mysql.extractor
mode: read
query: |
SELECT id, title, release_year
FROM movies
ORDER BY id
connection: "@mysql.default"
- id: write-movies-csv
component: filesystem.csv_writer
mode: write
inputs:
df: "@extract-movies"
config:
path: movies.csv # Resolved as ./output/movies.csv
write_mode: replace # Replace file on each run
create_if_missing: true
connection: "@filesystem.local"Using filesystem connections:
- The
connection: "@filesystem.local"references thefilesystem.localprofile fromosiris_connections.yaml - The file path is resolved relative to the connection's
base_dir(./output) - Final path:
./output/movies.csv
Notes
- Use
oml_version, notversion.- Reference connections with
@family.alias.modeisreadfor extractors andwritefor writers.
python ../osiris.py compile pipelines/mysql_to_csv.oml.yamlCompilation produces a deterministic manifest under logs/compile_*/compiled/.
python ../osiris.py run --last-compile --verbose- Artifacts (including the generated CSV) are under
logs/run_*/artifacts/— specifically in the directory for the writer step (e.g.artifacts/write-movies-csv/).
python ../osiris.py run --last-compile --e2b --e2b-install-deps --verbose- Runs in an isolated cloud sandbox with the same logs, metrics, and artifacts layout.
# List sessions
python ../osiris.py logs list
# Open the interactive HTML report in your browser
python ../osiris.py logs html --openThe HTML report shows session metadata, steps, performance, and a full event/metrics trail. E2B runs are labeled with an E2B badge and include bootstrap timing.
- Cannot connect to MySQL → Check
osiris_connections.yamlhost/port and that your network allows access. - No CSV produced → Ensure the writer step uses
inputs: df: "@extract-movies"andconnection: "@filesystem.local". The file will be under./out/movies.csv(relative totesting_env). - Secrets in logs → Osiris masks sensitive fields automatically. Keep secrets in
.env, not in OML. - Different local vs E2B timings → E2B includes sandbox bootstrap; see the Performance panel.
- Swap the CSV writer for
supabase.writerto load into your warehouse. - Explore
python ../osiris.py chatto generate OML conversationally (approve, compile, run). - Read the HTML report thoroughly — it’s designed so AI agents (and humans) can investigate runs quickly.
You’re done. You now have a deterministic, reproducible pipeline that you can version in Git and run locally or in a cloud sandbox with identical results.