Created
July 19, 2017 11:09
-
-
Save ahelland/e1a032b4fb04f9e694676cd4e58a5a48 to your computer and use it in GitHub Desktop.
Ruter API - ADLA Job
This file contains hidden or 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
REFERENCE ASSEMBLY [Newtonsoft.Json]; | |
REFERENCE ASSEMBLY [Microsoft.Analytics.Samples.Formats]; | |
DECLARE @out string="adl://contoso.azuredatalakestore.net/foo/delayedDepartures.csv"; | |
@departure = | |
EXTRACT DataFrameRef string, | |
DatedVehicleJourneyRef string, | |
DestinationName string, | |
AimedArrivalTime string, | |
ExpectedArrivalTime string, | |
InCongestion string, | |
Delay string, | |
VehicleJourneyName string, | |
filename string | |
FROM "adl://contoso.azuredatalakestore.net/Ruter/departures/{filename:*}.json" | |
USING new Microsoft.Analytics.Samples.Formats.Json.JsonExtractor(); | |
@testthis = SELECT * | |
FROM @departure | |
WHERE Delay != "00:00:00"; | |
OUTPUT @testthis TO @out USING Outputters.Csv(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment