cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
cancel
Showing results for 
Search instead for 
Did you mean: 

Understanding Spark Architecture during Table Creation

Ramakrishnan83
New Contributor III

Team ,

I am trying understand how the parquet files and JSON under the delta log folder stores the data behind the scenes

Table Creation:

from delta.tables import *
DeltaTable.create(spark) \
.tableName("employee") \
.addColumn("id", "INT") \
.addColumn("name", "STRING") \
.addColumn("dept", "STRING")\
.addColumn("salary", "INT") \
.location("/FileStore/tables/delta/demo2") \
.execute()
Step 2: 
%sql
INSERT INTO employee values(100,"Ram","CSE",1000)
Step 3:
%sql
select * from delta.`/FileStore/tables/delta/demo2`
Ramakrishnan83_0-1710772217666.png

Note: I made 2 inserts , so 2 parquet files

Challenge:

I am trying to read the JSON, CRC and Parquet files to see the contents in it . But I am getting the errors

Ramakrishnan83_1-1710772318911.png

 Output of this command give me the structure of a JSON , not the actual data stored

Ramakrishnan83_2-1710772374126.png

Parquet file reading throws this error . 

Note: My cluster is running with DBR 12.2 LTS

1 ACCEPTED SOLUTION

Accepted Solutions

shan_chandra
Databricks Employee
Databricks Employee
1 REPLY 1

shan_chandra
Databricks Employee
Databricks Employee

@Ramakrishnan83  - Kindly go through the blog post - https://www.databricks.com/blog/2019/08/21/diving-into-delta-lake-unpacking-the-transaction-log.html which discuss in detail on delta's transaction log.

Connect with Databricks Users in Your Area

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