Skip to content

Commit

Permalink
Add applyOps in the projection query
Browse files Browse the repository at this point in the history
  • Loading branch information
prijendev authored and sgandhi1311 committed Jan 21, 2025
1 parent 3d7a984 commit 8966572
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tap_mongodb/sync_strategies/oplog.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def transform_projection(projection):
# If only '_id' is whitelisted, return base projection with 'o._id' whitelisted
new_projection = base_projection
new_projection['o._id'] = 1
new_projection['o.applyOps'] = 1
return new_projection

# If whitelist is provided, return base projection along
Expand All @@ -90,6 +91,7 @@ def transform_projection(projection):
for field, value in temp_projection.items():
new_projection['o.' + field] = value
new_projection['o._id'] = 1
new_projection['o.applyOps'] = 1
return new_projection

# If blacklist is provided, return blacklisted fields with _id whitelisted
Expand Down

0 comments on commit 8966572

Please sign in to comment.