2
votes

I am trying to write a custom outputter for U-SQL that writes rows to individual files based on the data in one column. For example, if the column has a date "2016-01-01", it writes that row a file with that name, and a the next row to a file with the value in the same column.

I am aiming to do this by using the Data Lake Store SDK within the outputter, which creates a client and uses the SDK functions to write to individual files.

Is this a viable and possible solution?

I have seen that the function to be overriden for outputters is

public override void Output (IRow row, IUnstructuredWriter output)

In which the IUnstructuredWriter is casted to a StreamWriter(I saw one such example), so I assume this IUnstructuredWriter is passed to this function by the U-SQL script. So that doesn't leave for me any control over this what is passed here, also it will remain constant for all rows and can't change.

1

1 Answers

2
votes

This is currently not possible but we are working on this functionality in reply to this frequent customer request. For now, please add your vote to the request here: https://feedback.azure.com/forums/327234-data-lake/suggestions/10550388-support-dynamic-output-file-names-in-adla

UPDATE (Spring 2018): This feature is now in private preview. Please contact us via email (usql at microsoft dot com) if you want to try it out.