cancel
Showing results for 
Search instead for 
Did you mean: 
Community 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: 

df.queryExecution.redactedSql is not working with Spark sql Listener

Soma
Valued Contributor

We are trying to capture the query executed by spark .

We are trying to use 

df.queryExecution.redactedSql to get the SQL from query execution but it is not working 
in sqlListener
1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @Soma, In PySpark, when you execute a query and want to capture the SQL from the query execution, you can use the explain() method.