Open aroder opened 1 week ago
this seems to work and be compatible with the "time(9)" data type that target-snowflake and I assume others will generate in the target table
LTRIM(RTRIM(CONVERT(CHAR, {}, 108)))
Thanks for raising this issue, I am busy with another assignment and have limited access to Sybase at the moment. I will raise this with a colleague of mine who I collaborate with on these enhancements.
It is worth mentioning that I have been working with a couple of different styles of Sybase and the particular version we were using is rather old. I had a great deal of difficulty finding codes which are suitable for old versions of Sybase.
Summary
The format style code 140 is for datetime data type but is not for time data type
Details The code at https://github.com/s7clarke10/tap-sybase/blob/c71c20c91ab08aa87e86ef927afeea8331cbe6f7/tap_sybase/sync_strategies/common.py#L118-L119 checks for the "time" data type, and attempts to convert it to character using format style code 140.
However, 140 is valid only for datetime, not for time
reference Sybase docs: https://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1604/doc/html/san1278453000116.html
This is reproducible directly in Sybase
Code 108 works just fine though