cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
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.

2 REPLIES 2

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group