val df = sqlContext.read.format("com.databricks.spark.csv")
.option("delimiter", "|")
.option("header", "true")
.option("inferSchema", "true")
.load("s3://*****.CSV")
df.registerTempTable("temp-table")
sqlContext.sql("""
create table database.table as
select * from temp-table
""")
No comments:
Post a Comment