Skip to content

Commit e3ac299

Browse files
authored
Merge pull request #158110 from jovanpop-msft/patch-208
Adding partitioned views
2 parents 1d6dbe8 + bf32681 commit e3ac299

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

articles/synapse-analytics/sql/create-use-views.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ WITH (
5050
) AS [r];
5151
```
5252

53-
The view in this example uses `OPENROWSET` function that uses absolute path to the underlying files. If you have `EXTERNAL DATA SOURCE` with a root URL of your storage, you can use `OPENROWSET` with `DATA_SOURCE` and relative file path:
53+
The view uses an `EXTERNAL DATA SOURCE` with a root URL of your storage, as a `DATA_SOURCE` and adds a relative file path to the files.
54+
55+
## Create a partitioned view
56+
57+
If you have a set of files that is partitioned in the hierarchical folder structure, you can describe the partition pattern using the wildcards in the file path. Use the `FILEPATH` function to expose parts of the folder path as partitioning columns.
5458

5559
```sql
5660
CREATE VIEW TaxiView
@@ -63,6 +67,8 @@ FROM
6367
) AS nyc
6468
```
6569

70+
The partitioned views will perform folder partition elimination if you query this view with the filters on the partitioning columns. This might improve performance of your queries.
71+
6672
## Use a view
6773

6874
You can use views in your queries the same way you use views in SQL Server queries.

0 commit comments

Comments
 (0)