Skip to content

Commit 6b4d40c

Browse files
committed
1 parent d2cbfd7 commit 6b4d40c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

demo_pipeline.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
# Demo pipeline workflow using coaia observations
3+
4+
# Step 1: Create trace and export environment
5+
echo '=== Creating trace ==='
6+
eval $(coaia fuse traces create $(uuidgen) -s $(uuidgen) -u pipeline-user -n 'Demo Pipeline' --export-env)
7+
8+
# Step 2: Create main SPAN observation
9+
echo '=== Creating main SPAN ==='
10+
eval $(coaia fuse traces add-observation $COAIA_TRACE_ID -t SPAN -n 'Main Processing' --export-env)
11+
main_span=$COAIA_LAST_OBSERVATION_ID
12+
13+
# Step 3: Add child observations under the SPAN
14+
echo '=== Adding child observations ==='
15+
eval $(coaia fuse traces add-observation $COAIA_TRACE_ID -n 'Data Loading' --parent $main_span --export-env)
16+
eval $(coaia fuse traces add-observation $COAIA_TRACE_ID -n 'Data Processing' --parent $main_span --export-env)
17+
eval $(coaia fuse traces add-observation $COAIA_TRACE_ID -n 'Results Export' --parent $main_span --export-env)
18+
19+
echo '=== Pipeline complete ==='
20+
echo "Trace ID: $COAIA_TRACE_ID"
21+
echo "Last observation: $COAIA_LAST_OBSERVATION_ID"
22+

0 commit comments

Comments
 (0)