Created
September 25, 2018 03:27
-
-
Save rjdudley/2b96f8a532fc4a9504d9f8ea02b27ef7 to your computer and use it in GitHub Desktop.
Boilerplate U-SQL User Defined Extractor
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
public override IEnumerable<IRow> Extract(IUnstructuredReader input, IUpdatableRow output) | |
{ | |
string line; | |
//Read the input line by line | |
foreach (Stream current in input.Split(_row_delim)) | |
{ | |
using (StreamReader streamReader = new StreamReader(current, this._encoding)) | |
{ | |
line = streamReader.ReadToEnd().Trim(); | |
LogRowParser splitter = new LogRowParser(); | |
LogRowElements parts = new LogRowElements(); | |
parts = splitter.ParseElements(line); | |
// ... | |
yield return output.AsReadOnly(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment