Skip to content Skip to sidebar Skip to footer
Showing posts with the label Apache Spark Sql

Spark: How To Transpose And Explode Columns With Nested Arrays

I applied an algorithm from the question below(in NOTE) to transpose and explode nested spark dataf… Read more Spark: How To Transpose And Explode Columns With Nested Arrays

Compare Two Dataframes Pyspark

I'm trying to compare two data frames with have same number of columns i.e. 4 columns with id a… Read more Compare Two Dataframes Pyspark

Add Column To Pyspark Dataframe Based On A Condition

My data.csv file has three columns like given below. I have converted this file to python spark dat… Read more Add Column To Pyspark Dataframe Based On A Condition

How To Get 1000 Records From Dataframe And Write Into A File Using Pyspark?

I am having 100,000+ of records in dataframe. I want to create a file dynamically and push 1000 rec… Read more How To Get 1000 Records From Dataframe And Write Into A File Using Pyspark?

Pyspark: How To Flatten Nested Arrays By Merging Values In Spark

I have 10000 jsons with different ids each has 10000 names. How to flatten nested arrays by mergin… Read more Pyspark: How To Flatten Nested Arrays By Merging Values In Spark

Ambiguous Behavior While Adding New Column To Structtype

I defined a function in PySpark which is- def add_ids(X): schema_new = X.schema.add('id_col… Read more Ambiguous Behavior While Adding New Column To Structtype