cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

IllegalArgumentException: requirement failed: Invalid uri

TonyLe
New Contributor

Hi all, 

I'm trying to connect to MongoDB using the Databricks notebook. I keep getting the error that my MongoDB uri is invalid. The uri works when connecting from my local machine using the Rust driver. I pretty much followed the tutorial that was given for MongoDB and Databricks.

Here are the things I've done/tried: 
- Made sure my scala and spark version matches up on the cluster with the Mongo-spark library. 
- Made sure to whitelist the ip of the cluster nodes.

Thank you

2 REPLIES 2

Ajay-Pandey
Esteemed Contributor III

Hi @TonyLe ,

Make sure mongoDB library should be installed and please refer below blog for your reference - 

MongoDB | Databricks on AWS

Ajay Kumar Pandey

-werners-
Esteemed Contributor III

Also take in mind firewall issues in case the mongodb is on-prem or on some other location.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group