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.

3 REPLIES 3

Kaniz_Fatma
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

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!