How to handle Data skewness in Apache Spark using Key Salting Technique

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 27

  • @gurumoorthysivakolunthu9878
    @gurumoorthysivakolunthu9878 Рік тому +3

    Hi Sir... Perfect Great Explanation... Thank you for your effort...
    I have a doubt :--
    After joining The Salting step should be - unsalted and then grouped by has to be applied, Right...?
    .....

  • @SpiritOfIndiaaa
    @SpiritOfIndiaaa 2 роки тому +1

    Thanks but if we have multiple columns as KEY how to handle it ?

  • @deepanshusingh6057
    @deepanshusingh6057 Місяць тому

    I would have appreciated if you would have run the code of salting and showed us on spark UI for better clarity what is happening internally within spark

  • @vijeandran
    @vijeandran 4 роки тому

    Amazing video.... How can we use the salting technique in PySpark for data skew?

  • @rishigc
    @rishigc 4 роки тому +1

    amazing video.. however, i don't know scala. So can you please give an example on how to implement the salting technique with Spark SQL queries ? that'll be of great help..

  • @gautamyadav-cx7zx
    @gautamyadav-cx7zx 2 роки тому

    Well, I must say, thanks a lot.....have been searching for this kind of explaination.

  • @pariksheetde4573
    @pariksheetde4573 4 роки тому +4

    Excellent. Thank you

  • @someshchandra007
    @someshchandra007 3 роки тому

    This really great and crystal clear explanations....thanks a lot for sharing and spreading knowledge!

  • @ashwinc9867
    @ashwinc9867 4 роки тому +1

    Excellent video..thanks for the explanation and sharing the code

  • @savage_su
    @savage_su 2 роки тому

    Good work, its better you show the ourput after the salting dataframes and explain udf more detail.

  • @joeturkington1304
    @joeturkington1304 3 роки тому

    Excellent Description

  • @akashhudge5735
    @akashhudge5735 2 роки тому

    but the join output will not be correct because in previous scenario it would have joined with all the matching ids but with new salting method it will join with only newly slated key, that's weird

  • @shwetanandwani9059
    @shwetanandwani9059 2 роки тому

    Hey great video, could you also link the associated resources you referred to while making this video?

  • @thomashass1
    @thomashass1 2 роки тому

    I have 2 questions:
    First one: I think that is wrong on your visual presentation of table 2 after salting. Why don't you have z_2 und z_3 there? Also why are you using capital letters sometimes, that's confusing.
    Secone question: I don't get the benefit of Key Salting in general. How is this different from broadcasting you second table? Because you explode it and then you will end up with sending the whole table to every executor anyway? No one can give an answer to this question.

  • @chetansp912
    @chetansp912 4 роки тому +1

    Amazing video..!!

  • @arunsundar3739
    @arunsundar3739 8 місяців тому

    beautifully explained, thank you very much :)

  • @aravindkumar4411
    @aravindkumar4411 4 роки тому

    Can u please explain how to take the random number count

    • @jeevanmadhur3732
      @jeevanmadhur3732 4 роки тому +1

      Hi Aravind, If I understand your question correctly you wanted to take the first data frame count where we are appending a random number
      var df1 = leftTable
      .withColumn(leftCol, concat(
      leftTable.col(leftCol), lit("_"), lit(floor(rand(123456) * 10))))
      We can simply do
      df1.select(col("id")).count()
      This should give the count of the first data frame column
      For more details, you can refer below git link
      github.com/gjeevanm/SparkDataSkewness/blob/master/src/main/scala/com/gjeevan/DataSkew/RemoveDataSkew.scala

  • @MahmoudHanafy1992
    @MahmoudHanafy1992 3 роки тому +1

    Great Explanation, Thanks for sharing this.
    I think there is off by 1 error.
    You are using (0 to 3) which will have (0, 1, 2, 3)
    but random number range will be (0, 1, 2)

  • @soumyadipdas1406
    @soumyadipdas1406 4 роки тому +1

    amazing sir! thanks a lot

  • @NishaKumari-op2ek
    @NishaKumari-op2ek 4 роки тому

    Hi, are you missing something in code ?? I used your code but its throwing an exception for the below code of lines
    //join after elminating data skewness
    df3.join(
    df4,
    df3.col("id") df4.col("id")
    )
    .show(100,false)
    }

    • @jeevanmadhur3732
      @jeevanmadhur3732 4 роки тому +1

      Hi,
      Thanks for highlighting, there is small issue with checked-in join code which I fixed now. Please pull latest code and try out

    • @NishaKumari-op2ek
      @NishaKumari-op2ek 4 роки тому +2

      @@jeevanmadhur3732 Thank you Jeevan. your videos helps us a lot :)

  • @tanushreenagar3116
    @tanushreenagar3116 2 роки тому

    best