Skip to content

Commit 09efa1f

Browse files
authored
Merge pull request #115841 from jovanpop-msft/patch-176
Update query-json-files.md
2 parents 2f0793b + 2df684e commit 09efa1f

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

articles/synapse-analytics/sql/query-json-files.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** where you will execute the queries. 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
## Sample JSON files
2623

@@ -51,7 +48,8 @@ SELECT
5148
*
5249
FROM
5350
OPENROWSET(
54-
BULK 'https://sqlondemandstorage.blob.core.windows.net/json/books/book1.json',
51+
BULK 'json/books/book1.json',
52+
DATA_SOURCE = 'SqlOnDemandDemo',
5553
FORMAT='CSV',
5654
FIELDTERMINATOR ='0x0b',
5755
FIELDQUOTE = '0x0b',
@@ -76,7 +74,8 @@ SELECT
7674
jsonContent
7775
FROM
7876
OPENROWSET(
79-
BULK 'https://sqlondemandstorage.blob.core.windows.net/json/books/*.json',
77+
BULK 'json/books/*.json',
78+
DATA_SOURCE = 'SqlOnDemandDemo',
8079
FORMAT='CSV',
8180
FIELDTERMINATOR ='0x0b',
8281
FIELDQUOTE = '0x0b',
@@ -99,7 +98,8 @@ SELECT
9998
jsonContent
10099
FROM
101100
OPENROWSET(
102-
BULK 'https://sqlondemandstorage.blob.core.windows.net/json/books/*.json',
101+
BULK 'json/books/*.json',
102+
DATA_SOURCE = 'SqlOnDemandDemo',
103103
FORMAT='CSV',
104104
FIELDTERMINATOR ='0x0b',
105105
FIELDQUOTE = '0x0b',
@@ -121,7 +121,8 @@ SELECT
121121
j.*
122122
FROM
123123
OPENROWSET(
124-
BULK 'https://sqlondemandstorage.blob.core.windows.net/json/books/*.json',
124+
BULK 'json/books/*.json',
125+
DATA_SOURCE = 'SqlOnDemandDemo',
125126
FORMAT='CSV',
126127
FIELDTERMINATOR ='0x0b',
127128
FIELDQUOTE = '0x0b',

0 commit comments

Comments
 (0)