October 24, 2024
Chicago 12, Melborne City, USA
SQL

Difference between the count in a dataframe and tempview that created from that dataframe


Step 1
I have one dataframe created from a delta table.
Df= spark.read.format(delta).load(path)

Step2
I am creating a temp view from that dataframe
Df.createorreplacetempbiew(dfview)

Now when I am performing count for this to object it’s showing different count

Select count(*) from dfview—value1

%sql
Select count(*) from Df—value 2

Can anyone please help me why I am getting difference in value 1 and Value



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video