Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Spark Best Practices

Use Spark dataframe APIs instead of


Spark SQL

sqlContext.table(“table_schema.table_name”).filte
r(col(“prod_cd ”)in (‘’,’’))

spark.sql(“select * from
table_schema.table_name where
prod_cd in (‘’,’’,’’)”)

You might also like