<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Dear Dana<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">You have the ability to either flow JSON or XML as (currently) byte arrays or strings and use C# libraries such as NewtonSoft, System.XML or your own
</span><span style="font-size:11.0pt;font-family:Wingdings;color:#1F497D">J</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"> to process them. Or you can use an XML or JSON extractor (we currently have one of each published
 as samples on the U-SQL github repo), to extract parts of a JSON or XML document and map parts onto rows (some columns in turns can be maps or arrays).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">So it is not taking the route of XQuery or JSONiq in terms of processing arbitrary nested trees without the need of transformations (yet).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">To answer your questions inline:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">U-SQL is a query language more than a scripting language in that it does not provide snapshots or states inside a U-SQL “script”. However, the syntax of step-wise
 refinement and composition is closer to a scripting language experience than for example the equivalent common-table-expressions that you normally see in ANSI SQL dialects.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">And yes you are right regarding the composition. I would recommend the following blog post to give you some more background about the language philosophy:
</span><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><a href="http://blogs.msdn.com/b/visualstudio/archive/2015/09/28/introducing-u-sql.aspx">http://blogs.msdn.com/b/visualstudio/archive/2015/09/28/introducing-u-sql.aspx</a>.
 It is and evolution of SCOPE (see link in blog post).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Cheers<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Segoe UI",sans-serif;color:black">Michael</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> daniela florescu [mailto:dflorescu@me.com]
<br>
<b>Sent:</b> Wednesday, November 4, 2015 12:39 AM<br>
<b>To:</b> Michael Rys <mrys@microsoft.com><br>
<b>Cc:</b> talk <talk@x-query.com><br>
<b>Subject:</b> Re: [xquery-talk] specification for Microsoft's U-SQL ?<br>
<b>Importance:</b> High<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Dear Michael,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I still have a question: can we use U-SQL to process JSON or XML?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I could’t see a way of doing this — as they are not flat rows…<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So is it possible ?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks, regards<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Dana<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Nov 3, 2015, at 10:23 PM, daniela florescu <<a href="mailto:dflorescu@me.com">dflorescu@me.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Dear Michael, <o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for the pointers. <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I was looking at <a href="https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fazure.microsoft.com%2fen-us%2fdocumentation%2farticles%2fdata-lake-analytics-u-sql-get-started%2f&data=01%7c01%7cmrys%40microsoft.com%7ca3ac8bc2c0994a17685008d2e4f374fe%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=XEqoDPUPCck9Jhw5nz1ZVeQMsCLYX3X4iu8t92z%2fLYQ%3d">https://azure.microsoft.com/en-us/documentation/articles/data-lake-analytics-u-sql-get-started/</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">and trying to understand the big picture from examples.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">So U-SQL is a dataflow scripting language, where the basic data model is a set of rows with C# types, and each<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">step in the data flow is an expression that can mix (at many levels) SQL’s Select-from-where constructs with C# code.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">That’s what I understand at least. Let me know if I got it wrong.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Seems very useful for expressing complex data transformations of all kinds, and it is still optimizable.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Much more useful for “data science” (whatever this big word means..) then the series of SQL-wannabes languages<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> from the NoSQL vendors.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks, best regards<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Dana<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Nov 2, 2015, at 4:56 PM, Michael Rys <<a href="mailto:mrys@microsoft.com">mrys@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">No formal specification. Just a language reference that is still under development :). See
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2faka.ms%2fusql_reference&data=01%7c01%7cmrys%40microsoft.com%7ca3ac8bc2c0994a17685008d2e4f374fe%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=2XNRKam46acNQGL4gcPr2JEnrmsJUPVB7eigzd61XMQ%3d">
http://aka.ms/usql_reference</a>  (and pardon the format, I am writing it and our doc people "convert" it).<br>
<br>
Let me know if you want a personal demo :).<br>
<br>
Cheers<br>
Michael<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:talk-bounces@x-query.com">talk-bounces@x-query.com</a> [<a href="mailto:talk-bounces@x-query.com">mailto:talk-bounces@x-query.com</a>] On Behalf Of daniela florescu<br>
Sent: Saturday, October 31, 2015 2:05 PM<br>
To: talk <<a href="mailto:talk@x-query.com">talk@x-query.com</a>><br>
Subject: [xquery-talk] specification for Microsoft's U-SQL ?<br>
<br>
Seems interesting in principle.<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fthenewstack.io%2fmeet-u-sql-microsofts-new-language-big-data%2f&data=01%7c01%7cmrys%40microsoft.com%7caef4ceeec92543784b5608d2e23771f1%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=iZjmF47tPZ316GAyjeXegMSLOq%2bLFAbo3zvRYOwMPy0%3d">https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fthenewstack.io%2fmeet-u-sql-microsofts-new-language-big-data%2f&data=01%7c01%7cmrys%40microsoft.com%7caef4ceeec92543784b5608d2e23771f1%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=iZjmF47tPZ316GAyjeXegMSLOq%2bLFAbo3zvRYOwMPy0%3d</a><br>
<br>
But anyone in a luck to see a specification for it ?<br>
<br>
Thanks for any pointer, best regards<br>
Dana<br>
_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fx-query.com%2fmailman%2flistinfo%2ftalk&data=01%7c01%7cmrys%40microsoft.com%7caef4ceeec92543784b5608d2e23771f1%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=dJTn2RgYiSUgZH5GU3e3CsLqpCj9Gvd6uI%2fGS7JomP8%3d">https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fx-query.com%2fmailman%2flistinfo%2ftalk&data=01%7c01%7cmrys%40microsoft.com%7caef4ceeec92543784b5608d2e23771f1%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=dJTn2RgYiSUgZH5GU3e3CsLqpCj9Gvd6uI%2fGS7JomP8%3d</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
<a href="mailto:talk@x-query.com">talk@x-query.com</a><br>
<a href="http://x-query.com/mailman/listinfo/talk">http://x-query.com/mailman/listinfo/talk</a><o:p></o:p></p>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>