Skip to content

Commit

Permalink
Added EXTRACT with table types
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRys committed May 21, 2018
1 parent 9b9c40b commit fe48512
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
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);
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();

Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
<Script Include="DeprecatedItems\TVFParameterClash.usql" />
<Script Include="DeprecatedItems\UserVariableswithAtAt.usql" />
<Script Include="DiagnosticStream\DiagnosticStream.usql" />
<Script Include="EXTRACT with TYPE\1-CreateTableTypes.usql" />
<Script Include="EXTRACT with TYPE\2-EXTRACTWithTypes.usql" />
<Script Include="FileProperties\2-FileProperties-PartitionElimination.usql" />
<Script Include="FileProperties\1-FileProperties-Select.usql" />
<Script Include="Function-Variables\Declare_Function.usql" />
Expand Down Expand Up @@ -88,6 +90,7 @@
<Folder Include="DiagnosticStream" />
<Folder Include="DECLARE script-bound objects" />
<Folder Include="Function-Variables" />
<Folder Include="EXTRACT with TYPE" />
<Folder Include="RequiredOnExtracts" />
<Folder Include="SortedByClause" />
<Folder Include="Query Expr with ORDER-BY-FETCH" />
Expand Down

0 comments on commit fe48512

Please sign in to comment.