Added: incubator/s2graph/site/docs/api/query/query_edge.html URL: http://svn.apache.org/viewvc/incubator/s2graph/site/docs/api/query/query_edge.html?rev=1856470&view=auto ============================================================================== --- incubator/s2graph/site/docs/api/query/query_edge.html (added) +++ incubator/s2graph/site/docs/api/query/query_edge.html Thu Mar 28 11:04:32 2019 @@ -0,0 +1,1001 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Edge Queries — S2Graph 0.0.2 documentation</title> + + + + + + + + + <script type="text/javascript" src="../../_static/js/modernizr.min.js"></script> + + + <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script> + <script type="text/javascript" src="../../_static/jquery.js"></script> + <script type="text/javascript" src="../../_static/underscore.js"></script> + <script type="text/javascript" src="../../_static/doctools.js"></script> + <script type="text/javascript" src="../../_static/language_data.js"></script> + + <script type="text/javascript" src="../../_static/js/theme.js"></script> + + + + + <link rel="stylesheet" href="../../_static/css/s2graph_style.css" type="text/css" /> + <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" /> + <link rel="index" title="Index" href="../../genindex.html" /> + <link rel="search" title="Search" href="../../search.html" /> + <link rel="next" title="Query Vertices" href="query_vertex.html" /> + <link rel="prev" title="Query Options" href="query_options.html" /> +</head> + +<body class="wy-body-for-nav"> + + + <div class="wy-grid-for-nav"> + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search" > + + + + <a href="../../index.html" class="icon icon-home"> S2Graph + + + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <p class="caption"><span class="caption-text">S2Graph Documentation</span></p> +<ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="../../getting_started/index.html">Getting Started</a></li> +<li class="toctree-l1"><a class="reference internal" href="../../getting_started/your_first_graph.html">Your First S2Graph</a></li> +<li class="toctree-l1 current"><a class="reference internal" href="../index.html">HTTP API Glossary</a><ul class="current"> +<li class="toctree-l2"><a class="reference internal" href="../management/index.html">Management APIs</a></li> +<li class="toctree-l2"><a class="reference internal" href="../mutate/index.html">Mutate APIs</a></li> +<li class="toctree-l2 current"><a class="reference internal" href="index.html">Query APIs</a><ul class="current"> +<li class="toctree-l3"><a class="reference internal" href="query_options.html">Query Options</a></li> +<li class="toctree-l3 current"><a class="current reference internal" href="#">Edge Queries</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#checkedges-post-graphs-checkedges">checkEdges - <code class="docutils literal notranslate"><span class="pre">POST</span> <span class="pre">/graphs/checkEdges</span></code></a></li> +<li class="toctree-l4"><a class="reference internal" href="#getedges-post-graphs-getedges">getEdges - <code class="docutils literal notranslate"><span class="pre">POST</span> <span class="pre">/graphs/getEdges</span></code></a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="query_vertex.html">Query Vertices</a></li> +</ul> +</li> +</ul> +</li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../../index.html">S2Graph</a> + + </nav> + + + <div class="wy-nav-content"> + + <div class="rst-content"> + + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../../index.html">Docs</a> »</li> + + <li><a href="../index.html">HTTP API Glossary</a> »</li> + + <li><a href="index.html">Query APIs</a> »</li> + + <li>Edge Queries</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../../_sources/api/query/query_edge.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="edge-queries"> +<h1>Edge Queries<a class="headerlink" href="#edge-queries" title="Permalink to this headline">¶</a></h1> +<p>S2Graph provides a query DSL which has been reported to have a pretty steep learning curve. +One tip is to try to understand each features by projecting it to that of a RDBMS such MySQL. +This doesnât work all the time, but there are many similarities between S2Graph and a conventional RDBMS. +For example, S2Graphs âgetEdgesâ is used to fetch data and traverse multiple steps. This is very similar to the âSELECTâ query in MySQL.</p> +<p>Traversing each step is similar to <code class="docutils literal notranslate"><span class="pre">join</span></code> operation in RDBMS. One thing to note here is that users must start their traverse from smaller set to terminate BFS early as soon as possible. +Another tip is to not be shy to ask! Ask any questions on our <a class="reference external" href="https://groups.google.com/forum/#!forum/s2graph">mailing list</a>. list or open an issue at our <a class="reference external" href="https://github.com/apache/incubator-s2graph">github</a> with the problems that youâre having with S2Graph.</p> +<div class="section" id="checkedges-post-graphs-checkedges"> +<h2>checkEdges - <code class="docutils literal notranslate"><span class="pre">POST</span> <span class="pre">/graphs/checkEdges</span></code><a class="headerlink" href="#checkedges-post-graphs-checkedges" title="Permalink to this headline">¶</a></h2> +<p>return edge for given vertex pair only if edge exist. +This is more <code class="docutils literal notranslate"><span class="pre">general</span></code> way to check edge existence between any given vertex pairs comparing using <code class="docutils literal notranslate"><span class="pre">_to</span></code> on query parameter</p> +</div> +<div class="section" id="getedges-post-graphs-getedges"> +<h2>getEdges - <code class="docutils literal notranslate"><span class="pre">POST</span> <span class="pre">/graphs/getEdges</span></code><a class="headerlink" href="#getedges-post-graphs-getedges" title="Permalink to this headline">¶</a></h2> +<p>Select edges with query.</p> +<p><strong>Duplicate Policy</strong></p> +<p>Here is a very basic query to fetch all edges that start from source vertex â101â.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">101</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p><code class="docutils literal notranslate"><span class="pre">Notice</span> <span class="pre">the</span> <span class="pre">"duplicate"</span> <span class="pre">field</span></code>. If a target labelâs consistency level is <code class="docutils literal notranslate"><span class="pre">weak</span></code> and multiple edges exist with the same (from, to, label, direction) id, then the query is expect to have a policy for handling edge duplicates. S2Graph provides four duplicate policies on edges.</p> +<div class="admonition note"> +<p class="first admonition-title">Note</p> +<ul class="last simple"> +<li>raw: Allow duplicates and return all edges.</li> +<li>first: Return only the first edge if multiple edges exist. This is default.</li> +<li>countSum: Return only one edge, and return how many duplicates exist.</li> +<li>sum: Return only one edge, and return sum of the scores.</li> +</ul> +</div> +<p>With duplicate ârawâ, there are actually three edges with the same (from, to, label, direction) id.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">3</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">29</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">30</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">29</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">29</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">1972178414</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Duplicate âcountSumâ returns only one edge with the score sum of 3.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span> <span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">3</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">135</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">1972178414</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>Select Option Example</strong></p> +<p>In case you want to control the fields shown in the result edges, use the âselectâ option.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"select"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"from"</span><span class="p">,</span> <span class="s2">"to"</span><span class="p">,</span> <span class="s2">"label"</span><span class="p">],</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">101</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p>S2Graph will return only those fields in the result.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">3</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">3</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">1972178414</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Default value of the âselectâ option is an empty array which means that all edge fields are returned.</p> +<p><strong>groupBy Option Example</strong></p> +<p>Result edges can be grouped by a given field.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"select"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"from"</span><span class="p">,</span> <span class="s2">"to"</span><span class="p">,</span> <span class="s2">"label"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">,</span> <span class="s2">"timestamp"</span><span class="p">,</span> <span class="s2">"score"</span><span class="p">,</span> <span class="s2">"time"</span><span class="p">,</span> <span class="s2">"weight"</span><span class="p">,</span> <span class="s2">"is_hidden"</span><span class="p">,</span> <span class="s2">"is_blocked"</span><span class="p">],</span> + <span class="s2">"groupBy"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"from"</span><span class="p">,</span> <span class="s2">"to"</span><span class="p">,</span> <span class="s2">"label"</span><span class="p">],</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">101</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p>You can see the result edges are grouped by their âfromâ, âtoâ, and âlabelâ fields.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"groupBy"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span> + <span class="p">},</span> + <span class="s2">"agg"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">30</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">1972178414</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>filterOut option example</strong></p> +<p>You can also run two queries concurrently, and filter the result of one query with the result of the other.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"filterOutFields"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"_to"</span><span class="p">],</span> + <span class="s2">"filterOut"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">100</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">},</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">101</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p>S2Graph will run two concurrent queries, one in the main step, and another in the filter out clause. Here is more practical example.</p> +<p>The main query from the above will traverse a graph of users and news articles as follows:</p> +<ol class="arabic simple"> +<li>Fetch the list of news articles that user Alec read.</li> +<li>Get the categories of the result edges of step one.</li> +<li>Fetch other articles that were published in same category.</li> +</ol> +<p>Meanwhile, Alec does not want to get articles that he already read. This can be taken care of with the following query in the filterOut option: +Articles that Alec has already read.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">6</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">19</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803143507760</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438591888454</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438591888454</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9342237306639056</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438591888454</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">19</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803150406010</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438591143640</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438591143640</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9333716513280771</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438591143640</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">19</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803144908340</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581933262</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438581933262</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.922898833570944</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581933262</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">19</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803124627492</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581485765</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438581485765</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9223930035297659</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581485765</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">19</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="s2">"Alec"</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803113311090</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_user_view_news"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438580536376</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438580536376</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9213207756669546</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438580536376</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">354266627</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Without âfilterOutâ</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">1028</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_news_belongto_category"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">2</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">33</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">1028</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803105805092</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_news_belongto_category"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9342777143725886</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"updateTime"</span><span class="p">:</span> <span class="mi">20150803172249144</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">33</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">1028</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803143507760</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_news_belongto_category"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581548486</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438581548486</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9342777143725886</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"updateTime"</span><span class="p">:</span> <span class="mi">20150803145908490</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438581548486</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="o">-</span><span class="mi">14034523</span> +<span class="p">}</span> +</pre></div> +</div> +<p>with âfilterOutâ</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="mi">85957406</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">1028</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="mi">20150803105805092</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"daumnews_news_belongto_category"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mf">0.9343106784173475</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"updateTime"</span><span class="p">:</span> <span class="mi">20150803172249144</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">1438590169146</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="o">-</span><span class="mi">14034523</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Note that article <code class="docutils literal notranslate"><span class="pre">20150803143507760</span></code> has been filtered out.</p> +<p><strong>nextStepLimit Example</strong></p> +<p>S2Graph provides step-level aggregation so that users can take the top K items from the aggregated results.</p> +<p><strong>nextStepThreshold Example</strong></p> +<p><strong>sample Example</strong></p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span><span class="s2">"sample"</span><span class="p">:</span><span class="mi">2</span><span class="p">,</span><span class="s2">"step"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"graph_test"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> <span class="s2">"scoring"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"time"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> <span class="s2">"weight"</span><span clas s="p">:</span> <span class="mi">1</span><span class="p">}}]}</span> + <span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>transform Example</strong></p> +<p>With typical two-step query, S2Graph will start the second step from the â_toâ (vertex id) values of the first stepsâ result. With the âtransformâ option, you can actually use any single field from the result edgesâ properties of step one.</p> +<p>Add a âtransformâ option to the query from example 1.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"select"</span><span class="p">:</span> <span class="p">[],</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> + <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"user_id_test"</span><span class="p">,</span> + <span class="s2">"id"</span><span class="p">:</span> <span class="mi">101</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">,</span> + <span class="s2">"duplicate"</span><span class="p">:</span> <span class="s2">"raw"</span><span class="p">,</span> + <span class="s2">"transform"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">[</span><span class="s2">"_to"</span><span class="p">],</span> + <span class="p">[</span><span class="s2">"time.$"</span><span class="p">,</span> <span class="s2">"time"</span><span class="p">]</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span> +</pre></div> +</div> +<p>Note that we have six resulting edges. We have two transform rules, the first one simply fetches edges with their target vertex IDs (such as âtoâ: â10â), and the second rule will fetch the same edges but with the âtimeâ values replacing vertex IDs (such as âtoâ: âtoâ: âtime.-30â).</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"size"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"degrees"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">3</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_degree"</span><span class="p">:</span> <span class="mi">3</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"results"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">30</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"time.-30"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">6</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">30</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"time.-10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">5</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="o">-</span><span class="mi">10</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"10"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"cacheRemain"</span><span class="p">:</span> <span class="o">-</span><span class="mi">8</span><span class="p">,</span> + <span class="s2">"from"</span><span class="p">:</span> <span class="mi">101</span><span class="p">,</span> + <span class="s2">"to"</span><span class="p">:</span> <span class="s2">"time.0"</span><span class="p">,</span> + <span class="s2">"label"</span><span class="p">:</span> <span class="s2">"s2graph_label_test_weak"</span><span class="p">,</span> + <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"score"</span><span class="p">:</span> <span class="mi">1</span><span class="p">,</span> + <span class="s2">"props"</span><span class="p">:</span> <span class="p">{</span> + <span class="s2">"_timestamp"</span><span class="p">:</span> <span class="mi">4</span><span class="p">,</span> + <span class="s2">"time"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> + <span class="s2">"is_hidden"</span><span class="p">:</span> <span class="n">false</span><span class="p">,</span> + <span class="s2">"is_blocked"</span><span class="p">:</span> <span class="n">false</span> + <span class="p">}</span> + <span class="p">}</span> + <span class="p">],</span> + <span class="s2">"impressionId"</span><span class="p">:</span> <span class="mi">1972178414</span> +<span class="p">}</span> +</pre></div> +</div> +<p><strong>Two-Step Traversal Example</strong></p> +<p>The following query will fetch a userâs (id 1) friends of friends by chaining multiple steps:</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"friends"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">100</span><span class="p">}</span> + <span class="p">]</span> + <span class="p">},</span> + <span class="p">{</span> + <span class="s2">"step"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"friends"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">10</span><span class="p">}</span> + <span class="p">]</span> + <span class="p">}</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p><strong>Three-Step Traversal Example</strong></p> +<p>Add more steps for wider traversals. Be gentle on the limit options since the number of visited edges will increase exponentially and become very heavy on the system.</p> +<p><strong>More examples</strong></p> +<p>Example 1. From label âgraph_testâ, select the first 100 edges that start from vertex âaccount_id = 1â, with default sorting.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">[{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"graph_test"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"out"</span><span class="p">,</span> <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">100</span> + <span class="p">}]</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p>Example 2. Now select between the 50th and 100th edges from the same query.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">[{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"graph_test"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">50</span><span class="p">}]</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p>Example 3. Now add a time range filter so that you will only get the edges that were inserted between 1416214118000 and 1416300000000.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">[{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"graph_test"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span> <span class="s2">"duration"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"from"</span><span class="p">:</span> <span class="mi">1416214118000</span><span class="p">,</span> <span class="s2">"to"</span><span class="p">:</span> <span class="mi">1416300000000</span><span class="p">}]</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p>Example 4. Now add scoring rule to sort the result by indexed properties âtimeâ and âweightâ, with weights of 1.5 and 10, respectively.</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">[{</span><span class="s2">"label"</span><span class="p">:</span> <span class="s2">"graph_test"</span><span class="p">,</span> <span class="s2">"direction"</span><span class="p">:</span> <span class="s2">"in"</span><span class="p">,</span> <span class="s2">"offset"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span> <span class="s2">"limit"</span><span class="p">:</span> <span class="mi">50</span><span class="p">,</span> <span class="s2">"duration"</span><span class="p">:</span> <span class="p">{</span><span class="s2">"from"</span><span class="p">:</span> <span class="mi">1416214118000</span><span class="p">,</span> <span class="s2">"to"</span><span class="p">:</span> <span class="mi">1416214218000</span><span class="p">},</span> <span class="s2">"scoring"</span><span class="p">:</span> <span class="p">{</span><span class="s2">" time"</span><span class="p">:</span> <span class="mf">1.5</span><span class="p">,</span> <span class="s2">"weight"</span><span class="p">:</span> <span class="mi">10</span><span class="p">}]</span> + <span class="p">]</span> +<span class="p">}</span><span class="s1">'</span> +</pre></div> +</div> +<p>Example 5. Make a two-step query to fetch friends of friends of a user âaccount_id = 1â. (Limit the first step by 10 friends and the second step by 100.)</p> +<div class="code bash highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="o">-</span><span class="n">XPOST</span> <span class="n">localhost</span><span class="p">:</span><span class="mi">9000</span><span class="o">/</span><span class="n">graphs</span><span class="o">/</span><span class="n">getEdges</span> <span class="o">-</span><span class="n">H</span> <span class="s1">'Content-Type: Application/json'</span> <span class="o">-</span><span class="n">d</span> <span class="s1">'</span> +<span class="p">{</span> + <span class="s2">"srcVertices"</span><span class="p">:</span> <span class="p">[{</span><span class="s2">"serviceName"</span><span class="p">:</span> <span class="s2">"s2graph"</span><span class="p">,</span> <span class="s2">"columnName"</span><span class="p">:</span> <span class="s2">"account_id"</span><span class="p">,</span> <span class="s2">"id"</span><span class="p">:</span><span class="mi">1</span><span class="p">}],</span> + <span class="s2">"steps"</span><span class="p">:</span> <span class="p">[</span>
[... 83 lines stripped ...]