How to connect MongoDB to power BI - mongodb

everyone! need to connect powerBI to mongoDB
what I have:
I installed mongodb bi connector and ODBC driver.
started mongod
mongod start
and mongosqld
mongosqld start
also did: mongoimport --db localtest --collection zips --file C:\data\db\zips.json
After that, with following dsn connected pbi to this file:
local dsn
So, now I need to connect not ot local file, I thought it would be enough to create a new dsn with new credentials - but it was not(
connection that i need
Please, help me, what else should I do?

Related

Programmatically connect to remote MongoDB with SSH

I need to use terminal to connect to MongoDB. I have almost precisely same issue as this StackExchange question.
In my case I can correctly use Robo3T to connect. As well as use command
mongo --host 111.111.111.111 --port 111 --authenticationDatabase DB --username USER --password PASS locally. With same command executed remotely I receive following error:
No connection could be made because the target machine actively refused it.
I wanted to precisely recreate my Robo3T connection setup to see if SSH tunnel solves my issue

how to copy mongodb data from local to virtual machine?

I got an application from my developer and he asked me to host it over intranet. When i try to host it from virtual machine(cloud server), the mongo db data are missing from the collections.
Steps followed to host a site:
Copied the nodejs application folder from local to virtual machine.
Gave ng build followed by NPM start.
Now the mongodb connection is opened and able to see my database but the collections are empty.
Can anyone suggest me how to backup/copy the mongo db data from local to VM?
Thanks in advance
I think MongoDB backup/restore will help
https://docs.mongodb.com/manual/tutorial/backup-and-restore-tools/
from your local
mongodump --archive=test.20150715.gz --gzip --db test
move the backup file to your VM then run:
mongorestore --archive=test.20150715.gz --db test

How to Backup a Meteor Mongo Database?

To create a backup of my mongo database, I am trying mongodump from my meteor console. The command successfully completes, but creates an empty folder under the dump folder. I use the command
mongodump -h 127.0.0.1 --port 3001 -d meteor
So basically I am trying to backup my database for reactionecommerce. My question is how to backup a meteor mongodb that is running locally? Thanks for any guidance of help.
The issue was with the mongo version 2.6.10. I installed the latest 3.4.4 in my Ubuntu 64 machine following the instructions https://docs.mongodb.com/master/tutorial/install-mongodb-on-ubuntu/ Now I am able to dump the data without any problem.

Initialize a Mongodb on server

I want to use a script to initialise a MongoDB on a production server from my mongodb developpement instance.
I tried this method on local and it works
https://docs.mongodb.org/manual/tutorial/create-an-auto-incrementing-field/
#jeorfevre you told me about the import, Can you please give me a small exemple with the import, I found something you talk about this? docs.mongodb.com/manual/reference/program/mongoimport
Thanks in advance :)
once you have your database dev database ready to be installed in production.
Launch a command line
run mongodump
mongodump --host mongodb.example.net --port 27017 --out /path/backup/
transfert the exported file to the server (this depends on server envs)
run mongorestore on the server
mongorestore --port 27017 /path/backup/

MongoDB How to move collection from one localhost to another?

I was using MongoDB on localhost of my Ubuntu (just for education purpose), but now, I have a new computer. So, I would like to have this collection on my new PC. What files do I need to copy to do this after installing MongoDB on a new machine ?
Thank you.
First you must read mongo backup and restore this documentation explain how to backup your data base and restore.
Now you should follow this steps :
1> From your old Ubuntu systems takes back up of your DB using following command
mongodump --host DB name --port 27017 --out /path to save your files
this command write data in BSON format, if you want to take only some collections from your DB then use mongodump --collection your collection name --db DB name
2> Now copy all above BSON files to your new PC and use following command to restore your old Ubuntu systems DB.
mongorestore --port <port number> <path to the backup>
before running this command you must install mongoDB.