Skip to content

Support --empty in satellite macro#270

Open
Korijn wants to merge 2 commits intoDatavault-UK:masterfrom
Korijn:support-empty-in-satellite-macro
Open

Support --empty in satellite macro#270
Korijn wants to merge 2 commits intoDatavault-UK:masterfrom
Korijn:support-empty-in-satellite-macro

Conversation

@Korijn
Copy link

@Korijn Korijn commented Feb 3, 2026

This fixes failures when running satellite macro with --empty:

WITH source_data AS (
      SELECT <columns>
      FROM (select * from <table> where false limit 0) _dbt_limit_subq_stg_area_v1 AS a
  ---------------------------------------------------------------------------------^^^
      WHERE <key> IS NOT NULL
  ),

With this PR the SQL becomes valid:

WITH source_data AS (
      SELECT <columns>
      FROM ((select * from <table> where false limit 0) _dbt_limit_subq_stg_area_v1) AS a
      WHERE <key> IS NOT NULL
  ),

@DVAlexHiggs
Copy link
Member

Hello, thanks for this PR.

Can I ask if this only affects Databricks? I see you have only updated the Databricks implementation of the macro.

As for the PR itself, unfortunately, we’re not able to accept PRs directly to this repository at this time, as our active development repo is private.

I will look at re-producing this issue internally and testing it against all of our supported platforms as well.

If I find we can apply this fix, would you be happy for me to apply the change internally and credit you for it?

Thanks!

@Korijn
Copy link
Author

Korijn commented Feb 3, 2026

Hello, thanks for this PR.

Can I ask if this only affects Databricks? I see you have only updated the Databricks implementation of the macro.

I have no idea to be honest, I don't know if other SQL dialects have the same requirements. I also have no means to test other providers.

As for the PR itself, unfortunately, we’re not able to accept PRs directly to this repository at this time, as our active development repo is private.

I will look at re-producing this issue internally and testing it against all of our supported platforms as well.

If I find we can apply this fix, would you be happy for me to apply the change internally and credit you for it?

I get that, no problem, this was just the most efficient way to communicate the change and rationale :)

I would love to see it applied! Credit would be amazing of course. :)

Thanks!

Thank you for the quick response!

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.

2 participants