forked from Azure/usql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
...-2017-2018-ReleaseNotes/Winter2018-ReleaseNotes/EXTRACT with TYPE/1-CreateTableTypes.usql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
DROP TYPE IF EXISTS type1; | ||
DROP TYPE IF EXISTS type2; | ||
|
||
CREATE TYPE type1 AS TABLE(UserId int, Start DateTime, Region string, Query string); | ||
CREATE TYPE type2 AS TABLE(Urls string, ClickedUrls string); |
13 changes: 13 additions & 0 deletions
13
...-2017-2018-ReleaseNotes/Winter2018-ReleaseNotes/EXTRACT with TYPE/2-EXTRACTWithTypes.usql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Run 1-CreateTableTypes.usql first | ||
|
||
@searchlog = | ||
EXTRACT type1.* | ||
, Duration int? | ||
, master.dbo.type2.* | ||
FROM "/Samples/Data/SearchLog.tsv" | ||
USING Extractors.Tsv(); | ||
|
||
OUTPUT @searchlog | ||
TO "/output/test.csv" | ||
USING Outputters.Csv(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters