This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion-ballista.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new a47fbfef Publish built docs triggered by 
d949e5fe33ad22da1388657dc8a6dc5f400023bc
a47fbfef is described below

commit a47fbfef95555b62717d0caf54014a164ef4b16a
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Nov 19 06:54:23 2024 +0000

    Publish built docs triggered by d949e5fe33ad22da1388657dc8a6dc5f400023bc
---
 _sources/user-guide/python.md.txt | 20 ++++++++++++++++----
 searchindex.js                    |  2 +-
 user-guide/python.html            | 19 +++++++++++++++----
 3 files changed, 32 insertions(+), 9 deletions(-)

diff --git a/_sources/user-guide/python.md.txt 
b/_sources/user-guide/python.md.txt
index 674850c7..f17ac68d 100644
--- a/_sources/user-guide/python.md.txt
+++ b/_sources/user-guide/python.md.txt
@@ -28,9 +28,20 @@ popular file formats files, run it in a distributed 
environment, and obtain the
 
 The following code demonstrates how to create a Ballista context and connect 
to a scheduler.
 
+If you are running a standalone cluster (runs locally), all you need to do is 
call the stand alone cluster method `standalone()` or your BallistaContext. If 
you are running a cluster in remote mode, you need to provide the URL 
`Ballista.remote("http://my-remote-ip:50050";)`.
+
 ```text
->>> import ballista
->>> ctx = ballista.BallistaContext("localhost", 50050)
+>>> from ballista import BallistaBuilder
+>>> # for a standalone instance
+>>> # Ballista will initiate with an empty config
+>>> # set config variables with `config()`
+>>> ballista = BallistaBuilder()\
+>>>    .config("ballista.job.name", "example ballista")
+>>>
+>>> ctx = ballista.standalone()
+>>>
+>>> # for a remote instance provide the URL
+>>> ctx = ballista.remote("df://url-path-to-scheduler:50050")
 ```
 
 ## SQL
@@ -103,14 +114,15 @@ The `explain` method can be used to show the logical and 
physical query plans fo
 The following example demonstrates creating arrays with PyArrow and then 
creating a Ballista DataFrame.
 
 ```python
-import ballista
+from ballista import BallistaBuilder
 import pyarrow
 
 # an alias
+# TODO implement Functions
 f = ballista.functions
 
 # create a context
-ctx = ballista.BallistaContext("localhost", 50050)
+ctx = Ballista().standalone()
 
 # create a RecordBatch and a new DataFrame from it
 batch = pyarrow.RecordBatch.from_arrays(
diff --git a/searchindex.js b/searchindex.js
index edb0fd75..01a26ca7 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"<a name=\"complex\"/>Run a Complex Query": 
[[14, "run-a-complex-query"]], "<a name=\"docker\"/> Run Docker Container": 
[[14, "run-docker-container"]], "<a name=\"hello\"/>Run a \u201cHello, 
World!\u201d Query": [[14, "run-a-hello-world-query"]], "<a 
name=\"jdbc\"/>Download the FlightSQL JDBC Driver": [[14, 
"download-the-flightsql-jdbc-driver"]], "<a name=\"prereq\"/>Prerequisites": 
[[14, "prerequisites"]], "<a name=\"tool\"/>Use the Driver in your Favorite 
[...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"<a name=\"complex\"/>Run a Complex Query": 
[[14, "run-a-complex-query"]], "<a name=\"docker\"/> Run Docker Container": 
[[14, "run-docker-container"]], "<a name=\"hello\"/>Run a \u201cHello, 
World!\u201d Query": [[14, "run-a-hello-world-query"]], "<a 
name=\"jdbc\"/>Download the FlightSQL JDBC Driver": [[14, 
"download-the-flightsql-jdbc-driver"]], "<a name=\"prereq\"/>Prerequisites": 
[[14, "prerequisites"]], "<a name=\"tool\"/>Use the Driver in your Favorite 
[...]
\ No newline at end of file
diff --git a/user-guide/python.html b/user-guide/python.html
index 150b392b..ecaf8b31 100644
--- a/user-guide/python.html
+++ b/user-guide/python.html
@@ -356,8 +356,18 @@ popular file formats files, run it in a distributed 
environment, and obtain the
 <section id="connecting-to-a-cluster">
 <h2>Connecting to a Cluster<a class="headerlink" 
href="#connecting-to-a-cluster" title="Link to this heading">¶</a></h2>
 <p>The following code demonstrates how to create a Ballista context and 
connect to a scheduler.</p>
-<div class="highlight-text notranslate"><div 
class="highlight"><pre><span></span>&gt;&gt;&gt; import ballista
-&gt;&gt;&gt; ctx = ballista.BallistaContext(&quot;localhost&quot;, 50050)
+<p>If you are running a standalone cluster (runs locally), all you need to do 
is call the stand alone cluster method <code class="docutils literal 
notranslate"><span class="pre">standalone()</span></code> or your 
BallistaContext. If you are running a cluster in remote mode, you need to 
provide the URL <code class="docutils literal notranslate"><span 
class="pre">Ballista.remote(&quot;http://my-remote-ip:50050&quot;)</span></code>.</p>
+<div class="highlight-text notranslate"><div 
class="highlight"><pre><span></span>&gt;&gt;&gt; from ballista import 
BallistaBuilder
+&gt;&gt;&gt; # for a standalone instance
+&gt;&gt;&gt; # Ballista will initiate with an empty config
+&gt;&gt;&gt; # set config variables with `config()`
+&gt;&gt;&gt; ballista = BallistaBuilder()\
+&gt;&gt;&gt;    .config(&quot;ballista.job.name&quot;, &quot;example 
ballista&quot;)
+&gt;&gt;&gt;
+&gt;&gt;&gt; ctx = ballista.standalone()
+&gt;&gt;&gt;
+&gt;&gt;&gt; # for a remote instance provide the URL
+&gt;&gt;&gt; ctx = 
ballista.remote(&quot;df://url-path-to-scheduler:50050&quot;)
 </pre></div>
 </div>
 </section>
@@ -424,14 +434,15 @@ COUNT(UInt8(1)): int64]
 <section id="dataframe">
 <h2>DataFrame<a class="headerlink" href="#dataframe" title="Link to this 
heading">¶</a></h2>
 <p>The following example demonstrates creating arrays with PyArrow and then 
creating a Ballista DataFrame.</p>
-<div class="highlight-python notranslate"><div 
class="highlight"><pre><span></span><span class="kn">import</span> <span 
class="nn">ballista</span>
+<div class="highlight-python notranslate"><div 
class="highlight"><pre><span></span><span class="kn">from</span> <span 
class="nn">ballista</span> <span class="kn">import</span> <span 
class="n">BallistaBuilder</span>
 <span class="kn">import</span> <span class="nn">pyarrow</span>
 
 <span class="c1"># an alias</span>
+<span class="c1"># TODO implement Functions</span>
 <span class="n">f</span> <span class="o">=</span> <span 
class="n">ballista</span><span class="o">.</span><span 
class="n">functions</span>
 
 <span class="c1"># create a context</span>
-<span class="n">ctx</span> <span class="o">=</span> <span 
class="n">ballista</span><span class="o">.</span><span 
class="n">BallistaContext</span><span class="p">(</span><span 
class="s2">&quot;localhost&quot;</span><span class="p">,</span> <span 
class="mi">50050</span><span class="p">)</span>
+<span class="n">ctx</span> <span class="o">=</span> <span 
class="n">Ballista</span><span class="p">()</span><span class="o">.</span><span 
class="n">standalone</span><span class="p">()</span>
 
 <span class="c1"># create a RecordBatch and a new DataFrame from it</span>
 <span class="n">batch</span> <span class="o">=</span> <span 
class="n">pyarrow</span><span class="o">.</span><span 
class="n">RecordBatch</span><span class="o">.</span><span 
class="n">from_arrays</span><span class="p">(</span>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to