Are you able to connect to your cluster with your uri connect string?
Have you removed “<>” in password?
No need of enclosing Seed.csv in quotes unless you are giving full path
Yea I can connect to the cluster using the uri connect string. And yea I have my password in there, just didn’t want to put that up… I am on mac but it still wont work without quotes
Hey Doug thanks for chirping in! It does have special characters, but I have been able to connect to the db several times using the same password in projects. mongoimport is the first time it has given me an issue. I’ll check out how to URL encode those characters and give it ago.
OMG that worked! Wow thanks so much. Would have never thought to do that. Any guesses why you have to do that for mongoimport and not other times you connect to database?
It depends on the tool and if it works some magic behind the scenes for you in this regard. I think that all tools would be able to use the URL encoded values without issue.
some characters are used by the shell unless quoted. few of them are very important as they cause a start of a multi-line command mode, single quote ' , double quote ", backtick ` and backslash \. your new line description fits in this type of control character.
however, in most situations, simply surrounding the whole URI with double quotes (as it should not have double quote in it anyways) should solve the problem without extra encoding.
After I had a chance to think about this (was busy during my initial response), the problem is not with mongoimport but with the special character.
Since you were getting en error message with just the end portion of your password and cluster name per your original message:
I’m assuming the special character was an & and you had everything after that character in the error message.
The & character is a special character in Linux which will run the command in the background. If you typed ctrl + c to end that command you should have seen something similar to the following:
[1]+ Exit 1 mongoimport <any characters up to the &>
You could also just escape the & (or any other shell specific special character such as *) by preceding that character with a \ (e.g. \&). This will stop the shell from treating that character as special and treating it as the literal value that it is.
This would happen on any tool that you typed that password into on the command line (at least in a Linux/Mac based system). I’m assuming most times, you’re typing the password in at a prompt, in which case you don’t need to escape the special character as you’re no longer working with prompt directly.
Hopefully this clears up what was going on and that I didn’t muddy the waters trying to explain what was happening.