> For the complete documentation index, see [llms.txt](https://docs.datapancake.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datapancake.com/core-concepts/scan-configurations/data-source-and-warehouse-settings.md).

# Data Source & Warehouse Settings

## Data Source Settings

**Record Limit (`SCAN_RECORD_LIMIT`)**

* Limits number of records scanned. Set to `0` for unlimited (full scan).
* Use cases: Quick scans (e.g., 10,000 for rapid discovery), full scans (`0`), testing (small limits), sampling
* Monitor scan duration to ensure it stays under 60 minutes

***

**Where Clause (`SCAN_WHERE_CLAUSE`)**

* SQL WHERE clause to filter records during scanning
* **Constraint:** Only available when `PROCEDURE_INSTANCE_COUNT = 1` (cannot use with multiple procedure calls)
* Use cases: Incremental scanning (timestamp filters), partitioned scanning, data filtering

**Examples:**

```sql
WHERE created_date >= CURRENT_DATE - 7
WHERE partition_key = '2024-01'
WHERE status = 'active'
```

**Note:** Combine with `SOURCE_STREAM_LAST_SCANNED_TIMESTAMP` for delta scans. Test WHERE clauses before enabling scheduled scans.

***

## Warehouse Settings

**Virtual Warehouse**

* Snowflake virtual warehouse assigned to this scan configuration
* Each configuration must be assigned to exactly one warehouse
* Only warehouses registered in DataPancake are available
* Warehouse must be connected and active
* Each warehouse can only run one scan at a time
* Warehouse size affects scan performance

**Warehouse status indicators:**

* Connected - Available and ready
* Not Connected - Connection issue (cannot save configuration)
* Inactive - Disabled (warning shown)
* Deleted - Marked for deletion (cannot save configuration)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.datapancake.com/core-concepts/scan-configurations/data-source-and-warehouse-settings.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
