Hi @arkiboys ,
Thankyou for using Microsoft Q&A platform and posting your query.
As I understand your ask, you want to perform SQL queries on Dataframe in Databricks. Please let me know if my understanding is incorrect.
All sql queries which we want to perform on dataframes can be done from functions available inside
pyspark.sql library. For example, as you mentioned for performing WHERE clause of SQL we can make use of filter() function on dataframe
If you are looking for explicitly writing only SQL queries on dataframe then I will suggest to create a temp view from Dataframe and then write sql on it directly. Please check below screenshot :
Hope this will help. Please let us know if any further queries.
------------------------------
- Please don't forget to click on
or upvote
button whenever the information provided helps you.
Original posters help the community find answers faster by identifying the correct answer. Here is how - Want a reminder to come back and check responses? Here is how to subscribe to a notification
- If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators