cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

enabling the cell in Databricks.

KVNARK
Honored Contributor II

Suppose if the query is long one and its commented due to some issues later I wanted to run that cell, is there any shortcut to enable the entire cell. The cell is with 800 lines of code and each line is commented with # symbol and I want to enable it. Please let me know if any shortcut or its just replacing the entire cell without # symbol.

1 ACCEPTED SOLUTION

Accepted Solutions

pvignesh92
Honored Contributor

@KVNARK .​ Hi,

If I understand correctly, you want to either comment or disable comment on your entire cell using a Shortcut.

If that's the case,

  1. To do for the whole cell -> Do a Ctrl + A, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.
  2. To do for selected lines in the cell -> Select those lines, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.

Please let me know if this helps.

View solution in original post

2 REPLIES 2

pvignesh92
Honored Contributor

@KVNARK .​ Hi,

If I understand correctly, you want to either comment or disable comment on your entire cell using a Shortcut.

If that's the case,

  1. To do for the whole cell -> Do a Ctrl + A, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.
  2. To do for selected lines in the cell -> Select those lines, then you can use Ctrl + / in Windows. It will add # to all your lines if not commented and remove the # if commented.

Please let me know if this helps.

KVNARK
Honored Contributor II

@Vigneshraja Palaniraj​ Thank you so much for the reply Vignesh. Finally I got it while doing some R&D. its the same. Thanks!

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.