You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dynamically created rest_api resources from a RestApiConfig having an Incremental configuration exit prematurely when "joining" an external scheduler. This seems to prohibit resources created through the rest_api_resources factory function from being able to use Airflow start/end inference for incremental parameters.
Expected behavior
I would expect that resources created through rest_api_resources would behave similarly to resources defined by the more traditional dlt.resource decorator with respect to allow_external_schedulers.
The warning that I see in the logs is always:
2024-12-21 19:41:12,788|[WARNING]|188923|134449741906688|dlt|__init__.py|_join_external_scheduler:414|Specified Incremental last value type dlt.extract.incremental.Incremental[typing.Any] is not supported. Please use DateTime, Date, float, int or str to join external schedulers.(issubclass() arg 1 must be a class)
Steps to reproduce
Here is an example test-case hitting an endpoint on the Gemini Rest API:
When I step through the pipeline run, I'll get to dlt.common.typing.get_generic_type_argument_from_instance which seems to handle cases where the instance.__orig_class__ is an Incremental generic, but not an Optional[Incremental[T]], which is the actual type at this point.
Operating system
Linux
Runtime environment
Astronomer
Python version
3.11
dlt data source
Rest API
dlt destination
No response
Other deployment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
dlt version
1.5.0
Describe the problem
Dynamically created rest_api resources from a
RestApiConfig
having an Incremental configuration exit prematurely when "joining" an external scheduler. This seems to prohibit resources created through therest_api_resources
factory function from being able to use Airflow start/end inference for incremental parameters.Expected behavior
I would expect that resources created through
rest_api_resources
would behave similarly to resources defined by the more traditionaldlt.resource
decorator with respect toallow_external_schedulers
.The warning that I see in the logs is always:
Steps to reproduce
Here is an example test-case hitting an endpoint on the Gemini Rest API:
When I step through the pipeline run, I'll get to
dlt.common.typing.get_generic_type_argument_from_instance
which seems to handle cases where theinstance.__orig_class__
is an Incremental generic, but not an Optional[Incremental[T]], which is the actual type at this point.Operating system
Linux
Runtime environment
Astronomer
Python version
3.11
dlt data source
Rest API
dlt destination
No response
Other deployment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: