You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/synapse-analytics/sql/create-use-views.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,11 @@ WITH (
50
50
) AS [r];
51
51
```
52
52
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.
54
58
55
59
```sql
56
60
CREATEVIEWTaxiView
@@ -63,6 +67,8 @@ FROM
63
67
) AS nyc
64
68
```
65
69
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
+
66
72
## Use a view
67
73
68
74
You can use views in your queries the same way you use views in SQL Server queries.
0 commit comments