Skip to content

Instantly share code, notes, and snippets.

@rjdudley
Created September 25, 2018 03:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Boilerplate U-SQL User Defined Extractor
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