Render Tutorials
ETL on Workflows, Part 1: Build a sharded pipeline

Scaffold with `render workflows init` and strip the examples

⏱ 10 min

In this step you’ll run render workflows init, look at what it shipped, delete the example tasks, and end with a barebones project that registers zero tasks on the local dev server.

Run the init command

Terminal
$mkdir customer-merge && cd customer-merge
$render workflows init --language python --non-interactive
Created example workflow project in ./workflows/
Terminal
$mkdir customer-merge && cd customer-merge
$render workflows init --language typescript --non-interactive
Created example workflow project in ./workflows/

What init shipped

main.py (Python) or src/main.ts (TypeScript) is the entry point. The init scaffold ships several example tasks inside it (calculate_square, sum_squares, fan_out, flip_coin) so you can see the SDK patterns from the quickstart. None of them belong in a customer-merge pipeline. You’ll delete them all and rebuild from app = Workflows() (Python) or the bare task(...) import (TypeScript).

Strip the example tasks

Before
from render_sdk import Workflows
app = Workflows()
- @app.task
- async def calculate_square(n: int) -> int:
- # ... example body ...
- return n * n
 
- # ... sum_squares, fan_out, flip_coin ...
-
if __name__ == "__main__":
app.start()
After
from render_sdk import Workflows
app = Workflows()
 
 
 
 
+ # Your tasks go here, starting in step 4.
 
 
if __name__ == "__main__":
app.start()
Before
import { task } from "@renderinc/sdk/workflows";
- const calculateSquare = task(
- { name: "calculateSquare" },
- function calculateSquare(n: number): number {
- return n * n;
- },
- );
-
- // ... sumSquares, fanOut, flipCoin ...
 
After
import { task } from "@renderinc/sdk/workflows";
 
 
 
 
 
 
 
 
+ // Your tasks go here, starting in step 4.

Confirm the project registers zero tasks

Terminal
$cd workflows && pip install -r requirements.txt
Successfully installed render_sdk ...
$render workflows dev -- python main.py
Local workflow server listening on :8120
Terminal
$cd workflows && npm install
added N packages in Ns
$render workflows dev -- npx tsx src/main.ts
Local workflow server listening on :8120

In a second terminal:

Terminal
$render workflows tasks list --local
(no tasks registered)

A clean slate. Every task you see from here on is one you wrote.

What you learned

  • `render workflows init` ships an example project to learn from, not to keep
  • `app = Workflows()` (Python) or the bare `task(...)` imports (TypeScript) are the minimum surface you need
  • Zero registered tasks on a running dev server confirms a clean scaffold