Before you start
Confirm:- You are a Tenant Admin for the tenant, and the correct tenant is active.
- The database is MySQL, PostgreSQL, or IBM Db2. Darpan rejects any other dialect.
- The database is reachable from the Darpan deployment, and you have a username and password for it.
- You have a read-only account. Darpan only ever issues
SELECT, but a read-only credential means a mistake in a query cannot become a mistake in your database. - You know which TLS posture the server needs, and have the CA certificate in PEM form if the server requires verifying one.
Create the connection
1
Open database sources
Open Ask Darpan and search for database sources. Confirm the active tenant is the one the connection belongs to — connections are tenant-scoped and are not shared across tenants.
2
Describe the server
Give the connection a description, then set:
3
Set the TLS posture
TLS is required by default. Leave it on unless the server genuinely cannot offer it.If the server presents a certificate that must be verified against a private authority, paste that authority’s certificate in PEM form. Darpan then verifies the server’s certificate against it rather than accepting whatever the server presents.
4
Set the limits
5
Test before saving
Test the connection. Darpan connects and runs the dialect’s test query, and it can do this with the values on screen before the connection is saved — so a wrong password is caught while you are still looking at it.
Write the query
A query belongs to a connection and holds theSELECT that produces the records to compare.
1
Write a single SELECT
The statement must be a single
SELECT, or a WITH … SELECT. Nothing else is accepted.Return the fields you intend to reconcile, named as you want them to appear. Column names become the field names Darpan compares on, so alias them into the shape your schema expects rather than reshaping later.2
Add the window placeholders, if the query is time-bounded
A query may use the named placeholders
:windowStart and :windowEnd. Darpan fills them with the run’s window. Both are optional — a query that reconciles a full table needs neither.Use them for anything scheduled. A query with no window re-reads the whole table on every run, which gets slower as the table grows and usually compares far more than the run needs.3
Preview it
Preview runs the query capped at 10 rows and shows what comes back. Check the column names and a few values before saving: the preview is where a wrong alias or an unexpected null is cheap to notice.
Use it in a run
A database source behaves like any other source once saved. Pick it as a side when you set up a reconciliation run, pair it with a schema, and choose matching keys as usual. Because the query fixes the field names, a flat schema matching those column names is usually the right pairing. Create a schema can infer one from a CSV sample of the same shape if you have one.Expected result
The connection tests clean, the query previews the rows you expect with the names you expect, and the source appears alongside file and API sources when you build a run.Troubleshooting
See Set up a reconciliation run for pairing the source into a run, and Create a schema for the schema it needs.