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

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.