Skip to content

Commit

Permalink
fix: Use .mappings() in cursor, to get rows as mappings (#309)
Browse files Browse the repository at this point in the history
~This was fixed upstream in meltano/sdk#1487,
but this tap overrides `get_records`.~

I think meltano/sdk#2094 is the only difference
between the two implementations?

UPDATE: Using the private `._mapping` attribute makes me nervous so I
opened meltano/sdk#2095 and updated this PR.
  • Loading branch information
edgarrmondragon authored Dec 12, 2023
1 parent 68b6644 commit eebcf85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tap_postgres/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def get_records(self, context: Optional[dict]) -> Iterable[Dict[str, Any]]:
query = query.filter(replication_key_col >= start_val)

with self.connector._connect() as con:
for row in con.execute(query):
for row in con.execute(query).mappings():
yield dict(row)


Expand Down

0 comments on commit eebcf85

Please sign in to comment.