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

collapse partial code in large cell?

jt
New Contributor III

In databricks notebook, we have SQL cells that are over 700 lines long. Is there a way to collapse a portion of the code vs scrolling?

Looking for something similar to what exists in Netezza, "--region" and "--end region" where anything between those commands are collapsible.

3 REPLIES 3

Kaniz
Community Manager
Community Manager

Hi @james t​, Have you had a chance to go through this document? It says all about the notebooks. Please let us know if that helps.

Anonymous
Not applicable

Hi @james t​ 

Hope all is well! Just wanted to check in if you were able to resolve your issue and would you be happy to share the solution or mark an answer as best? Else please let us know if you need more help. 

We'd love to hear from you.

Thanks!

jt
New Contributor III

Sorry @Vidula Khanna​ . I haven't found a working solution yet. Here's a bit more info on what I'm looking for:

current query (If I have 60 columns, it's a long scroll to the bottom. True - I can join lines to shorten the cell, but it makes it hard to see the columns selected)

%sql 
 
SELECT
column1
, column2
, column3
, column4
, column5
, column6
, column7
, column8
, column9
, column10
, column11
FROM
table 

Desired (to avoid scrolling through the select columns to get to the bottom of the code)

%sql 
 
SELECT
<collapsed select columns> 
FROM
table

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.