SQL Intake Agent
The SQL Intake Agent connects relational databases to DCH. It reads tables, views, and the results of custom SQL queries, and hands them to DCH in batches.
Like every agent, it is built on the Intake Agent Core and shares the Home, Data Preview, and Data Jobs screens described there. On top of those it adds two screens of its own:
- Database Connections: where the databases live and how to reach them.
- Datasource Configurations: which tables, views, or queries DCH should import.
The two are separate on purpose. A connection is defined once and reused by any number of configurations.
Database Connections
A database connection stores the address and credentials of one database server. The list shows each connection's Name, Host, Port, Engine, Enabled, and when it was last changed (Updated At, Updated By). Disabled connections are greyed out. The search box above the list matches on name and host.
Adding a connection
Click Add New and fill in the window.

- Name: How the connection appears throughout the agent.
- Database Engine: One of
PostgreSQL,MsSqlServer, orOracle. Choosing an engine fills in its default port (5432, 1433, and 1521 respectively). - Host and Port: Where the database server listens.
- Database (optional): The database used to test the connection and list databases. Leave it empty to use the engine's default. Oracle does not use this field, see CONNECT_DATA below.
- Username and Password: The credentials the agent authenticates with. Use the eye icon to reveal what you typed.
- Enabled: See Disabling a connection.
- Connection Timeout (s): How long to wait when opening a connection. Defaults to
5. - Command Timeout (s): How long a single query may run. Defaults to
1020, which is deliberately generous because imports read large tables. - Additional connection string parameters: Appended verbatim to the connection string, for anything the fields above do not cover. Do not name a database here: it would override the database you select later, so every query runs against it. The window warns you if you do.
Oracle connections show one extra field, CONNECT_DATA, because Oracle has no separate concept of databases on a server. Give it either a SID or a service name, for example CONNECT_DATA=(SERVICE_NAME=test_db).
Test Connection opens a connection to the server and reports back with a notification: Connection successful!, or the error the database returned.
Save runs the connection test first if the connection is enabled, so an enabled connection that cannot be reached cannot be saved. If Save reports an error, fix the details (or the network path to the database) and try again.
Give the agent a database user with read-only permissions. The agent only ever reads, but it can enforce that at the database level for PostgreSQL alone, where it wraps every read in a read-only transaction. For MsSqlServer and Oracle the guarantee has to come from the user's permissions.
Restricted accounts
The agent offers only the databases and objects the account may read. If the account may not list databases at all, Save warns you. Enter the database in Database (optional), and the agent offers that one.
Disabling a connection
A disabled connection is saved without testing it, so you can prepare one before its database is ready. Nothing is imported through it.
Disabling a connection does not hide what it provides. Its source entities are still offered to DCH, so your mappings stay intact, but their imports fail until you enable the connection again. Save names the configurations affected, and in a configuration a warning icon marks those entities. To stop offering them, disable the entities or the configuration.
Editing and deleting a connection
Use the pencil icon to change a connection and the trash icon to delete it. Deleting asks for confirmation, and if any Datasource Configurations use the connection, the confirmation names them.
Deleting a connection is not blocked by those references. The configurations survive, but every source entity that read through the deleted connection is removed from them. A configuration that drew all of its entities from that one connection is left with none.
Each configuration is validated as part of this. If that fails, for example because another of its databases is unreachable, the configuration keeps those entities without any error, and their imports fail.
Datasource Configurations
A Datasource Configuration is the unit DCH imports. It bundles a set of source entities (tables, views, or custom queries, possibly spanning several connections) under one name.
The list shows Name, Slug, Enabled, Job Batch Size, Updated At, and Updated By. Narrow it with the Select connection dropdown, which keeps only configurations that read from that connection, or with the Filter by name or slug box.
Creating a configuration
Click Add Configuration.
- Name: How the configuration appears here and in DCH.
- Slug: The stable identifier DCH refers to it by. While it is empty, typing a name fills it in for you. Once it has a value, the name no longer changes it. It may contain only lowercase letters, digits, and hyphens.
- Enabled: Whether the configuration is offered to DCH.
- Job batch size: How many rows the agent sends to DCH per batch during an import. New configurations start at
10000. Left empty, the agent falls back to1000.
Adding source entities
In the Source Entities section, click Add. Pick a Database Connection, then a Database name, and the agent discovers the tables and views it can read.

Tick the objects you want. Objects already in the configuration are shown greyed out, so you cannot add the same one twice. The checkbox in the header selects everything on the current page. Two controls shape what you get:
- Include system objects: Off by default, hiding the engine's internal schemas such as
pg_catalog,sys, and Oracle's system schemas. - Prefix names with schema name: Names the new entities
schema_objectrather than justobject.
If the account can read only some columns of an object, Access shows how many, for example 3 of 5 columns. Only the readable columns are imported.
The window only checks new entities against those already in the configuration, not against each other. If you select two objects with the same name from different schemas in one go and leave Prefix names with schema name off, both arrive named identically. The clash is only reported when you save.
Custom queries
Instead of picking an object, turn on Custom query and write SQL. Give the entity a name (it defaults to CustomQuery) and DCH imports the query's result set as though it were a table.

Two rules apply, and the window restates both:
- Only read-only queries with a single-table result set are supported.
- The query is read in one go unless you enable batching. To batch it, add an
ORDER BYand the placeholders@skipand@limit(on Oracle,:SKIPand:LIMIT), written exactly like this, which the agent substitutes per batch.
A query without the placeholders reads its whole result in a single query and holds it in memory, and Read Batch has no effect. On a large result, this can make the import slow or run the agent out of memory. The editor warns you, and in the configuration a warning icon marks the entity.
OK runs the query and takes the entity's columns from the first row of the result. If the query fails, the entity is not added. If it returns no rows, the entity has no columns yet.
A custom query entity has no Order By, since its ordering lives in the query itself.
Editing a query
To test a query or get help with it, add it first and then use Edit query in its row.

- Test query: Runs the query and shows up to ten rows.
- AI assistant: Helps you write the query, see Query Assist. The assistant opens by itself when Test query fails.
OK keeps your changes in the configuration. They only take effect once you save the configuration.
Reviewing source entities
Each entity in the configuration shows its Name, whether it is Enabled, an icon for its type (table, view, or custom query), the Connection / DB it reads through, the DbObject it maps to, its Columns, its Order By, and its Read Batch override.

The actions on each row are Edit, Refresh Properties, Preview Data, and Delete, and Edit query for custom queries.
- Edit: Changes the entity's name, Enabled, Order By and Read Batch.
- Refresh Properties: Re-reads the columns from the database and reports which were added or removed.
- Refresh All: Does the same for every enabled entity on an enabled connection. It reports only errors and columns that are no longer readable, not which columns changed.
- Preview Data: Shows the cached preview. It stays disabled until the cache holds rows for that entity.
A disabled entity is greyed out and not offered to DCH. It is saved without checking its source and may have no Order By yet, so you can prepare it before its source is ready.
Columns the account can no longer read are struck through. An import that requests one fails until the account is granted access.
Order By
Reading happens in batches, and batches are only stable if the rows come back in the same order every time. Each entity therefore needs an Order By.
Tables get one automatically: a virtual column that reflects physical row order (ctid on PostgreSQL, ROWID on Oracle, and the physical locator on MsSqlServer). If the account can read only some columns of a table on PostgreSQL or MsSqlServer, the virtual column is not available, so the agent uses the primary key instead.
Views do not get one, and neither do synonyms, even though they show the table icon. Neither do tables with restricted access and no readable primary key. You must choose the Order By column or columns yourself before an enabled entity will save.
Choose something that orders the rows completely and stably, ideally a unique key. If sort ties are possible, the database is free to return tied rows in a different order for each batch, and rows can be silently skipped or duplicated across the import.
Read Batch
Read Batch overrides how many rows the agent pulls from the database per round-trip. It is independent of Job batch size, which governs how many rows go to DCH per batch. Raising it helps when a view or query is slow to start but cheap to stream, because it cuts the number of round-trips.
Leave it empty to reuse the job batch size. It accepts plain numbers and the shorthands k and mln, so 1000, 20k, and 1mln are all valid. A value the agent cannot read as a number blocks saving.
Saving
Save always checks the configuration for duplicate names and slugs, a malformed slug, duplicate entity names, enabled entities missing an Order By, and invalid Read Batch values.
Validate before saving is on by default and adds a read from the database. For each enabled entity on an enabled connection, the agent reads a preview and stores it in the cache. For custom queries, it also updates the columns.
That read is what makes saving slow on large configurations, and it is why saving fails when a source database is unreachable or a column is gone. Clearing the checkbox skips only the read, which is useful when you know the databases are down but want to record a change. The cached preview then stays as it was.
With validation on, you also cannot add or change an enabled entity on a disabled connection.
If a column you had selected as Order By no longer exists, saving with validation fails. Use Refresh Properties to pick up the current columns. It replaces the Order By with the primary key, or clears it so that you can choose a new one.
Data Preview
The SQL Intake Agent supports the shared Data Preview screen. It caches up to ten rows per entity, refreshed whenever the configuration is saved with validation enabled. Refresh Properties and Refresh All do not update the cache. Bypass cached preview re-reads from the database instead of showing the cache.