You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/06 16:20:21 UTC

[GitHub] [iceberg-docs] samredai commented on a diff in pull request #75: Spark quickstart page

samredai commented on code in PR #75:
URL: https://github.com/apache/iceberg-docs/pull/75#discussion_r890317656


##########
landing-page/content/common/spark-quickstart.md:
##########
@@ -0,0 +1,379 @@
+---
+url: spark-quickstart
+toc: true
+aliases:
+    - "spark-quickstart"
+---
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements.  See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License.  You may obtain a copy of the License at
+ -
+ -   http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+# Getting Started With Spark and Iceberg
+
+Spark is currently the most feature-rich compute engine for Iceberg operations. 
+We recommend you to get started with Spark to understand Iceberg concepts and features with examples.
+You can also view documentations of using Iceberg with other compute engine under the
+[**Compute Frameworks**](/compute-frameworks) tab.
+
+## Docker Quickstart (Spark)
+
+The fastest way to get started is to use a docker-compose file that uses the the [tabulario/spark-iceberg](https://hub.docker.com/r/tabulario/spark-iceberg) image
+which contains a local Spark cluster with a configured Iceberg catalog. Save the following into a file named `docker-compose.yml`.
+
+```yaml
+version: "3"
+
+services:
+  spark-iceberg:
+    image: tabulario/spark-iceberg
+    depends_on:
+      - postgres
+    container_name: spark-iceberg
+    environment:
+      - SPARK_HOME=/opt/spark
+      - PYSPARK_PYTON=/usr/bin/python3.9
+      - PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/spark/bin
+    volumes:
+      - ./warehouse:/home/iceberg/warehouse
+      - ./notebooks:/home/iceberg/notebooks/notebooks
+    ports:
+      - 8888:8888
+      - 8080:8080
+      - 18080:18080
+  postgres:
+    image: postgres:13.4-bullseye
+    container_name: postgres
+    environment:
+      - POSTGRES_USER=admin
+      - POSTGRES_PASSWORD=password
+      - POSTGRES_DB=demo_catalog
+    volumes:
+      - ./postgres/data:/var/lib/postgresql/data
+```
+
+Next, run the following to start up the docker containers.
+```sh
+docker-compose up
+```
+
+You can then run any of the following to start a Spark session.
+
+{{% codetabs "LaunchSparkClient" %}}
+{{% addtab "SparkSQL" checked %}}
+{{% addtab "SparkShell" %}}
+{{% addtab "PySpark" %}}
+{{% addtab "Notebook" %}}

Review Comment:
   We could but the thing is, they could use a notebook but still run spark-sql with `%%sql` or spark-shell with a Scala/Java notebook. To prevent any confusion I could remove the `Notebook` tab and just have an info box that mentions launching a notebook server.



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org