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
The portion of SQLStream.get_records that adds a where clause to the query for the given replication-key fails with the following:
TypeError: object of type 'Column' has no len()
The TypeError is happening because replication_key_col which is of type SQLAlchemy Columns is being used in sqlalchemy.text().bindparams() . Columns doesn't have a default way to convert to a string so we get the has no len() type error.
There are three ways this issue can be resolved.
use replication_key_col.name instead
use self.replication_key instead
switch to .where(replication_key_col >= start_val)
My vote would be for option 3. It is what I used to close the below issue.
Singer SDK Version
0.24.0
Is this a regression?
Python Version
3.9
Bug scope
Taps (catalog, state, etc.)
Operating System
Windows
Description
The portion of
SQLStream.get_records
that adds a where clause to the query for the givenreplication-key
fails with the following:The TypeError is happening because
replication_key_col
which is of type SQLAlchemyColumns
is being used insqlalchemy.text().bindparams()
.Columns
doesn't have a default way to convert to a string so we get thehas no len()
type error.There are three ways this issue can be resolved.
replication_key_col.name
insteadself.replication_key
instead.where(replication_key_col >= start_val)
My vote would be for option 3. It is what I used to close the below issue.
BuzzCutNorman/tap-mssql#24
Code
The text was updated successfully, but these errors were encountered: