You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Andrei Neagoe (Jira)" <ji...@apache.org> on 2021/03/08 09:16:00 UTC

[jira] [Commented] (AIRFLOW-5164) MongoHook fails to parse MongoDB replica set URIs

    [ https://issues.apache.org/jira/browse/AIRFLOW-5164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17297198#comment-17297198 ] 

Andrei Neagoe commented on AIRFLOW-5164:
----------------------------------------

Also hitting this. This seems to have been neglected for quite some time... is there any way to use a mongodb replica set in Airflow? 

> MongoHook fails to parse MongoDB replica set URIs
> -------------------------------------------------
>
>                 Key: AIRFLOW-5164
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-5164
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: hooks
>    Affects Versions: 1.10.4
>            Reporter: Ayla Khan
>            Priority: Minor
>         Attachments: airflow_mongo_test.ipynb
>
>
> MongoHook fails to parse MongoDB's [replica set connection string URIs|https://docs.mongodb.com/manual/reference/connection-string/]. For example, trying to create a MongoHook with the example from MongoDB's replica set documentation ({{mongodb://mongodb0.example.com:27017,mongodb1.example.com:27017,mongodb2.example.com:27017/admin?replicaSet=myRepl}}) raises the following error:
> {{ValueError: invalid literal for int() with base 10: '27017,mongodb1.example.com:27017,mongodb2.example.com:27017'}}
>  
> A notebook is attached with the code that raises the error.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)