quantlab.dataset.sharadar.tables.read_watermark#

quantlab.dataset.sharadar.tables.read_watermark(vendor_root, code)[source]#

Return the day a table’s raw tier is complete through, or None.

The watermark (<table>/_watermark.json, a dated watermark of quantlab.utils.watermark holding table and through) is written by quantlab.acquisition.sharadar.raw_tier.write_table_watermark after a bulk pull (the day of the pull) and after each date-window pull (the window’s last day), once its rows are on disk; an interrupted pull leaves the previous one.

Examples

>>> import tempfile
>>> read_watermark(tempfile.mkdtemp(), "sep") is None
True

With write_table_watermark(root, "sep", date(2024, 1, 11)) done:

read_watermark(root, "sep")
# datetime.date(2024, 1, 11)