Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 20, 2021 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/7ea81de6fb1d1258c21a86f89a84710c to your computer and use it in GitHub Desktop.
Save 1ambda/7ea81de6fb1d1258c21a86f89a84710c to your computer and use it in GitHub Desktop.
import org.apache.spark.sql.functions._
import org.apache.spark.sql.types._
// 만약 Databricks 노트북을 사용한다면 경로를
// `/FileStore/tables/marketing_campaign.csv"` 로 변경할 수 있습니다.
val df = spark.read
.format("csv")
.option("format", "csv")
.option("sep", "\t")
.option("inferSchema", "true")
.option("header", "true")
.load("marketing_campaign.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment