Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : for a added feature in weather-mv to extract specific date's data from zarr files. #400

Merged
merged 5 commits into from
Oct 5, 2023

Conversation

dabhicusp
Copy link
Collaborator

As mentioned in PR #396 I have added a feature in weather-mv which can allows users to access data for a specific date from zarr files but that is not working properly.

BQ ingestion of zarr data is done through the expand function and in this function we can't get value of start_date and end_date from xarray_open_dataset_kwargs dict. So I added this code, using of we get the value of start_date & end_date from the zarr_kwargs.

@dabhicusp dabhicusp requested a review from alxmrs October 3, 2023 11:46
@@ -311,6 +315,10 @@ def expand(self, paths):
xarray_open_dataset_kwargs = self.xarray_open_dataset_kwargs.copy()
xarray_open_dataset_kwargs.pop('chunks')
ds, chunks = xbeam.open_zarr(self.first_uri, **xarray_open_dataset_kwargs)

if self.start_date is not None and self.end_date is not None:
Copy link
Collaborator

@alxmrs alxmrs Oct 3, 2023

Choose a reason for hiding this comment

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

Would this be useful for non-Zarr datasets? I'm on the fence.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The PR: #396 is useful for the non-zarr datasets and this PR will be working on zarr datasets.

Copy link
Collaborator

Choose a reason for hiding this comment

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

SGTM.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alxmrs I found that for non-zarr datasets it isn't working so I added a issue & PR. I tested for zarr & non-zarr dataset and it's working with this new PR's code.

Copy link
Collaborator

@alxmrs alxmrs left a comment

Choose a reason for hiding this comment

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

After the last nit is fixed, this is good to go.

@mahrsee1997 mahrsee1997 merged commit 765a40c into main Oct 5, 2023
7 checks passed
@mahrsee1997 mahrsee1997 deleted the zarr_ingestion branch October 5, 2023 06:21
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.

3 participants