Sprinkle Docs
Search…
πŸ““
Notebooks

Overview

You can use your favourite Jupyter Notebooks on Sprinkle. Through the navigation panel
πŸ–±
click on Notebooks.
The Jupyter Notebook
πŸ“”
is an open-source web application that allows you to create and share documents that contain live code, narrative text, equations, and visualizations
πŸ“Š
​
πŸ’Ή
.
Use notebooks for data cleaning, transformations, numerical simulation, statistical modelling, data visualization & machine learning.

Feature Walkthrough
🚢
​

Import data from sprinkle’s explore and segment reports to the notebook

Sprinkle created a library named β€œsprinkleSdk” to import data from the reports. The below script imports the library and imports data into the data frame.

Import sprinkle SDK

from sprinkleSdk import SprinkleSdk as sp

Read Segment

df = sp.read_segment('<segment_id>')

Read Explore

df = sp.read_explore('<explore_id>')
Once data is imported, you can run all kinds of analyses like descriptive, predictive, prescriptive, diagnostic analysis using these data.

Create a table and update an existing table in Sprinkle post-analysis?

Create a table or update existing table in the warehouse using a data frame
sp.create_or_update_table('user_defined_name', df)

How to work on Spark session operations?

Get spark session with default configurations
spark = sp.getOrCreate()
Change spark app name while creating default spark session
spark = sp.appName('some-name').getOrCreate()
Get spark session where the user can customise your configuration
spark = sp.sparkBuilder()
appName('some-name')
.config("spark.some.config.option1", "some-value")
.config("spark.some.config.option2", "some-value")
.getOrCreate()
Copy link
On this page
Overview
Feature Walkthrough
Import data from sprinkle’s explore and segment reports to the notebook
Create a table and update an existing table in Sprinkle post-analysis?
How to work on Spark session operations?