Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain distnct(),union(),intersection() and substract() transformation in Spark?



Explain distnct(),union(),intersection() and substract() transformation in Spark?..

Answer / Shalvendra Payal

"distinct()": Removes duplicate records from a DataFrame or Dataset. This function is often used when you need to work with unique values.nn"union()": Combines two or more DataFrames or Datasets into one single DataFrame or Dataset. It returns all the rows of both DataFrames and eliminates any duplicate records based on their order in the original DataFrames.nn"intersection()": Returns a new DataFrame that contains only the common rows between two DataFrames. This function is case-sensitive and performs an equi-join by default, meaning it only returns rows where columns have exact matches.nn"subtract()": Returns a new DataFrame with all the rows from the first input DataFrame, but excludes any rows that are present in both the first and second input DataFrames. The resultant DataFrame will not include duplicate rows, even if they exist in the first DataFrame."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Apache Spark Interview Questions

What is serialization in spark?

1 Answers  


Where is apache spark used?

1 Answers  


What is Starvation scenario in spark streaming?

1 Answers  


What is hadoop spark?

1 Answers  


What is driver and executor in spark?

1 Answers  


What is hadoop technology?

1 Answers  


How can I speed up my spark?

1 Answers  


Define sparkcontext in apache spark?

1 Answers  


Is apache spark part of hadoop?

1 Answers  


How does apache spark work?

1 Answers  


What is difference between spark and hadoop?

1 Answers  


What is difference between dataset and dataframe?

1 Answers  


Categories