MrPowers commented on code in PR #66:
URL: https://github.com/apache/sedona-db/pull/66#discussion_r2353968226


##########
docs/reference/read-parquet-files.md:
##########
@@ -32,15 +32,25 @@ The correct process is a two-step approach:
 1. **Register** the DataFrame as a temporary view using 
`.createOrReplaceTempView()`.
 1. **Query** the view using `sd.sql()`.
 
-```python
-# 1. Load the Parquet file from a URL into a DataFrame
+```python linenums="1" title="Read a parquet file with SedonaDB"
+
+import sedona.db
+sd = sedona.db.connect()
+
+df = sd.read_parquet(
+    's3://wherobots-benchmark-prod/SpatialBench_sf=1_format=parquet/'
+    'building/building.parquet'
+)
+
+# Load the Parquet file, which creates a Pandas DataFrame
 df = 
sd.read_parquet('s3://wherobots-benchmark-prod/SpatialBench_sf=1_format=parquet/building/building.parquet')
 
-# 2. Register the DataFrame as a temporary view named 'buildings'
-df.createOrReplaceTempView('buildings')
+# Convert the Pandas DataFrame to a Spark DataFrame AND
+#    register it as a temporary view in a single line.
+spark.createDataFrame(df).createOrReplaceTempView('zone')

Review Comment:
   Think this should be `df.to_view("zone")`.



##########
docs/index.md:
##########
@@ -95,12 +102,48 @@ Here’s how to install SedonaDB with various build tools:
        install.packages("sedonadb", repos = 
"https://community.r-multiverse.org";)
        ```
 
-## SedonaDB example with vector data
+## Install SedonaDB CLI

Review Comment:
   Should we remove this for now?



##########
docs/programming-guide.ipynb:
##########
@@ -259,8 +259,8 @@
     "\n",
     "df = sd.sql(\"\"\"\n",
     "SELECT name, ST_Point(lng, lat) AS location\n",
-    "FROM (VALUES \n",
-    "    (1, -74.0, 40.7, 'Alice'),\n",
+    "FROM (VALUES\n",
+    "    (1, -74.0, 40.7, 'Ali ce'),\n",

Review Comment:
   Think a space was added by accident.



##########
docs/index.md:
##########
@@ -95,12 +102,48 @@ Here’s how to install SedonaDB with various build tools:
        install.packages("sedonadb", repos = 
"https://community.r-multiverse.org";)
        ```
 
-## SedonaDB example with vector data
+## Install SedonaDB CLI
+
+The SedonaDB command-line interface (CLI) is an interactive SQL shell for data 
analysis. For advanced usage, see the [DataFusion CLI 
docs](https://datafusion.apache.org/user-guide/cli/index.html).
+
+Install via Cargo:
+
+```shell
+cargo install sedona-cli
+```
+
+### Usage
+
+Start the interactive shell by running `sedona-cli` in your terminal. All SQL 
queries must end with a semicolon (`;`).
+
+```shell
+> sedona-cli
+Sedona CLI v0.0.1
+```
+
+```shell
+> SELECT ST_Point(0, 1) as geom;
+
+┌────────────┐
+│    geom    │
+│     wkb    │
+╞════════════╡
+│ POINT(0 1) │
+└────────────┘
+1 row(s)/1 column(s) fetched.
+Elapsed 0.024 seconds.
+
+```
+
+For a full list of supported SQL functions, see the [SQL 
Reference](https://sedona.apache.org/latest/api/sql/Overview/).

Review Comment:
   Can we link to the SedonaDB SQL functions?



##########
docs/programming-guide.ipynb:
##########
@@ -25,23 +25,23 @@
    "metadata": {},
    "outputs": [],
    "source": [
-    "import sedonadb\n",
+    "import sedona.db\n",
     "\n",
-    "sd = sedonadb.connect()"
+    "sd = sedona.db.connect()"
    ]
   },
   {
    "cell_type": "markdown",
    "id": "7aeaa60f-2325-418c-8e72-4344bd4a75fe",
    "metadata": {},
    "source": [
-    "Now let’s see how to create SedonaDB DataFrames.\n",
+    "Now, let's see how to create SedonaDB dataframes.\n",

Review Comment:
   Think DataFrames is better.



##########
docs/quickstart-python.md:
##########
@@ -0,0 +1,229 @@
+# Python Quickstart

Review Comment:
   Why did we convert this to a markdown file.  Can we keep the notebook 
approach, so it is executable?



##########
docs/reference/read-parquet-files.md:
##########
@@ -32,15 +32,25 @@ The correct process is a two-step approach:
 1. **Register** the DataFrame as a temporary view using 
`.createOrReplaceTempView()`.
 1. **Query** the view using `sd.sql()`.
 
-```python
-# 1. Load the Parquet file from a URL into a DataFrame
+```python linenums="1" title="Read a parquet file with SedonaDB"
+
+import sedona.db
+sd = sedona.db.connect()
+
+df = sd.read_parquet(
+    's3://wherobots-benchmark-prod/SpatialBench_sf=1_format=parquet/'

Review Comment:
   I guess this line can be removed



##########
docs/index.md:
##########
@@ -95,12 +102,48 @@ Here’s how to install SedonaDB with various build tools:
        install.packages("sedonadb", repos = 
"https://community.r-multiverse.org";)
        ```
 
-## SedonaDB example with vector data
+## Install SedonaDB CLI
+
+The SedonaDB command-line interface (CLI) is an interactive SQL shell for data 
analysis. For advanced usage, see the [DataFusion CLI 
docs](https://datafusion.apache.org/user-guide/cli/index.html).
+
+Install via Cargo:
+
+```shell
+cargo install sedona-cli
+```
+
+### Usage
+
+Start the interactive shell by running `sedona-cli` in your terminal. All SQL 
queries must end with a semicolon (`;`).
+
+```shell
+> sedona-cli
+Sedona CLI v0.0.1
+```
+
+```shell
+> SELECT ST_Point(0, 1) as geom;
+
+┌────────────┐
+│    geom    │
+│     wkb    │
+╞════════════╡
+│ POINT(0 1) │
+└────────────┘
+1 row(s)/1 column(s) fetched.
+Elapsed 0.024 seconds.
+
+```
+
+For a full list of supported SQL functions, see the [SQL 
Reference](https://sedona.apache.org/latest/api/sql/Overview/).
+
+### Help
 
-TODO
+* **Interactive Shell:** Use `\?` inside the shell to see special commands 
like `\d` (list tables) or `\q` (quit).
+* **Command Line:** Use `sedona-cli --help` in your terminal to view launch 
options, such as setting a data path (`-p`) or executing a command (`-c`).

Review Comment:
   Can we remove this for now?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to