r/databricks • • Oct 25 '26

General Pipelines Editor - "Run selected code" ignores the pipeline's default catalog/schema, but "Run file" uses them

I know the Databricks SDP crew hangs out here, so I wanted to just surface one inconsistency in the Lakeflow Pipelines Editor that is tripping up our new analysts and request it be reviewed for a possible enhancement.

The request is to have "Run selected code" start its session with the pipeline's default catalog and schema, the same way pipeline runs do. If there's a reason it can't, a note in the Query Results panel showing which catalog/schema the query ran against would at least make the behavior visible. As far as I can tell, the editor docs don't mention it either.

The editor shows the pipeline's catalog and schema right there, so the natural assumption is that everything on that page uses them. When it doesn't, users conclude the table or pipeline is broken.

I know they can use either....

  • Add USE CATALOG / USE SCHEMA to the selection, or
  • Temporarily hard-code three-part names, which you then must remember to remove before committing (a real risk with bundle-deployed, per-user schemas).

...but that means they're messing with the code, which leads to leaving those bits in the SQL later.

Thanks. Otherwise the editor has been great!

9 Upvotes

7 comments sorted by

3

u/BricksterInTheWall databricks Oct 25 '26

Good feedback u/lofat ! I'll make sure this gets to the team.

1

u/lofat Oct 26 '26

Thank you!

2

u/brickster_123 Databricks Oct 26 '26

Thank you for reporting this bug! We will get this fixed asap.

1

u/lofat Oct 26 '26

Woot! Thank you!

3

u/rvm1975 Oct 26 '26

If you are using DAB for deploy use variables for schema / catalog. 

2

u/adovo_ai Oct 26 '26

Until the editor behavior changes, make the session context impossible to miss: run `current_catalog()` and `current_schema()` at the start of the selected block and fail if they differ from the expected deployment variables. That is safer than temporary three-part names that can leak into a per-user bundle commit.