diff --git a/swh/dataset/luigi.py b/swh/dataset/luigi.py --- a/swh/dataset/luigi.py +++ b/swh/dataset/luigi.py @@ -607,10 +607,15 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - if not self.s3_export_path.replace("-", "").endswith(f"/{self.athena_db_name}"): + if not self.s3_export_path.replace("-", "").endswith( + "/" + self.athena_db_name.split("_", 1)[1] + ): raise ValueError( f"S3 export path ({self.s3_export_path}) does not match " - f"Athena database name ({self.athena_db_name})" + f"Athena database name ({self.athena_db_name})." + f"They should use these formats: " + f"'s3:///YYYY-MM-DD[_]/' " + f"and '_YYYYMMDD[_]" ) def requires(self) -> List[luigi.Task]: