Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer and Intelligence Suite.

MongoDB Input w/ Atlas

jmarsh1590
7 - Meteor

We have migrated our Alteryx Server's embedded MongoDB to a MongoDB Atlas cluster. We need to point existing workflows that reference the server's MongoDB to the Atlas cluster. I'm having some difficulty connecting to the cluster from Designer, however.

 

Has anyone had success connecting to Atlas with the MongoDB Input tool? How did you format the connection parameters? Using version 2020.1.

 

Thanks!

6 REPLIES 6
DY1
7 - Meteor

Hi @jmarsh1590 

 

did you find a way to make this work.  I am in a similar situation and wondering if this is possible as i have seen a post stating that MongoDB Input does not support MongoDB Atlas but this was from a while ago with no recent updates.

 

thanks

DY

jmarsh1590
7 - Meteor

Hey @DY1 - I had to use python to get connected to Atlas. I’m not sure if there is a plan to update the MongoDB input tool to allow for Atlas connections. The python script I used was provided by Alteryx support in a macro called “Atlas_Connector.yxmc”

 

 

DY1
7 - Meteor

Thanks @jmarsh1590 , I'll log a ticket with them and see if they can share it.

DY1
7 - Meteor

Hi @jmarsh1590 I checked with Alteryx Support and they dont have a record of the macro you refer to.  Would you be happy to share it?

 

thanks

jmarsh1590
7 - Meteor

drop the below into a python tool. You can parameterize it as needed.

 


from ayx import Alteryx
from io import StringIO

 


#################################

#Alteryx.installPackages(package='pymongo')
#Alteryx.installPackages(package='dnspython')


#################################
from pymongo import MongoClient

 

#################################
client = MongoClient('mongodb+srv://User:Password@DatabaseHost/DatabaseName?retryWrites=true&w=majority')
db = client['DatabaseName']


#################################
import pandas as pd
test = pd.DataFrame(list(db.CollectionName.find()))


#################################
Alteryx.write(test,1)

TheCoffeeDude
9 - Comet

We shouldn't have to drop into Python to make this work. MongoDB Atlas has been around for a very long time and it's annoying that Alteryx Designer can't connect to it. I've seen other connectors get integrated faster (Databricks).

Labels