Skip to content

Instantly share code, notes, and snippets.

@ahelland
Created July 19, 2017 11:09
Show Gist options
  • Save ahelland/e1a032b4fb04f9e694676cd4e58a5a48 to your computer and use it in GitHub Desktop.
Save ahelland/e1a032b4fb04f9e694676cd4e58a5a48 to your computer and use it in GitHub Desktop.
Ruter API - ADLA Job
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