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

kevinjqliu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg.git


The following commit(s) were added to refs/heads/main by this push:
     new 6299a28973 docs: Add CREATE DATABASE step before CREATE TABLE in Spark 
quickstart (#15513)
6299a28973 is described below

commit 6299a289732dfeda7b5ab6d11d4438015505910e
Author: Ramesh Reddy Adutla 
<[email protected]>
AuthorDate: Wed Mar 4 22:08:07 2026 +0000

    docs: Add CREATE DATABASE step before CREATE TABLE in Spark quickstart 
(#15513)
    
    The quickstart guide instructs users to create table demo.nyc.taxis
    without first creating the nyc database, causing failures for new
    users. Added the missing CREATE DATABASE IF NOT EXISTS step.
    
    Closes #15509
    
    Co-authored-by: Copilot <[email protected]>
---
 site/docs/spark-quickstart.md | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/site/docs/spark-quickstart.md b/site/docs/spark-quickstart.md
index 28ac87d9c2..38149ad350 100644
--- a/site/docs/spark-quickstart.md
+++ b/site/docs/spark-quickstart.md
@@ -146,6 +146,28 @@ You can then run any of the following commands to start a 
Spark session.
 To create your first Iceberg table in Spark, run a [`CREATE 
TABLE`](docs/latest/spark-ddl.md#create-table) command. Let's create a table
 using `demo.nyc.taxis` where `demo` is the catalog name, `nyc` is the database 
name, and `taxis` is the table name.
 
+First, create the database if it doesn't already exist:
+
+=== "SparkSQL"
+
+    ```sql
+    CREATE DATABASE IF NOT EXISTS demo.nyc;
+    ```
+
+=== "Spark-Shell"
+
+    ```scala
+    spark.sql("CREATE DATABASE IF NOT EXISTS demo.nyc")
+    ```
+
+=== "PySpark"
+
+    ```py
+    spark.sql("CREATE DATABASE IF NOT EXISTS demo.nyc")
+    ```
+
+Then create the table:
+
 === "SparkSQL"
 
     ```sql

Reply via email to