> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Read matching CSV files from a folder

> Register a temporary file view and query the selected input.

How-to guideApplies to: Unified engine deployments

Register a temporary file view and query the selected input.

## Before you start

Prepare a folder with matching CSV files using the same order\_id,amount header
and schema. Put other file types in the folder to check that the filter excludes
them.

The files must already exist under a configured local file-source root. Use the
path visible to the engine and workers, rather than a path that exists only on
your laptop. See
[file-source configuration](https://docs.e6data.com/transformation/sql/tables-and-sources.md#file-sources).

## Values to collect

* Absolute configured file path, or folder path for the filter recipe.

## Run the SQL

Replace every `<placeholder>` before running. Use unused names for the resources
below. Run the statements in order in Workbench.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
CREATE OR REPLACE TEMPORARY VIEW recipe_folder_filter (order_id BIGINT, amount DOUBLE)
USING csv
OPTIONS (
  path '<configured-input-path>',
  header 'true',
  pathGlobFilter '*.csv'
);

SELECT * FROM recipe_folder_filter LIMIT 5;
```

## Check the result

The SELECT should show the prepared order\_id and amount fields. For the two-row
examples, expect values (1, 12.5) and (2, 7.5), in any order. For a folder read,
only matching CSV inputs should contribute rows.

## Clean up

Drop the temporary view. Input files stay in place.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
DROP VIEW recipe_folder_filter;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.