โ05-02-2022 06:37 AM
In 2017 while working on my Masters degree, I created some tables that I would like to access again. Back then I could just write SQL and find them but today that doesn't work. I suspect it has something to do with Delta Lake.
What do I have to do to gain access to these tables?
โ05-02-2022 12:24 PM
You don't need to install anything. You can just, for example, from R using SQL register that table as in the above example. You can read as dataframe in R also out of the box. Many examples here:
https://docs.databricks.com/spark/latest/sparkr/overview.html
โ05-02-2022 07:40 AM
Hi, it is parquet files. Just load that data as DataFrame:
df = spark.read.parquet("dbfs:/hive/warehouse/congresskmean/")
Eventually, you can register that files as a table but you will need to specify the schema:
CREATE TABLE table_name
(schema)
USING PARQUET
LOCATION '/hive/warehouse/congresskmean/';
โ05-02-2022 10:59 AM
Sorry, I forgot to mention that I am doing this in R and this Python function returns a pyspark.sql.dataframe.DataFrame type which I can't access in R. But with the information you provided I found some code that was supposed to work for R but the install.packages fails.
install.packages("arrow")
library(arrow)
read_parquet("myfile.parquet")
install.packages("arrow", repos = "https://arrow-r-nightly.s3.amazonaws.com")
Developer version fails to install also.
โ05-02-2022 12:24 PM
You don't need to install anything. You can just, for example, from R using SQL register that table as in the above example. You can read as dataframe in R also out of the box. Many examples here:
https://docs.databricks.com/spark/latest/sparkr/overview.html
โ05-07-2022 07:01 AM
That did it. Thanks
โ05-07-2022 09:40 AM
Great that it helped. If you can you can select my answer as the best one ๐
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group