Skip to content

Conversation

GinaStavropoulou
Copy link
Member

No description provided.

laz_dir = ahn_laz_dir(context.resources.file_store.file_store.data_dir, 3)
laz_dir.mkdir(exist_ok=True, parents=True)
url_laz = tile_index_ahn[tile_id]["AHN3_LAZ"]
if url_laz is None or url_laz == "None":
Copy link
Member

Choose a reason for hiding this comment

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

It's more reliable if you use urllib to try to parse the url and check that the url is a valid url.

url_laz = tile_index_ahn[tile_id]["AHN3_LAZ"]
if url_laz is None or url_laz == "None":
logger.error(f"Tile {tile_id} does not have a download link for AHN3.")
return Output(
Copy link
Member

Choose a reason for hiding this comment

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

We need to compute the file's hash (see below), because it needs to be added to the metadata table because the reconstruction depends on it.

@balazsdukai
Copy link
Member

balazsdukai commented Aug 11, 2025

This issue is related to #6 , because asset checks should verify is a file (still) exists on disk and it is not corrupted (eg hash matches the one in the metadata table). Having separate asset checks might allow us to decouple this file checking within the asset, so that the asset only deals with file downloads.

I imagine that the asset check would run regularly to verify the files. If it succeeds, no download is needed, if it fails then the file must be downloaded again.
But not sure that this is how dagster works.

@GinaStavropoulou GinaStavropoulou deleted the AHN-handle-empty-links branch August 20, 2025 19:40
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