> 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

Configure record limits, WHERE clauses, and warehouse selection for scan operations.

## 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
