Skip to content

Commit 1674fe3

Browse files
Update query-parquet-nested-types.md
1 parent 8a5d771 commit 1674fe3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/synapse-analytics/sql/query-parquet-nested-types.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: azaricstefan
66
ms.service: synapse-analytics
77
ms.topic: how-to
88
ms.subservice:
9-
ms.date: 04/15/2020
9+
ms.date: 05/20/2020
1010
ms.author: v-stazar
1111
ms.reviewer: jrasnick, carlrab
1212
---
@@ -17,10 +17,7 @@ In this article, you'll learn how to write a query using SQL on-demand (preview)
1717

1818
## Prerequisites
1919

20-
Before reading the rest of this article, review the following articles:
21-
22-
- [First-time setup](query-data-storage.md#first-time-setup)
23-
- [Prerequisites](query-data-storage.md#prerequisites)
20+
Your first step is to **create a database** with a datasource that references. Then initialize the objects by executing [setup script](https://github.com/Azure-Samples/Synapse/blob/master/SQL/Samples/LdwSample/SampleDB.sql) on that database. This setup script will create the data sources, database scoped credentials, and external file formats that are used in these samples.
2421

2522
## Project nested or repeated data
2623

@@ -31,7 +28,8 @@ SELECT
3128
*
3229
FROM
3330
OPENROWSET(
34-
BULK 'https://sqlondemandstorage.blob.core.windows.net/parquet/nested/justSimpleArray.parquet',
31+
BULK 'parquet/nested/justSimpleArray.parquet',
32+
DATA_SOURCE = 'SqlOnDemandDemo',
3533
FORMAT='PARQUET'
3634
) AS [r];
3735
```
@@ -45,7 +43,8 @@ SELECT
4543
*
4644
FROM
4745
OPENROWSET(
48-
BULK 'https://sqlondemandstorage.blob.core.windows.net/parquet/nested/structExample.parquet',
46+
BULK 'parquet/nested/structExample.parquet',
47+
DATA_SOURCE = 'SqlOnDemandDemo',
4948
FORMAT='PARQUET'
5049
)
5150
WITH (
@@ -75,7 +74,8 @@ SELECT
7574
JSON_VALUE(SimpleArray, '$[2]') AS ThirdElement
7675
FROM
7776
OPENROWSET(
78-
BULK 'https://sqlondemandstorage.blob.core.windows.net/parquet/nested/justSimpleArray.parquet',
77+
BULK 'parquet/nested/justSimpleArray.parquet',
78+
DATA_SOURCE = 'SqlOnDemandDemo',
7979
FORMAT='PARQUET'
8080
) AS [r];
8181
```
@@ -88,7 +88,8 @@ SELECT
8888
JSON_QUERY(MapOfPersons, '$."John Doe"') AS [John]
8989
FROM
9090
OPENROWSET(
91-
BULK 'https://sqlondemandstorage.blob.core.windows.net/parquet/nested/mapExample.parquet',
91+
BULK 'parquet/nested/mapExample.parquet',
92+
DATA_SOURCE = 'SqlOnDemandDemo',
9293
FORMAT='PARQUET'
9394
) AS [r];
9495
```

0 commit comments

Comments
 (0)