Top "Apache-spark-sql" questions

Apache Spark SQL is a tool for "SQL and structured data processing" on Spark, a fast and general-purpose cluster computing system.

Spark Window Functions - rangeBetween dates

I am having a Spark SQL DataFrame with data and what I'm trying to get is all the rows preceding …

sql apache-spark pyspark apache-spark-sql window-functions
Remove Temporary Tables from Apache SQL Spark

I have registertemptable in Apache Spark using Zeppelin below: val hvacText = sc.textFile("...") case class Hvac(date: String, time: String, …

scala apache-spark apache-spark-sql apache-zeppelin
DataFrame equality in Apache Spark

Assume df1 and df2 are two DataFrames in Apache Spark, computed using two different mechanisms, e.g., Spark SQL vs. …

scala apache-spark dataframe apache-spark-sql rdd
Spark SQL replacement for MySQL's GROUP_CONCAT aggregate function

I have a table of two string type columns (username, friend) and for each username, I want to collect all …

apache-spark aggregate-functions apache-spark-sql
Aggregating multiple columns with custom function in Spark

I was wondering if there is some way to specify a custom aggregation function for spark dataframes over multiple columns. …

scala apache-spark dataframe apache-spark-sql orc
How to define and use a User-Defined Aggregate Function in Spark SQL?

I know how to write a UDF in Spark SQL: def belowThreshold(power: Int): Boolean = { return power < -40 } sqlContext.…

scala apache-spark apache-spark-sql aggregate-functions user-defined-functions
Encoder error while trying to map dataframe row to updated row

When I m trying to do the same thing in my code as mentioned below dataframe.map(row => { val …

scala apache-spark apache-spark-sql apache-spark-dataset apache-spark-encoders
Does SparkSQL support subquery?

I am running this query in Spark shell but it gives me error, sqlContext.sql( "select sal from samplecsv where …

sql apache-spark subquery apache-spark-sql
Difference between DataSet API and DataFrame API

I'm just wondering what is the difference between an RDD and DataFrame (Spark 2.0.0 DataFrame is a mere type alias for …

apache-spark apache-spark-sql rdd apache-spark-dataset
How do I convert a WrappedArray column in spark dataframe to Strings?

I am trying to convert a column which contains Array[String] to String, but I consistently get this error org.…

scala apache-spark dataframe apache-spark-sql user-defined-functions