Skip to content

fix(core): require a project on Lakehouse targets - #2460

Open
SergikL wants to merge 2 commits into
mainfrom
lakehouse-require-project
Open

SergikL wants to merge 2 commits into
mainfrom
lakehouse-require-project

Conversation

@SergikL

@SergikL SergikL commented Nov 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #2459.

A 4-part Lakehouse target (project.catalog.namespace.table) requires a Google Cloud project ID. When neither defaultProject in workflow_settings.yaml (or compilation overrides) nor project / database on the action is set, target.database is empty and SQL resolution produces a 3-part `catalog.namespace.table` identifier that BigQuery misinterprets as project.dataset.table.

Emit a compile-time error in validateLakehouseTarget() across Lakehouse table, incremental, operations, and declaration actions when target.database is unset.

@SergikL
SergikL requested a review from a team as a code owner November 18, 2026 12:32
@SergikL
SergikL requested review from Ford544 and rafal-hawrylak and removed request for a team November 18, 2026 12:32
Comment thread core/actions/table_lakehouse_test.ts Outdated
const result = runMainInVm(coreExecutionRequestFromPath(projectDir));
const expectedMessage =
"When defining a Lakehouse target, 'defaultProject' must be defined in workflow_settings.yaml or 'project' in the action config.";
const errorsByFile = new Map(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test puts the errors in a map keyed by file, so a duplicate or an unexpected extra error would still pass. Can we assert the whole list of file and message pairs instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4bef924 — replaced the Map with a deep.equals assertion on the full sorted list of { fileName, message } pairs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: fail compilation when a Lakehouse target has no project

2 participants