From 36cc957e558eeca72319c4745cf58747a442a00e Mon Sep 17 00:00:00 2001 From: Willi Date: Fri, 23 Aug 2024 19:14:13 +0530 Subject: [PATCH] loads latest 30 days of issues instead of fixed date --- dlt/sources/rest_api_pipeline.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlt/sources/rest_api_pipeline.py b/dlt/sources/rest_api_pipeline.py index 957fb3b5c6..cf51287793 100644 --- a/dlt/sources/rest_api_pipeline.py +++ b/dlt/sources/rest_api_pipeline.py @@ -1,11 +1,12 @@ from typing import Any import dlt +from dlt.common.pendulum import pendulum from dlt.sources.rest_api import ( RESTAPIConfig, check_connection, - rest_api_source, rest_api_resources, + rest_api_source, ) @@ -58,7 +59,7 @@ def github_source(github_token: str = dlt.secrets.value) -> Any: "since": { "type": "incremental", "cursor_path": "updated_at", - "initial_value": "2024-01-25T11:21:28Z", + "initial_value": pendulum.today().subtract(days=30).to_iso8601_string(), }, }, },