Read CSV in Databricks in Spark

by | Apr 26, 2018 | Apache Spark, Big Data, Python-example | 0 comments

Load CSV in Databricks

Databricks Community Edition provides a graphical interface for file loading.

This interface is accessed in the DataBase > Create New Table.

Once inside, the fields must be indicated:

Upload to DBF: name of the file to Load.
Select a cluster to preview the Table: the cluster on which to perform the Operations.

Upload CVS data to Databricks

Upload CVS data to Databricks 2

Read files

Access to the uploaded file can be done through a Spark SQL query

mis_datos = spark.sql("SELECT * FROM datos_csv")
display(mis_datos.select("*"))

Result of a spark SQL query

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *