Skip to content

Commit

Permalink
snapshot only from archive
Browse files Browse the repository at this point in the history
  • Loading branch information
rymarczy committed Oct 1, 2024
1 parent d1c4015 commit 7030d49
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cubic_loader/qlik/ods_qlik.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,12 @@ def status_schema_to_df(status: TableStatus) -> pl.DataFrame:


def get_snapshot_dfms(table: str) -> List[DFMDetails]:
"""find all available snapshot dfm files for a qlik table from Archive and Error buckets"""
"""find all available snapshot dfm files for a qlik table from Archive bucket"""
prefix = os.path.join(QLIK, f"{table}/")
archive_dfms = s3_list_objects(S3_ARCHIVE, prefix, in_filter=".dfm")
error_dfms = s3_list_objects(S3_ERROR, prefix, in_filter=".dfm")

found_snapshots = []
for dfm in archive_dfms + error_dfms:
for dfm in archive_dfms:
found_snapshots.append(DFMDetails(path=dfm, ts=re_get_first(dfm, RE_SNAPSHOT_TS)))

assert len(found_snapshots) > 0
Expand Down

0 comments on commit 7030d49

Please sign in to comment.