主动信息发现与采集计划
原能力
按获准范围形成采集计划,记录来源、频率、期限、预算及失败后的处理安排。(合同附件 R7 2.2)
首选项目
dlt(Apache-2.0(开源库))。 dlt
匹配范围
REST增量读取、游标及部分市场数据连接器。
源码
dlt · class Incremental(
dlt/extract/incremental/__init__.py · 99–112 行。 在 GitHub 查看源码 · 许可证与声明
源码片段
class Incremental(
ItemTransform[TDataItem, IncrementalCustomMetrics], BaseConfiguration, Generic[TCursorValue]
):
"""Adds incremental extraction for a resource by storing a cursor value in persistent state.
The cursor could for example be a timestamp for when the record was created and you can use this to load only
new records created since the last run of the pipeline.
To use this the resource function should have an argument either type annotated with `Incremental` or a default `Incremental` instance.
For example:
>>> @dlt.resource(primary_key='id')
>>> def some_data(created_at=dlt.sources.incremental('created_at', '2023-01-01T00:00:00Z'):
>>> yield from request_data(created_after=created_at.last_value)
实现与验收要点
每项授权、频率、截止、预算和失败条件。