Cloud Atlas MongoDB - clone a collection to a new collection - mongodb-atlas

My question is similar to this one, but specific to using the web interface at cloud.mongodb.com.
Is is possible to clone a large collection using the website? Or do I have to use a command line interface?
Also, if I click "restore" from a backup, will it prompt for a collection name? I was afraid to hit it because I didn't know if it would immediately start restoring, or give me some options first.

I couldn't find a way in Atlas, so I used MongoDB Compass, which meant I had to export the collection to file and then import it into another database

Related

Export single database, import to different database, Console only

In Google Cloud SQL, is there a way to export a single MySQL database (not the entire server) and then import that data into a different existing database on a different Cloud SQL Server, all through the console?
I know that this wouldn't be very difficult to do through the command line, but I'm looking for a Console-only solution. The things I can get to work are:
To restore an entire server
To restore a single database as a new database in an existing server
but neither of those are what I'm looking to accomplish. I want to overwrite a database in one server with the data from a database in another.
If I understood you correctly, this is what you can do:
Go to the first Cloud SQL instance
On the top there should be a button saying "EXPORT"
Select a bucket, and click on "Show advanced options".
Select the database(s) you want to export
Go to the second Cloud SQL instance
Click on the "IMPORT" button next to "EXPORT"
Select the file that you exported
I think that's what you want, if it's not, please reply so I can understand better.

Exporting Data from Access into a CSV File for Use in MongoDB

I need to recreate a database in a MongoDB backend environment that's currently in Microsoft Access format. Please note: I am not very familiar with MS Access. When I open up the db in question and click on "External Data" I see options to:
1.) "Import the source data into a new table in the current database" -- I clearly don't want this, and
2.) "Link to the data source by creating a linked table". I don't think I want this either.
I assume what I need is to download a version of this db as a CSV file. From there I can write an ETL to get the data into a mongo collection.
How do I do this from within Access? Is there an option to simply download the data onto my local computer in something like CSV format?
When I open up the db in question and click on "External Data" I see
options to:
You will also se icons with small arrows for export to Excel or text files - which, that latter, is what you are after.

Import/Export Meteor Collections

I'd like to be able to provide an import/export to csv feature for a specific Subscription (a subset of a Collection). However, I'm not sure at all where I should start. I assume that this has to be done server-side since they need to upload a file for the importing feature, so it probably involves a Meteor.methods function on the server which I call from the client. I'm not sure how you would return a file for download or temporarily upload one (for the import feature, I don't want to keep the file around).
Any ideas on the best way to approach this with Meteor?
I'm going to pretend this is the best way, but do check out CollectionFS, a Meteor package that implements file uploads, so a logged-in user can upload files, and file handlers, in this sense, a function or series of functions automatically run on an uploaded file.
For exports, you could pipe this through CollectionFS again, or you could use FileSaver.js to just directly serve the export file.

iphone any interface to deal with sqlite database created in the application Documents folder?

do we have any command line from where i can query the sqlite database, which is created by coding, and stored in the application's default Documents folder?
Turn on file sharing for the app, copy the database file to your Mac, and use the command line tools (sqlite3) that are there.
(Note to the previous editor: I appreciate editing of answers for accuracy, format improvements, and fixing typos...but, if you want to provide completely different information, I suggest providing your own answer instead of changing the meaning of another user's response.)

How to dynamically create a sqlite3 database on the iPhone?

I would like to know if it is possible to create the file of a database by programming?
Actually I need to create a database if it does not exist.
I'll assume you have your own valid reasons for using sqlite3 directly rather than Core Data. There are certainly cases where it's appropriate.
The sqlite_3_open() function will create the database if it doesn't already exist. The sqlite3_open_v2() function will create the database if you pass SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE in the flags parameter. See the documentation for more details.
Of course on iPhone you'll need to make sure you're creating the database in a read-write directory such as the app's Documents directory, as opposed to the Resources directory, which is read-only.
In practice I've never tried building a database from the ground up on the iPhone. I always found it simpler to just include an empty DB file with the schema pre-built as an application resource, and then copy the file to the Documents directory the first time the app is run.
Are you sure that you need to create the database file directly? Maybe you should check out the Core Data Framework.
Thanks for your answers, I have never used Core Data so I will have a look on this.
For the moment I also copy a DB file from the Resource directory to the Documents but I would like to create a static library which can be used by many persons. So I would give a minimum of files to add to their project. That's the reason.