Giter Site home page Giter Site logo

pyspark's Introduction

PySpark & AWS: Master Big Data With PySpark and AWS

Hands on Big Data course including in demand industry skills

BIG DATA

Prerequisites

Applications of Spark

Applications of Spark

  • Streaming Data
  • Machine Learning
  • Batch Data
  • ETL Pipelines
  • Full load and Replication on going

What's inside

Methodology

Projects

  • Student Data Analysis
  • Employee Data Analysis
  • Collaborative Filtering
  • Spark Streaming
  • ETL Pipeline
  • Full Load and Replication on Going

SPARK

Why Spark?

  • Speed
  • Distributed
  • Advanced Analytics
  • Real Time
  • Powerful Caching
  • Fault Tolerant
  • Deployment

HADOOP

Hadoop Ecosystem Map & Reduce

Spark Architecture

Spark Architecture

Spark Ecosystem

Spark Ecosystem

Data Bricks

Spark Local Setup

Spark RDD's

  • RDD is the spark’s core abstraction which stands for Resilient Distributed Dataset
  • RDD is the immutable distributed collection of objects
  • Internally spark distributes the data in RDD, to different nodes across the cluster to achieve parallelization.

Transformations and Actions

  • Transformation creates new RDD from an existing one.
  • Actions return a value to the driver program after running a computation on the RDD
  • All transformation in Spark are lazy
  • Spark only triggers the data flow when there is a action.

Creating Spark RDD

Running code locally

map()

  • Map is used as a mapper of data from one state to another

  • It will create a new RDD

  • rdd.map(lambda x:x.split())

  • Quiz

image

flatMap()

filter()

  • Filter is used to remove the elements from the RDD

  • It will create new RDD

  • rdd.filter(lambda x:x!=12)

  • Quiz

image

distinct()

groupByKey()

  • groupByKey() is used to create group based on Keys in RDD
  • For groupByKey to work properly the data must be in the format of (k,v), (k,v), (k2,v), (k2,v)
    • Example ("Apple",1), ("Ball",1), ("Apple",1)
  • It will create a new RDD
  • rdd.groupByKey()
  • mapValues(list) are usually used to get the group data

reduceByKey()

  • reduceByKey() is used to combined data based on keys in RDD
  • for reduceByKey() to work properly the data must be in the format of (k,v), (k,v), (k2,v), (k2,v)
    • Example : ("Apple",1), ("Ball",1), ("Apple",1)
  • It will create new RDD
  • rdd.reduceByKey(lambda x,y:x+y)

pyspark's People

Contributors

sawant98d avatar code292 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.