none
Input string instead of a file

    Question

  • I have a json string that I would like to input in my U-SQL script. I know that if I put this into a .json file, I can input the file. However, is there any way to just use the string directly in my U-SQL script, instead of having to put it into a file?

    Thursday, June 29, 2017 8:09 PM

All replies

  • Assuming the string is shorter than 128kB in UTF-8 encoding (the current string size limit), you can just pass it as a variable (ADF has a parameter model or you can just add the DECLARE @json = "..."; declaration to your script). Then you can use it with for example the JsonTuple function on the sample JSON library from the http://usql.io example libraries or with any other C# code.


    Michael Rys

    Friday, June 30, 2017 12:38 AM
    Moderator