kedro IncrementalDataset 简单说明

IncrementalDataset 实现了一种增量数据处理的能力,基于了PartitionedDataset 同时包含了checkpoint 确保数据处理的准确性,对于
checkpoint 可以配置自己的函数

参考定义

  • 参考catalog 定义
my_partitioned_dataset:
  type: partitions.IncrementalDataset
  path: s3://my-bucket-name/path/to/folder
  dataset: pandas.CSVDataset
  checkpoint:
    # update the filepath and load_args, but keep the dataset type unchanged
    filepath: gcs://other-bucket/CHECKPOINT
    load_args:
      k1: v1
  • 自定义函数的catalog 配置
my_partitioned_dataset:
  type: partitions.IncrementalDataset
  path: s3://my-bucket-name/path/to/folder
  dataset: pandas.CSVDataset
  checkpoint:
    comparison_func: my_module.path.to.custom_comparison_function  # the path must be importable
  • 指定checkpoint 具体文件
my_partitioned_dataset:
  type: partitions.IncrementalDataset
  path: s3://my-bucket-name/path/to/folder
  dataset: pandas.CSVDataset
  checkpoint:
    force_checkpoint: 2020-01-01/data.csv

说明

增量能力还是很重要的,尤其是在数据量比较大的场景,使用好IncrementalDataset 可以提升数据处理速度

参考资料

https://docs.kedro.org/en/stable/data/partitioned_and_incremental_datasets.html

posted on   荣锋亮  阅读(5)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-10-01 modin pandas 大规模数据处理方案
2023-10-01 aws awswrangler 集成minio 简单试用
2023-10-01 pandas 加载minio 文件数据
2022-10-01 graylog 索引模型
2022-10-01 pg_eventserv push pg 变动事件到websocket 服务
2022-10-01 graylog 的journal message 实现简单说明
2022-10-01 graylog 的journal message 存储简单说明

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示