Dryad/html/c0dd673a-3a38-6030-54f0-dab...

94 lines
16 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp"><head><link rel="SHORTCUT ICON" href="./../icons/favicon.ico" /><style type="text/css">.OH_CodeSnippetContainerTabLeftActive, .OH_CodeSnippetContainerTabLeft,.OH_CodeSnippetContainerTabLeftDisabled { }.OH_CodeSnippetContainerTabRightActive, .OH_CodeSnippetContainerTabRight,.OH_CodeSnippetContainerTabRightDisabled { }.OH_footer { }</style><link rel="stylesheet" type="text/css" href="./../styles/branding.css" /><link rel="stylesheet" type="text/css" href="./../styles/branding-en-US.css" /><style type="text/css">
body
{
border-left:5px solid #e6e6e6;
overflow-x:scroll;
overflow-y:scroll;
}
</style><script src="./../scripts/branding.js" type="text/javascript"><!----></script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>DryadLinqQueryable.Fork(TSource, TKey) Method (IQueryable(TSource), Expression(Func(TSource, TKey)), TKey[])</title><meta name="Language" content="en-us" /><meta name="Microsoft.Help.Id" content="M:Microsoft.Research.DryadLinq.DryadLinqQueryable.Fork``2(System.Linq.IQueryable{``0},System.Linq.Expressions.Expression{System.Func{``0,``1}},``1[])" /><meta name="Description" content="Divides the input dataset into a collection of datasets based on the keys of the records. The method produces one output dataset for each key in the specified key array. Input records that don't match any of the keys are dropped." /><meta name="Microsoft.Help.ContentType" content="Reference" /><meta name="BrandingAware" content="'true'" /><meta name="container" content="Microsoft.Research.DryadLinq" /><meta name="file" content="c0dd673a-3a38-6030-54f0-dab156c26679" /><meta name="guid" content="c0dd673a-3a38-6030-54f0-dab156c26679" /><meta name="SelfBranded" content="true" /></head><body onload="onLoad()" class="primary-mtps-offline-document"><div class="OH_outerDiv"><div class="OH_outerContent"><table class="TitleTable"><tr><td class="OH_tdTitleColumn">DryadLinqQueryable<span id="ID0EYBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EYBABAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
</script>Fork<span id="ID0EWBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EWBABAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="typeparameter">TSource</span>, <span class="typeparameter">TKey</span><span id="ID0ESBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ESBABAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script> Method (IQueryable<span id="ID0EQBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EQBABAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="typeparameter">TSource</span><span id="ID0EOBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EOBABAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>, Expression<span id="ID0EMBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EMBABAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script>Func<span id="ID0EKBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EKBABAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="typeparameter">TSource</span>, <span class="typeparameter">TKey</span><span id="ID0EGBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EGBABAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><span id="ID0EFBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EFBABAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>, <span id="ID0EDBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EDBABAAA?vb=|cpp=array&lt;|cs=|fs=|nu=");
</script><span class="typeparameter">TKey</span><span id="ID0EBBABAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBBABAAA?vb=()|cpp=&gt;|cs=[]|fs=[]|nu=[]");
</script>)</td><td class="OH_tdRunningTitleColumn">DryadLINQ documentation</td></tr></table><div id="mainSection"><div id="mainBody"><span class="introStyle"></span><div class="summary">
Divides the input dataset into a collection of datasets based on the keys of the records.
The method produces one output dataset for each key in the specified key array. Input
records that don't match any of the keys are dropped.
</div><p></p><strong>Namespace:</strong> <a href="efe6507e-9fd8-bbd3-8227-fd6ba9e289c1.htm" target="">Microsoft.Research.DryadLinq</a><br /><strong>Assembly:</strong> <span sdata="assembly">Microsoft.Research.DryadLinq</span> (in Microsoft.Research.DryadLinq.dll) Version: 0.1.2.0 (0.1.2.0)<div class="OH_CollapsibleAreaRegion"><div class="OH_regiontitle">Syntax</div><div class="OH_CollapsibleArea_HrDiv"><hr class="OH_CollapsibleArea_Hr" /></div></div><div class="OH_clear"></div><div id="snippetGroup_Syntax" class="code"><div id="ID0ECXCAAAAA" class="OH_CodeSnippetContainer"><div class="OH_CodeSnippetContainerTabs" id="ID0ECXCAAAAA_tabs"><div class="OH_CodeSnippetContainerTabLeftActive" id="ID0ECXCAAAAA_tabimgleft"></div><div id="ID0ECXCAAAAA_tab1" class="OH_CodeSnippetContainerTabActive" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECXCAAAAA','C#','1','4');return false;">C#</a></div><div id="ID0ECXCAAAAA_tab2" class="OH_CodeSnippetContainerTab" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECXCAAAAA','Visual Basic','2','4');return false;">VB</a></div><div id="ID0ECXCAAAAA_tab3" class="OH_CodeSnippetContainerTab" EnableCopyCode="true"><a href="#" onclick="javascript:ChangeTab('ID0ECXCAAAAA','Visual C++','3','4');return false;">C++</a></div><div id="ID0ECXCAAAAA_tab4" class="OH_CodeSnippetContainerTabDisabledNotFirst" EnableCopyCode="true" disabled="true"><a>F#</a></div><div class="OH_CodeSnippetContainerTabRight" id="ID0ECXCAAAAA_tabimgright"></div></div><div id="ID0ECXCAAAAA_codecollection" class="OH_CodeSnippetContainerCodeCollection"><div class="OH_CodeSnippetToolBar"><div class="OH_CodeSnippetToolBarText"><a id="ID0ECXCAAAAA_ViewColorized" href="#" onclick="javascript:ExchangeTitleContent('ID0ECXCAAAAA','4')" title="View Colorized" style="display: none">View Colorized</a><a id="ID0ECXCAAAAA_copycode" href="#" onclick="javascript:CopyToClipboard('ID0ECXCAAAAA','4')" title="Copy to Clipboard">Copy to Clipboard</a><a id="ID0ECXCAAAAA_PrintText" class="OH_PrintText" href="#" onclick="javascript:Print('ID0ECXCAAAAA','4')" title="Print">Print</a></div></div><div id="ID0ECXCAAAAA_code_Div1" class="OH_CodeSnippetContainerCode" style="display: block"><pre><span class="keyword">public</span> <span class="keyword">static</span> <span class="identifier">IKeyedMultiQueryable</span>&lt;TSource, TKey&gt; <span class="identifier">Fork</span>&lt;TSource, TKey&gt;(
<span class="keyword">this</span> <span class="identifier">IQueryable</span>&lt;TSource&gt; <span class="parameter">source</span>,
<span class="identifier">Expression</span>&lt;<span class="identifier">Func</span>&lt;TSource, TKey&gt;&gt; <span class="parameter">keySelector</span>,
TKey[] <span class="parameter">keys</span>
)</pre></div><div id="ID0ECXCAAAAA_code_Plain_Div1" class="OH_CodeSnippetContainerCode" style="display: none"><pre>public static IKeyedMultiQueryable&lt;TSource, TKey&gt; Fork&lt;TSource, TKey&gt;(
this IQueryable&lt;TSource&gt; source,
Expression&lt;Func&lt;TSource, TKey&gt;&gt; keySelector,
TKey[] keys
)</pre></div><div id="ID0ECXCAAAAA_code_Div2" class="OH_CodeSnippetContainerCode" style="display: none"><pre>&lt;<span class="identifier">ExtensionAttribute</span>&gt;
<span class="keyword">Public</span> <span class="keyword">Shared</span> <span class="keyword">Function</span> <span class="identifier">Fork</span>(<span class="keyword">Of</span> TSource, TKey) (
<span class="parameter">source</span> <span class="keyword">As</span> <span class="identifier">IQueryable</span>(<span class="keyword">Of</span> TSource),
<span class="parameter">keySelector</span> <span class="keyword">As</span> <span class="identifier">Expression</span>(<span class="keyword">Of</span> <span class="identifier">Func</span>(<span class="keyword">Of</span> TSource, TKey)),
<span class="parameter">keys</span> <span class="keyword">As</span> TKey()
) <span class="keyword">As</span> <span class="identifier">IKeyedMultiQueryable</span>(<span class="keyword">Of</span> TSource, TKey)</pre></div><div id="ID0ECXCAAAAA_code_Plain_Div2" class="OH_CodeSnippetContainerCode" style="display: none"><pre>&lt;ExtensionAttribute&gt;
Public Shared Function Fork(Of TSource, TKey) (
source As IQueryable(Of TSource),
keySelector As Expression(Of Func(Of TSource, TKey)),
keys As TKey()
) As IKeyedMultiQueryable(Of TSource, TKey)</pre></div><div id="ID0ECXCAAAAA_code_Div3" class="OH_CodeSnippetContainerCode" style="display: none"><pre><span class="keyword">public</span>:
[<span class="identifier">ExtensionAttribute</span>]
<span class="keyword">generic</span>&lt;<span class="keyword">typename</span> TSource, <span class="keyword">typename</span> TKey&gt;
<span class="keyword">static</span> <span class="identifier">IKeyedMultiQueryable</span>&lt;TSource, TKey&gt;^ <span class="identifier">Fork</span>(
<span class="identifier">IQueryable</span>&lt;TSource&gt;^ <span class="parameter">source</span>,
<span class="identifier">Expression</span>&lt;<span class="identifier">Func</span>&lt;TSource, TKey&gt;^&gt;^ <span class="parameter">keySelector</span>,
<span class="keyword">array</span>&lt;TKey&gt;^ <span class="parameter">keys</span>
)</pre></div><div id="ID0ECXCAAAAA_code_Plain_Div3" class="OH_CodeSnippetContainerCode" style="display: none"><pre>public:
[ExtensionAttribute]
generic&lt;typename TSource, typename TKey&gt;
static IKeyedMultiQueryable&lt;TSource, TKey&gt;^ Fork(
IQueryable&lt;TSource&gt;^ source,
Expression&lt;Func&lt;TSource, TKey&gt;^&gt;^ keySelector,
array&lt;TKey&gt;^ keys
)</pre></div><div id="ID0ECXCAAAAA_code_Div4" class="OH_CodeSnippetContainerCode" style="display: none"><pre /></div><div id="ID0ECXCAAAAA_code_Plain_Div4" class="OH_CodeSnippetContainerCode" style="display: none"><pre /></div></div></div><script>addSpecificTextLanguageTagSet('ID0ECXCAAAAA');</script></div><div id="parameters"><h4 class="subHeading">Parameters</h4><dl paramName="source"><dt><span class="parameter">source</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/bb351562" target="_blank">System.Linq<span id="ID0EBFACWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBFACWCAAAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
</script>IQueryable</a><span id="ID0EEACWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EEACWCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="selflink"><span class="typeparam">TSource</span></span><span id="ID0ECACWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ECACWCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><br /><span>The input dataset</span></dd></dl><dl paramName="keySelector"><dt><span class="parameter">keySelector</span></dt><dd>Type: <a href="http://msdn2.microsoft.com/en-us/library/bb335710" target="_blank">System.Linq.Expressions<span id="ID0EBKABWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EBKABWCAAAAA?vb=.|cpp=::|cs=.|fs=.|nu=.");
</script>Expression</a><span id="ID0EJABWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EJABWCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><a href="http://msdn2.microsoft.com/en-us/library/bb549151" target="_blank">Func</a><span id="ID0EHABWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EHABWCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="selflink"><span class="typeparam">TSource</span></span>, <span class="selflink"><span class="typeparam">TKey</span></span><span id="ID0EDABWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EDABWCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><span id="ID0ECABWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ECABWCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><br /><span>The function to extract the key from a record</span></dd></dl><dl paramName="keys"><dt><span class="parameter">keys</span></dt><dd>Type: <span id="ID0EEAAWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EEAAWCAAAAA?vb=|cpp=array&lt;|cs=|fs=|nu=");
</script><span class="selflink"><span class="typeparam">TKey</span></span><span id="ID0ECAAWCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ECAAWCAAAAA?vb=()|cpp=&gt;|cs=[]|fs=[]|nu=[]");
</script><br /><span>A list of the partition keys</span></dd></dl></div><div class="OH_CollapsibleAreaRegion"><div class="OH_regiontitle">Type Parameters</div><div class="OH_CollapsibleArea_HrDiv"><hr class="OH_CollapsibleArea_Hr" /></div></div><div class="OH_clear"></div><dl><dt><span class="parameter">TSource</span></dt><dd>The type of records of input dataset</dd><dt><span class="parameter">TKey</span></dt><dd>The type of the keys of the input records</dd></dl><h4 class="subHeading">Return Value</h4>Type: <a href="721bf2e3-dc55-bf0a-0873-d5a6b711d57a.htm" target="">IKeyedMultiQueryable</a><span id="ID0ERCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ERCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="selflink"><span class="typeparam">TSource</span></span>, <span class="selflink"><span class="typeparam">TKey</span></span><span id="ID0ENCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0ENCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script><br />An IKeyedMultiQueryable for the output datasets.<h4 class="subHeading">Usage Note</h4>In Visual Basic and C#, you can call this method as an instance method on any object of type <a href="http://msdn2.microsoft.com/en-us/library/bb351562" target="_blank">IQueryable</a><span id="ID0EHCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EHCAAAAA?vb=(Of |cpp=&lt;|cs=&lt;|fs=&lt;'|nu=(");
</script><span class="selflink"><span class="typeparam">TSource</span></span><span id="ID0EFCAAAAA"> </span><script type="text/javascript">
addToLanSpecTextIdSet("ID0EFCAAAAA?vb=)|cpp=&gt;|cs=&gt;|fs=&gt;|nu=)");
</script>. When you use instance method syntax to call this method, omit the first parameter. For more information, see <a href="http://msdn.microsoft.com/en-us/library/bb384936.aspx" target="_blank">Extension Methods (Visual Basic)</a> or <a href="http://msdn.microsoft.com/en-us/library/bb383977.aspx" target="_blank">Extension Methods (C# Programming Guide)</a>.<a name="seeAlsoSection"><!----></a><div class="OH_CollapsibleAreaRegion"><div class="OH_regiontitle">See Also</div><div class="OH_CollapsibleArea_HrDiv"><hr class="OH_CollapsibleArea_Hr" /></div></div><div class="OH_clear"></div><div class="seeAlsoStyle"><a href="6d67ec6b-96ed-0a8b-0ad4-1c0568c7bf91.htm" target="">DryadLinqQueryable Class</a></div><div class="seeAlsoStyle"><a href="7f3c4d7e-cc6a-3e04-2d17-ad817bc05ccb.htm" target="">Fork Overload</a></div><div class="seeAlsoStyle"><a href="efe6507e-9fd8-bbd3-8227-fd6ba9e289c1.htm" target="">Microsoft.Research.DryadLinq Namespace</a></div></div></div></div></div><div id="OH_footer" class="OH_footer"><p /><div class="OH_feedbacklink"><a href="mailto:?subject=DryadLINQ+documentation+DryadLinqQueryable.Fork(TSource%2c+TKey)+Method+(IQueryable(TSource)%2c+Expression(Func(TSource%2c+TKey))%2c+TKey%5b%5d)+100+EN-US&amp;body=Your%20feedback%20is%20used%20to%20improve%20the%20documentation%20and%20the%20product.%20Your%20e-mail%20address%20will%20not%20be%20used%20for%20any%20other%20purpose%20and%20is%20disposed%20of%20after%20the%20issue%20you%20report%20is%20resolved.%20While%20working%20to%20resolve%20the%20issue%20that%20you%20report%2c%20you%20may%20be%20contacted%20via%20e-mail%20to%20get%20further%20details%20or%20clarification%20on%20the%20feedback%20you%20sent.%20After%20the%20issue%20you%20report%20has%20been%20addressed%2c%20you%20may%20receive%20an%20e-mail%20to%20let%20you%20know%20that%20your%20feedback%20has%20been%20addressed.">Send Feedback</a> on this topic.</div></div></body></html>