You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/11/11 16:34:11 UTC

[GitHub] [beam] networkandcode opened a new issue, #24122: Write to dynamic collection in MongoDB, with the Apache Beam SDK in Python[Feature Request]:

networkandcode opened a new issue, #24122:
URL: https://github.com/apache/beam/issues/24122

   ### What would you like to happen?
   
   I have a query with the coll parameter in apache_beam.io.WriteToMongoDB
   
   ```
   Pcoll
   | "Write to Mongo" >> apache_beam.io.WriteToMongoDB(
           uri='someUri',
           db='someDb',
           coll='someColl',
           batch_size=10
    )
   ```
   
   I would like to like to set the collection name dynamically based on the record, instead of hard coding it. For ex. if the record is dict. and if it has something like record.tag = 'example', I would like to retreive that and set as coll.
   
   I got some similar references for BigQuery and tried coll = lambda record: record.tag, which doesn't work. It threw an error saying it needs a string.
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: io-py-mongodb


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] kennknowles commented on issue #24122: Write to dynamic collection in MongoDB, with the Apache Beam SDK in Python[Feature Request]:

Posted by GitBox <gi...@apache.org>.
kennknowles commented on issue #24122:
URL: https://github.com/apache/beam/issues/24122#issuecomment-1314298030

   This feature request makes sense to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org