Skip to content

Recover partitions for Spark - #136

Open
jarno-r wants to merge 3 commits into
dbt-labs:mainfrom
hurtigruten:recover_partitions
Open

Recover partitions for Spark#136
jarno-r wants to merge 3 commits into
dbt-labs:mainfrom
hurtigruten:recover_partitions

Conversation

@jarno-r

@jarno-r jarno-r commented Mar 1, 2022

Copy link
Copy Markdown

Description & motivation

resolves: #126
Fix for issue Running RECOVER PARTITIONS without defining partitions #126

Add 'recover_partitions' option for Spark to run ALTER TABLE RECOVER PARTITIONS even if partitions are not explicitly specified. This makes using inferred partitions possible.

Checklist

  • I have verified that these changes work locally
  • I have updated the README.md (if applicable)
  • I have added an integration test for my fix/feature (if applicable)

@jarno-r
jarno-r requested a review from jtcohen6 as a code owner March 1, 2022 06:50
@jarno-r
jarno-r force-pushed the recover_partitions branch from 41a84ea to fe7a599 Compare March 1, 2022 07:07
Add 'recover_partitions' option for Spark to run ALTER TABLE RECOVER PARTITIONS even if partitions are not explicitly specified. This makes using inferred partitions possible.
@jarno-r
jarno-r force-pushed the recover_partitions branch from fe7a599 to fbc766f Compare March 1, 2022 07:09
@jarno-r

jarno-r commented Mar 1, 2022

Copy link
Copy Markdown
Author

I'm not sure the integration test is meaningful, since the test seed does not contain the partition column. That also applies to the previous people_csv_partitioned_using test. If 'section' was added to the people.csv, the two tests could be updated to include the partitioning.

@jtcohen6

jtcohen6 commented Mar 2, 2022

Copy link
Copy Markdown
Collaborator

Thanks @jarno-r!

If 'section' was added to the people.csv, the two tests could be updated to include the partitioning.

Could you say slightly more about that? Would section need to be included in the contents of the CSVs themselves? It's already included in the file paths, using Hive-style formatting: https://dbt-external-tables-testing.s3.us-east-2.amazonaws.com/

@jarno-r

jarno-r commented Mar 4, 2022

Copy link
Copy Markdown
Author

If people.csv also had 'section' column, the two tests could be changed to include 'section' in 'compare_columns' . Then both tests would show that the partitions are read correctly.

@jarno-r

jarno-r commented Aug 1, 2022

Copy link
Copy Markdown
Author

@jtcohen6 Could this be merged?
Adding the section to people.csv would somewhat improve the test coverage, but it is not necessary.

@jarno-r
jarno-r requested a review from jeremyyeo as a code owner April 13, 2023 08:58
@github-actions

Copy link
Copy Markdown

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Oct 11, 2023
@jarno-r

jarno-r commented Oct 11, 2023

Copy link
Copy Markdown
Author

This is still relevant. FYI, the integration-snowflake test is failing for reasons that have nothing to do with this PR. I would probably succeed if retriggered.

@github-actions github-actions Bot removed the Stale label Oct 12, 2023
@jarno-r

jarno-r commented Jan 2, 2024

Copy link
Copy Markdown
Author

@jeremyyeo Could this be merged?

@github-actions

github-actions Bot commented Oct 9, 2024

Copy link
Copy Markdown

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Oct 9, 2024
@jarno-r

jarno-r commented Oct 9, 2024

Copy link
Copy Markdown
Author

This is still relevant.

@github-actions github-actions Bot removed the Stale label Oct 11, 2024
@github-actions

github-actions Bot commented Apr 9, 2025

Copy link
Copy Markdown

This PR has been marked as Stale because it has been open with no activity as of late. If you would like the PR to remain open, please comment on the PR or else it will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running RECOVER PARTITIONS without defining partitions

3 participants