PyTd
PyTd copied to clipboard
Add support for timedelta interval types
Currently the DBAPI supports teradata.datatypes.Interval as the underlying python object for teradata INTERVAL types. Python has a native object from the datetime package called datetime.timedelta that can be used.
The teradata.datatypes.Interval class provides a timedelta function to get the interval in it's datetime.timedelta represtation. As not all Intervals can be represented as a timedelta object (e.g. Year/Month), a custom object was created to represent all possible interval types. Does this function provide the functionality you're after?
Thanks, -Eric