Guide

Use query variables to turn one SQL definition into a reusable workflow.

Variables are what make shared SQL reusable instead of fragile. In DataPilot, query variables help teams keep one trusted logic base while adapting filters, dates, and reporting windows across ad hoc runs and scheduled delivery.

Define inputs once

Set the variable structure so the query can be run consistently without manual rewriting.

Reuse the same logic in reports

The same query can power scheduled reports and exports with different input values and still remain traceable.

FAQ

What are query variables used for?

They define reusable inputs so the same query logic can run with different dates, filters, or parameters without rewriting the SQL.

Can variables be reused in recurring reports?

Yes. Variables stay attached to the same trusted query and can be reused across recurring report and export workflows.

Why are variables better than copying the same query repeatedly?

Because one logic base is easier to review, update, trace, and reuse than many near-duplicate versions of the same query.