tinybird-deploy
Original:🇺🇸 English
Translated
Deploy Tinybird pipes and datasources for enter.pollinations.ai observability. Validates and pushes changes to Tinybird Cloud.
5installs
Added on
NPX Install
npx skill4agent add pollinations/pollinations tinybird-deployTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Tinybird Deployment Skill
Deploy observability pipes and datasources to Tinybird Cloud.
Requirements
- tb CLI: Install with or
curl -sSL https://tinybird.co | bashpip install tinybird-cli - Must run from directory
enter.pollinations.ai/observability - Authenticated to Tinybird (run if needed)
tb login
Workspace Info
| Property | Value |
|---|---|
| Workspace | |
| Region | |
| UI | https://cloud.tinybird.co/gcp/europe-west2/pollinations_enter |
Directory Structure
enter.pollinations.ai/observability/
├── datasources/ # Data source definitions (.datasource)
│ ├── generation_event.datasource
│ ├── polar_event.datasource
│ ├── stripe_event.datasource
│ └── ...
└── endpoints/ # Pipe definitions (.pipe)
├── weekly_usage_stats.pipe
├── weekly_active_users.pipe
├── daily_stripe_revenue.pipe
└── ...Commands
Step 1: Validate (Dry Run)
Always validate before deploying:
bash
cd enter.pollinations.ai/observability
tb --cloud deploy --check --waitThis shows exactly what will change without deploying. Safe to run anytime.
Example output:
| status | name | type | path |
|----------|-----------------------|----------|--------------------------------------|
| modified | weekly_usage_stats | endpoint | endpoints/weekly_usage_stats.pipe |Step 2: Deploy
If validation passes:
bash
tb --cloud deploy --waitStep 3: Verify
Test the deployed pipe:
bash
# Get Tinybird token from secrets
TINYBIRD_TOKEN=$(sops -d ../kpi/secrets/env.json | jq -r '.TINYBIRD_TOKEN')
# Test the pipe
curl -s "https://api.europe-west2.gcp.tinybird.co/v0/pipes/weekly_usage_stats.json?weeks_back=12" \
-H "Authorization: Bearer $TINYBIRD_TOKEN" | jq '.data | length'Safety Features
| Flag | Description |
|---|---|
| Validates without making changes (dry run) |
| Waits for deployment to complete |
| Prevents removing datasources (default) |
| Required to delete datasources |
Common Tasks
Add a New Pipe
- Create file in
.pipeendpoints/ - Validate:
tb --cloud deploy --check --wait - Deploy:
tb --cloud deploy --wait
Modify Existing Pipe
- Edit the file
.pipe - Validate:
tb --cloud deploy --check --wait - Deploy:
tb --cloud deploy --wait
View Pipe in UI
Troubleshooting
"tb: command not found"
bash
curl -sSL https://tinybird.co | bash
# Or
pip install tinybird-cli"Not authenticated"
bash
tb login
# Follow prompts to authenticatePipe Timeout Issues
If a pipe times out with large :
weeks_back- Use instead of
uniq()for user counts (~10x faster)uniqExact() - Avoid CTE + JOIN patterns - use single-pass queries
- Consider materialized views for expensive aggregations
Important Notes
- Always use : Without it, CLI tries to use Tinybird Local (Docker)
--cloud - Do NOT use : It's deprecated, use
tb pushtb --cloud deploy - Run from observability directory: Not from repo root