Nobody starts with a clean slate. A team adopting InsightDataFlow usually has dozens or hundreds of Airflow DAGs already, written by different people over several years. Redrawing all of them is neither necessary nor wise. This guide is a way to move the ones that benefit, in an order that keeps every pipeline running.
Step 1: triage
List your DAGs and, for each, answer two questions: how many other DAGs look like it, and how closely do its steps match nodes that already exist? The top-right quadrant (many similar DAGs whose steps map onto nodes) is where the designer pays off most, because each move makes the next one quicker to review. Hand-written one-offs full of custom logic can stay hand-written.
Step 2: map operators onto nodes
| In a typical hand-written DAG | Node in the library |
|---|---|
FileSensor / S3KeySensor | FILE_WATCHER |
PythonOperator: csv → parquet | FILE_PREPROCESS |
PostgresOperator: COPY … | LOAD_DATABASE |
SQL INSERT … SELECT | LOAD_DATABASE (query source) |
count check in Python | RECORD_COUNT_VALIDATION |
BashOperator: dbt test | DBT_TEST |
SimpleHttpOperator | API / HTTP_REQUEST |
EmailOperator | SEND EMAIL |
The mapping is rarely one-to-one. A PythonOperator that downloads, converts and loads in one function becomes three
nodes, which is the point: each step now fails, retries and shows up in Airflow under its own name. Where a step genuinely has no node,
keep it small with SHELL, API or FUNCTION, and note it as a candidate for a proper
node. An INSERT … SELECT maps to a LOAD_DATABASE whose input source is the query. See the node library.

What changes in behaviour
Mapping operators is the visible part. The quieter part is the DAG-level behaviour, because every generated DAG uses the same settings, and your hand-written DAG may not:
| In the old DAG | In the generated DAG | What to check |
|---|---|---|
| Retries set per task or per DAG | One retry, five minutes later, for every task | Steps that relied on many retries, such as a flaky API |
| A sensor with a poke interval and a timeout | FILE_WATCHER checks when it runs; no wait time of its own | The schedule has to sit after the files usually arrive |
catchup=True and a historic start date | catchup=False, a fixed 2024 start date | Backfills become deliberate, not automatic |
| Several runs in parallel | max_active_runs=1 | Pipelines that were sized to overlap |
| Pools, priority weights, SLAs | Not set by the generator | Anything that depended on them for scheduling |
| Failure emails to a team list | Failure email on, to the address in the generator's template | That the address is one someone reads |
Step 3: move connections to data locations
Hand-written DAGs tend to reference Airflow connections by id, environment variables, or worse, inline credentials. In the designer, nodes point at data locations by name. Register a location for each system the DAGs touch before you start, with the same name in development and production, so a design deploys unchanged to both.
config.yaml, but in one known place you can restrict, not scattered through the design.Step 4: run side by side
- Give the new workflow a different DAG id from the old one (the workflow name becomes the id).
- Point the new pipeline's outputs at a shadow schema or table for the trial.
- Deploy to production and let both run on the same schedule for a week or a month-end, whichever matters more.
- Compare outputs with a
RECORD_COUNT_VALIDATIONbetween the real and shadow tables, plus any deeper comparison you run outside the pipeline. - When they agree, switch the new pipeline's targets to the real tables, pause the old DAG, and delete it after one more cycle.
A worked example
Example, made up: Northbeam Logistics has a hand-written DAG, depot_fuel_report, written two years ago. A
PythonOperator downloads a CSV from SFTP, converts it to Parquet and copies it into the warehouse with a hand-built connection
string; a second one runs a SQL statement; a third emails a summary. It has five retries on the download because the SFTP server is unreliable.
- Split the first function into
SFTP(fetch),FILE_PREPROCESS(convert) andLOAD_DATABASE(load), and register the SFTP server and the warehouse as data locations. The connection string disappears from the code. - Keep the SQL statement as it is. It is an
INSERT … SELECT, so it becomes the query of a query-sourcedLOAD_DATABASE(a statement of another kind runs from aSHELLstep with the warehouse's command-line client), and the team puts aRECORD_COUNT_VALIDATIONafter the load, which the old DAG never had. - Notice the retries. Five retries become one. The team decides to move the schedule thirty minutes later instead, when the SFTP server is usually quiet, and to watch the first month.
- Run side by side into a shadow table for one month-end, then switch, pause the old DAG and delete it a cycle later.
Nothing in this example is a benchmark. Its point is the order of decisions: split, relocate credentials, add a check, and make an explicit choice wherever the generated defaults differ from the old DAG.
Before you switch off the old DAG
- The outputs agreed over a full cycle that includes your busiest day (a month-end, a Monday).
- Every credential the old DAG carried is now in a data location, and nobody pasted one into a parameter.
- The generated files are copied into version control, because the product keeps only the latest generation.
- Whoever is on call has seen the new DAG fail once in development and knows which task names mean what.
- You have a plan for removing DAG files from Airflow: deleting a workflow in InsightDataFlow leaves its deployed files in place.
Step 5: keep it from drifting back
- Never hand-edit a generated DAG. The next regeneration overwrites it. Change the design and regenerate.
- Review YAML, not screenshots. Ask for the generated
config.yamlandproperties.yamlin every change. - Fill in the metadata. Source, catalog, category, priority and load type are what let a platform team filter the list later.
- Turn escape hatches into nodes. When three workflows use the same
SHELLstep, it deserves a node.
Back to the start: what InsightDataFlow is.


