quantlab.dataset.massive.raw.read_rest_watermark#
- quantlab.dataset.massive.raw.read_rest_watermark(vendor_root, endpoint)[source]#
Return the day a REST endpoint’s rows are pulled through, or
None.Every row whose date field is on or before the watermark was pulled; a later pull asks only for rows after it (less the endpoint’s overlap). A snapshot endpoint’s watermark is the day of its last snapshot. The watermark (
rest_watermark_file, a dated watermark ofquantlab.utils.watermarkholdingendpoint,fieldandthrough) is written byquantlab.acquisition.massive.raw_tier.write_rest_watermark.Examples
>>> import tempfile >>> from quantlab.acquisition.massive.raw_tier import write_rest_watermark >>> root = tempfile.mkdtemp() >>> read_rest_watermark(root, "splits") is None True >>> write_rest_watermark(root, "splits", "execution_date", date(2024, 3, 14)) >>> read_rest_watermark(root, "splits") datetime.date(2024, 3, 14)