# Alteryx to PostgreSQL: worked example

Synthetic source fixture and synthetic input. No customer files or data.

## Generation

The local Deflows parser and deterministic PostgreSQL emitter produced this SQL. The source orders.csv is explicitly mapped to the temporary PostgreSQL table example_orders. The included input.csv supplies the sample rows for orders.csv; setup.sql loads those rows into example_orders for local use.

The production Convert API and native Alteryx/SSIS runtimes were not run. This is a local worked export, not a recorded production AI conversion or source-runtime parity report. The source XML is a parser fixture, not a certified runnable native package. Web Convert can produce different SQL.

## Verify locally

With PostgreSQL and psql available, extract the bundle and run:

```sh
psql -X -v ON_ERROR_STOP=1 -f verify.sql
```

Expected result: PASS. This checks full row values, nulls and duplicate counts in both directions with EXCEPT ALL. Temporary tables and a rollback keep the check isolated. PASS applies only to this input and its independently specified expected.json.

generated.sql is the emitted query with an explicit final OrderID sort for reproducible display. It returns rows; CSV writing is a separate export step. The connected True branch keeps Sales > 100. Sales = 100 and NULL do not pass. The False branch is not connected in this fixture.

## Limits

This example covers one Input Data → Filter True → Output Data path. It does not certify macros, joins, spatial tools, unknown expressions or general migration accuracy. Native source output comparison and the Deflows Parity Test Kit were not run.
