Apache Spark / PySpark Tutorial: Basics In 15 Mins

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ต.ค. 2024

ความคิดเห็น • 153

  • @mongooon6931
    @mongooon6931 2 ปีที่แล้ว +42

    We use spark for our data pipeline at work -- we have tables with 10+ billion records, and our applications end up moving trillions upon trillions of records of data per month. Unfathomable numbers that spark is capable of. Great video!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +2

      Yeah, it's insane! Thanks so much.

    • @EclipsyChannel
      @EclipsyChannel ปีที่แล้ว +4

      that's the power of distributed systems and parallel computing... computer science is beautiful

  • @Nedwin
    @Nedwin 3 ปีที่แล้ว +40

    I'm a freelance data scientist and I really thankful to find this video, Gregg. Can't expect more! Thank you so much. Good luck with everything. 🙏

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +5

      That's awesome best of luck in that! And you're very welcome it's my pleasure 😊

  • @AnVinhNguyen
    @AnVinhNguyen 3 ปีที่แล้ว +12

    Your explanation is clear and the examples are practical and useful for beginners. Thanks a lot and keep it up!

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +3

      I really appreciate this. You're very welcome 😃

  • @andersborum9267
    @andersborum9267 ปีที่แล้ว

    I'm just getting into DataBricks and PySpark and this introductory tutorial was a great starter.

    • @GregHogg
      @GregHogg  ปีที่แล้ว +1

      Awesome! Hope that goes well :)

  • @mtamjidhossain
    @mtamjidhossain 2 ปีที่แล้ว +1

    You are awesome. Just delivering the right videos. Subscribed a few days back already but hit notifications on for you rn. Cause I wanna watch all your videos

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      Well that's really great to hear! Thanks so much Tamzid!

  • @joshuabradshaw1647
    @joshuabradshaw1647 ปีที่แล้ว

    Thank you for sharing to the world. I'm currently a supply chain analyst and aspiring supply chain data scientist 🙏

    • @GregHogg
      @GregHogg  ปีที่แล้ว

      That's excellent to hear and very exciting Joshua! I wish you the best of luck 🥰

  • @ashleyb5849
    @ashleyb5849 3 ปีที่แล้ว +6

    Awesome video. I love using spark at work

  • @dominicaleung7329
    @dominicaleung7329 ปีที่แล้ว +1

    Greg, thank you so much. I am new to PySpark, and your video is very good in explanation and you did those simple example and I am able to follow you and write in my own Python Notebook to try it out. Will watch your DataFrame basics video next.

    • @GregHogg
      @GregHogg  ปีที่แล้ว +1

      Amazing! Sorry for the late reply

  • @victorroy525
    @victorroy525 ปีที่แล้ว

    Just the type of samples we need to begin with. Meaningful content. thnx.

    • @GregHogg
      @GregHogg  ปีที่แล้ว

      Glad you enjoyed it!

  • @parvathirajan.n
    @parvathirajan.n 2 ปีที่แล้ว +1

    No words man! Simply loved it. Appreciate your efforts.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      Really glad to hear that! Thank you 😊

  • @ericcarmichael3322
    @ericcarmichael3322 2 ปีที่แล้ว +1

    Thanks for sharing, appreciate the quick run down on this stuff

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Glad to hear it!

  • @BHANUCHAUDHARY-eb4ul
    @BHANUCHAUDHARY-eb4ul ปีที่แล้ว

    Thanks Greg for the wonderful explanation !!

  • @EclipsyChannel
    @EclipsyChannel ปีที่แล้ว

    you are a great teacher... keep doing what you do my man

  • @yashmodi6762
    @yashmodi6762 3 ปีที่แล้ว +3

    Which big data tools one must learn for beginners and from where to learn( please provide some resources)

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +3

      Of course I'd recommend my channel - SQL and Spark are the most important ones in my opinion :)

  • @SpecialGreg66
    @SpecialGreg66 หลายเดือนก่อน

    Hi Greg! Great video, do you have one that explains how you convert spark to dfs and vice versa? We pull millions of rows from csvs and looking to do transformations before dropping into a db.
    Also, how does the distributed computing work on a singular computer? Just distributes it across the cpu cores?

  • @hypebeastuchiha9229
    @hypebeastuchiha9229 3 ปีที่แล้ว +3

    What was your degree in Computer Science or a Data Science course?
    I'm in my third year for a Computer Science BSc and I feel like I'm at a disadvantage for Data Science. We didn't learn statistics or have a lot of math modules.
    Most Data Science jobs require a Masters or PhD but I don't want to get a Masters straight after uni so I'm looking at Data Engineering since they accept BSc's. Is that a realistic path into Data Science or am I wasting my time?

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +3

      I'm a statistics major. I don't think you're at a disadvantage, people very widely respect computer science majors. If anything I'd feel I'm at a disadvantage lol. But agreed, you get less stats courses. I would think some certificates and projects would be enough without needing a masters, unless you're aiming for FAANG or the other top jobs

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +2

      This video may help; th-cam.com/video/08G-u9HN8Kc/w-d-xo.html

  • @antarcticadventure
    @antarcticadventure 3 ปีที่แล้ว

    Never used Spark before. Thank you.

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +3

      Me too for the longest time; PySpark is a life changer though!

  • @mehmetkaya4330
    @mehmetkaya4330 2 ปีที่แล้ว

    Concise and very well explained! Thank you so much!!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Thank you and you're very welcome!

  • @GuilhermeMendesG
    @GuilhermeMendesG 2 ปีที่แล้ว

    What an amazing content you're putting here man... thanks for everything!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      Thanks so much for the kind words. You're very welcome 🤠

  • @hsoley
    @hsoley 2 ปีที่แล้ว +1

    You are awesome, thanks for sharing your knowledge with the world

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      I really appreciate that Hamid!!!

  • @aparfeno
    @aparfeno 2 ปีที่แล้ว

    Thank you for great video and for useful education links!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      You're super welcome 😃

  • @aeigreen
    @aeigreen 2 ปีที่แล้ว

    Explained so well. 5 stars. Love to see more videos..

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Really glad to hear it thanks so much!

  • @andrewhancock2451
    @andrewhancock2451 2 หลายเดือนก่อน

    This is an awesome video. I wonder, however, whether you could explain why the end results shows numbers with 12 characters. Didn't you set of numbers only go up to a million, which has 6 digits?
    You also referred to your hour-long PySpark course. Would you be able to link to it in the show notes, please? Thanks!

    • @yizharalmagor8539
      @yizharalmagor8539 15 วันที่ผ่านมา

      At a certain point he squared all the numbers in the RDD and then kept using the squares from then on.

  • @krishj8011
    @krishj8011 2 ปีที่แล้ว

    very fine details covered. really useful and easy to understand the spark concepts.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Really glad to hear that.

  • @manpritsingh3972
    @manpritsingh3972 2 ปีที่แล้ว

    This video is really helpful. Thanks a lot Gregg.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      You're super welcome!

  • @lakshaydulani
    @lakshaydulani ปีที่แล้ว

    now thats what i was looking for

  • @samusaran1692
    @samusaran1692 3 ปีที่แล้ว +2

    Very good examples. Thanks man :)

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      Glad it helped!

  • @r3d_robot594
    @r3d_robot594 2 ปีที่แล้ว

    Good PySpark Primer! Others are either too lengthy or short and vague.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Thanks so much I'm really glad to hear that! :)

  • @demohub
    @demohub ปีที่แล้ว

    Great overview. Thanks

  • @260056
    @260056 2 ปีที่แล้ว +1

    @greg, plz share the link of 1 hr video.. I am unable to find it

  • @boudhayanism
    @boudhayanism ปีที่แล้ว

    Cool video, thanks for making it

  • @keerthanamurugesan-xe6mr
    @keerthanamurugesan-xe6mr 4 หลายเดือนก่อน +1

    It look like using numpy, pandas what is the difference between this and pyspark.

    • @GregHogg
      @GregHogg  4 หลายเดือนก่อน +1

      It looks very similar to us coders, which is great. But pandas and numpy are mainly for dealing with data on the computer you're using. Spark allows us to distribute our workloads across a cluster of machines

    • @keerthanamurugesan-xe6mr
      @keerthanamurugesan-xe6mr 4 หลายเดือนก่อน

      @@GregHogg Thankyou

  • @JaylaScousa
    @JaylaScousa 3 ปีที่แล้ว +1

    Concise and well presented 👍

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      Very glad you found it useful, James!!

  • @tarunodaysarma9741
    @tarunodaysarma9741 3 ปีที่แล้ว +2

    Greg ,had a question on pyspark...how do I find latest parquet files stored in hdfc path using pyspark code

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +2

      Sorry I don't know! 🤔

  • @hyeonjukwon3638
    @hyeonjukwon3638 5 หลายเดือนก่อน

    Very useful and interesting! Subscribed :)

    • @GregHogg
      @GregHogg  5 หลายเดือนก่อน

      Glad to hear it, thanks a ton!

  • @caiocalo1
    @caiocalo1 ปีที่แล้ว

    such a good tutorial

  • @clintp3504
    @clintp3504 3 ปีที่แล้ว +1

    Great stuff! Thanks

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      You're very welcome ☺️

  • @charlescoult
    @charlescoult 2 ปีที่แล้ว

    Took a minute to get going but well done

  • @PranitKothari
    @PranitKothari 8 หลายเดือนก่อน

    Nicely explained.

  • @高智衡
    @高智衡 2 ปีที่แล้ว

    great great content! BTW, please give us the link of the an-hour-long spark tutorial mentioned in the end,thanks a lot.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Thanks! Here you go: th-cam.com/video/8ypIRp6DPew/w-d-xo.html

  • @ganeshkaushik2290
    @ganeshkaushik2290 3 ปีที่แล้ว +1

    Hi Bro, could you please make a video on learning process on bigdata?and what job roles which big data skills i'm really confsed where to start and what to learn!
    I know python, sql
    I learned some basics of hdfs, hive, sqoop
    now i'm trying to learn pyspark

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      Thanks for the feedback, I'll keep this in mind!

  • @geethsn1866
    @geethsn1866 2 ปีที่แล้ว +1

    Thanks for the tutorial. It was simple and easy to follow. However, when I tried the code in Colab, just by typing "sc" is not invoking spark. Is there any prerequisites - to be installed in Colab before "sc" ?

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +2

      Please check out my notebook. You'll need to pip install PySpark, and write a line or two of code to set it up

    • @geethsn1866
      @geethsn1866 2 ปีที่แล้ว

      @@GregHogg Thank you Greg.

  • @capper3360
    @capper3360 2 ปีที่แล้ว

    Can you share the link to the hour long tutorial you mentioned at the end, couldn't find it in your spark playlist.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      Here you go: th-cam.com/video/8ypIRp6DPew/w-d-xo.html

  • @noorhake9087
    @noorhake9087 2 ปีที่แล้ว

    Hi , I'd like to ask you a question
    I'm working on a project that is how linear regression selected feature by apache spark when I want to execute the code for pyspark it gives an error that pyspark dont define and I tried to figure it out in many ways it didn't solve that problem💔

  • @maxitube30
    @maxitube30 2 ปีที่แล้ว

    and what are the machine on what we parallelize the work?
    They have to be configurated?
    i mean,if pyspark or spark parrallelize on a cluster,we have to configue the cluster too?

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      Someone has to configure it. Probably won't be your job though. You'll just select it, kinda like a Python virtual environment, and act as if it's the same as in this video because nothing changes from the programming point of view :)

    • @maxitube30
      @maxitube30 2 ปีที่แล้ว

      @@GregHogg understood. Thx :)

  • @nataliaresende1121
    @nataliaresende1121 2 ปีที่แล้ว +2

    Hi Greg, how can I convert .csv files into .txt files (with comma as delimiter) using pyspark? Do you have a code snippet?

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +4

      I think you can just change the extension from CSV to txt

  • @nataliaresende1121
    @nataliaresende1121 2 ปีที่แล้ว

    very good, thanks!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      You're very welcome Natalia!

  • @pardonmasuka2
    @pardonmasuka2 7 หลายเดือนก่อน

    Awesome starter!

  • @MrChilo89
    @MrChilo89 2 ปีที่แล้ว

    Hello and thanks for this video, I ve been trying to follow and to your average way, but i receive an error :
    avg = nyt.map(lambda x: (x.title, int(x.rank[0])))
    grouped = avg.groupByKey()
    grouped = grouped.map(lambda x:(x[0], list(x[1])))
    averaged = grouped.map(lambda x: (x[0], sum(x[1]) / len(x[1]) ))
    averaged.collect()
    'TypeError: Invalid argument, not a string or column: [1, 3, 7, 8, 12, 14, 20] of type . For column literals, use 'lit', 'array', 'struct' or 'create_map' function.'

  • @sohamsonone5440
    @sohamsonone5440 2 ปีที่แล้ว

    Hi Greg, which one good among data science, data analytics or machine learning, AI.. could you pls give a suggestion

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Data science / ML

  • @cetilly
    @cetilly 3 ปีที่แล้ว

    Sensational!

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      Thank you 😊😊😊

  • @abdullahsiddique7787
    @abdullahsiddique7787 3 ปีที่แล้ว

    How is future of spark is flink replacing it ? Is it worth learning for career in big data ?

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      I don't know what flink is.

    • @abdullahsiddique7787
      @abdullahsiddique7787 3 ปีที่แล้ว

      @@GregHogg thanks for reply gregg can u pls also tell me the career scope of Apache spark for future

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +3

      @@abdullahsiddique7787 Spark is and will stay essential for Data science, ML, analysts and big data for a long time.

    • @abdullahsiddique7787
      @abdullahsiddique7787 3 ปีที่แล้ว

      @@GregHogg thanks gregg appreciate your quick response

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      @@abdullahsiddique7787 Of course!

  • @Vlapstone
    @Vlapstone ปีที่แล้ว

    sc command is not working on my Colab as it's working on this vide... can anyone help?

  • @rohanjoseph1531
    @rohanjoseph1531 3 ปีที่แล้ว

    Hi @Greg Hogg,
    I can't seem to access the "sc" object on Google Colab. Which library let's you use that object?

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      github.com/gahogg/TH-cam/blob/master/PySpark%20In%2015%20Minutes.ipynb

    • @rohanjoseph1531
      @rohanjoseph1531 3 ปีที่แล้ว

      @@GregHogg cheers!

  • @RossittoS
    @RossittoS 3 ปีที่แล้ว +1

    Great!

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      Thank you!

  • @ahmadsaad1888
    @ahmadsaad1888 3 ปีที่แล้ว +1

    You mentioned an hour long spark video, I can't find it.

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +1

      th-cam.com/video/8ypIRp6DPew/w-d-xo.html

    • @agnelamodia
      @agnelamodia 3 ปีที่แล้ว

      @@GregHogg Could you please paste this link in the description?

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      @@agnelamodia please see above

  • @chanta2809
    @chanta2809 3 ปีที่แล้ว

    What is the URL to practice? How to setup data for practicing?

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว +2

      Thank you! You made me notice I accidentally removed the notebook from the video description. You can grab the notebook code in the video description now. You can actually get PySpark in google colab very easily, with simply !pip install pyspark and then import pyspark, then continue following the steps in this video.

  • @ajanieniola9172
    @ajanieniola9172 ปีที่แล้ว

    Can you also use apply instead of map

  • @javidhesenov7611
    @javidhesenov7611 2 ปีที่แล้ว

    nice explanation

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Thanks a bunch Javid! :)

  • @Somethingaweful
    @Somethingaweful ปีที่แล้ว

    back up from the camera my dude. I feel like your staring directly at my soul

    • @GregHogg
      @GregHogg  ปีที่แล้ว +1

      Maybe I am

    • @Chris-qg6kc
      @Chris-qg6kc 4 หลายเดือนก่อน

      ​@@GregHoggget em bro.

  • @grantholomeu3725
    @grantholomeu3725 2 ปีที่แล้ว

    I don't understand why in tutorials like this I often get errors saying, "module x has no attribute 'y.'" In this case, I can't get Python to recognize parallelize.

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Not sure sorry!

  • @emirhanbilgic2475
    @emirhanbilgic2475 ปีที่แล้ว

    thanks mate

    • @GregHogg
      @GregHogg  ปีที่แล้ว +1

      Very welcome!

  • @e.s298
    @e.s298 ปีที่แล้ว

    Good for learn RDD

  • @paraklesis2253
    @paraklesis2253 3 ปีที่แล้ว

    Thank you

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      You're very welcome!

  • @pauweldalmeidaayivi5310
    @pauweldalmeidaayivi5310 8 หลายเดือนก่อน

    Great!

  • @smash4929
    @smash4929 7 หลายเดือนก่อน

    Hey Greg,
    The knowledge in the video is great but the background music is distracting.

  • @pinkomoore
    @pinkomoore 3 หลายเดือนก่อน

    Pyspark seems to be pandas on steroids + distributed resources usage

  • @sndselecta
    @sndselecta 3 ปีที่แล้ว +1

    I thought performance issue between scala and py isnt an issue anymore.

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      I personally doubt it. I'm not an expert on this one, but I'd be pretty surprised if python wasn't significantly slower than scala. Of course, if we're talking practically- they're both very fast, but in computational time, I would suspect python is much slower. Thanks!

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      You are correct, and I am incorrect! Thank you for updating me!

    • @sndselecta
      @sndselecta 3 ปีที่แล้ว

      I think we are both correct. I've been reading up on it, with regards to refreshing my scala or keep chugging away with pyspark. Bottom line: it's good to know both. It depends on the use cases. But in general Scala will perform better monotonically. However what Ive read is: it isn't always about one way gains based solely upon performance or more importantly "one" sole factor, there are pros and cons and sometimes the cumulative gains can weigh either way. For example pythons rich ecosystem can weigh in for achieving a faster result trying to do the same thing with Scala. Another interesting discussion you should start is Koalas. I wrote a blog, trying to get people to weigh in. forums.databricks.com/questions/65646/thoughts-on-if-its-worth-it-to-work-in-koalas.html

    • @GregHogg
      @GregHogg  3 ปีที่แล้ว

      @@sndselecta Sorry I missed this! Absolutely and thank you for the great reply.

    • @jimbocho660
      @jimbocho660 2 ปีที่แล้ว

      The Spark people themselves are advising against learning Scala for only marginal gains over pySpark.

  • @dw61w
    @dw61w 2 ปีที่แล้ว

    how is this more useful than numpy?

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว +1

      NumPy works on one computer. Spark works on as many as you want

    • @dw61w
      @dw61w 2 ปีที่แล้ว

      @@GregHogg thanks!

  • @marjorielarkins5178
    @marjorielarkins5178 หลายเดือนก่อน

    Johnson Jason Miller Jason Martinez George

  • @MrPeacefulsoul2610
    @MrPeacefulsoul2610 3 ปีที่แล้ว

    A detailed video probably would be more helpful.

  • @TeresaGonzalez-r2q
    @TeresaGonzalez-r2q 2 หลายเดือนก่อน

    Thomas David Young Shirley Rodriguez Scott

  • @vladx3539
    @vladx3539 2 ปีที่แล้ว

    great video… but please step away from the camera sir

    • @GregHogg
      @GregHogg  ปีที่แล้ว

      Ouch

    • @vladx3539
      @vladx3539 ปีที่แล้ว

      @@GregHogg just kidding with you! great content

  • @teddymisderrick7034
    @teddymisderrick7034 หลายเดือนก่อน

    Smith Jennifer Brown Frank Lewis William

  • @YoungMerle-f6v
    @YoungMerle-f6v 17 วันที่ผ่านมา

    Johnson Jennifer Miller Richard Anderson Betty

  • @MikeKing-c5k
    @MikeKing-c5k หลายเดือนก่อน

    Young Karen Miller Christopher Johnson Thomas

  • @yelgabs
    @yelgabs 8 หลายเดือนก่อน

    So you’re just gonna teach us the wrong way of doing things then leave us on a cliff hanger? 😅

  • @ranvijaymehta
    @ranvijaymehta ปีที่แล้ว

    Thanks Sir

  • @MUSKAN0896
    @MUSKAN0896 2 ปีที่แล้ว

    this was an amazing and clear video! thanks so much!

    • @GregHogg
      @GregHogg  2 ปีที่แล้ว

      Very glad to hear that!!