> For the complete documentation index, see [llms.txt](https://docs.databeanstalk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.databeanstalk.com/databeanstalk-guides/data-analysis-using-spark.md).

# Data Analysis using Spark

In this tutorial, you'll learn the basic steps to load and analyze data with Apache Spark in DatabeanStalk PySpark environment.

### Apache Spark Runtime Environment

Click on JupyterHub from left menu or click on QuickStart Spark or PySpark, it will open up new secure window with your same user credentials

![](https://1376249458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa64V7CmYDmio6qa5xPUN%2Fuploads%2FfbaPUzvE3rGDyoBAIVlV%2FJupyterHub.png?alt=media\&token=f2f724b1-f086-4c2d-b99d-e1e6791f1815)

### Server Options

Select server options for **Run Managed Apache Spark environment** and click on start.

![](https://1376249458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa64V7CmYDmio6qa5xPUN%2Fuploads%2Fz5L42vywiFFakM1k9LVM%2FServerOption.png?alt=media\&token=e153cecf-a5b5-41c9-af3d-3f858eb2126d)

Jupyter notebook start with multiple Spark runtime kernels like native python, PySpark, R or core Spark.

![](https://1376249458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa64V7CmYDmio6qa5xPUN%2Fuploads%2FUWIrVlALwP9fgjEkJoWk%2FScreen%20Shot%202022-01-02%20at%204.28.03%20PM.png?alt=media\&token=2387d210-c2d8-4338-b0b0-3560464002b9)

Initialize spark session with "sc" in notebook and Databeanstalk create Spark driver and two executors in kubernetes Databeanstalk plateform.

![](https://1376249458-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fa64V7CmYDmio6qa5xPUN%2Fuploads%2FMBdLxHsrisMME9u7OyWa%2Fsc.png?alt=media\&token=6c8b635d-1ee3-4107-b320-7b2939185d80)
