Spark DataFrame from SQL

Defines a Spark DataFrame from a SQL query, useful to create Spark DataFrames without collecting the results immediately.

sdf_sql(sc, sql)

Arguments

sc

A spark_connection.

sql

a 'SQL' query used to generate a Spark DataFrame.