Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jul 21 22:02
    dependabot[bot] labeled #189
  • Jul 21 22:02
    dependabot[bot] opened #189
  • Jul 21 22:02

    dependabot[bot] on bundler

    Bump tzinfo from 1.2.2 to 1.2.1… (compare)

  • Feb 11 17:52
    MOHAMMAD-FATHA commented #188
  • Feb 11 16:17
    anlek closed #187
  • Feb 11 16:17
    anlek closed #186
  • Feb 11 16:16
    anlek commented #188
  • Feb 07 06:45
    MOHAMMAD-FATHA opened #188
  • Jan 28 07:50
    MOHAMMAD-FATHA opened #187
  • Jan 28 07:21
    MOHAMMAD-FATHA opened #186
  • Sep 11 2021 20:19
    anlek commented #124
  • Sep 10 2021 12:29
    rodrigotrombeta commented #124
  • Nov 27 2020 15:24
    paul-uulabs commented #184
  • Nov 27 2020 15:24
    paul-uulabs commented #184
  • Nov 27 2020 15:23
    paul-uulabs commented #184
  • Nov 27 2020 15:22
    paul-uulabs commented #184
  • Nov 27 2020 13:20
    paul-uulabs commented #184
  • Nov 26 2020 17:47
    anlek commented #184
  • Nov 26 2020 12:05
    paul-uulabs commented #184
  • Nov 25 2020 22:16
    dependabot[bot] edited #182
as u can see when I use mongo import says "frase" repated many times
I am embedding one table into another as an array, but the name of the table is no needed
Kumail Habib
Hi, I was wondering if anybody has successfully connected to an Oracle db with mongify? I'm trying to do a mongify check with my db.config file and it results in an error:
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord-oracle_enhanced-adapter-1.7.4/lib/active_record/connection_adapters/oracle_enhanced/oci_connection.rb:7:in `rescue in <top (required)>': Could not load 'active_record/connection_adapters/oracle_enhanced_adapter'. Make sure that the adapter in config/database.yml is valid. If you use an adapter other than 'mysql2', 'postgresql' or 'sqlite3' add the necessary adapter gem to the Gemfile. (LoadError)
Kumail Habib
@anlek do you know if anybody has connected mongify to an Oracle db successfully?
Andrew Kalek
@habibkm No, I have no way to test this myself and I never hear when the product works, only when it doesn't :(
@haperlot It's hard to say what's going on without seeing your translation file.
suman behara
hi any body succed with mysql connection using mongify ? I'm getting error mysql_adapter.rb :456 :in 'real_connect' : no implicit conversion of String into Integer (TypeError)
manish gabrani
hi guys, i am using mongify for mysql to mongoDB Version 3.0. my question is: can we use replica set(set of multiple mongoDB server) to mongify data from mysql to mongodb
Andrew Kalek
@gabrani99_twitter I don't think you can, but I've never tested, that's outside of the scope I work in on MongoDB. If you figure it out, please let me know.
hi people
i need help
i have installed mongify
hw do i get it working ..
wen i execute mongify check database.config
i get this
C:\Users\optimus93>mongify check database.config
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord- rescue in spec': Specified 'mysql' for database adapter, but the gem is not loaded. Addgem 'mysql'to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord-'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord- establish_connection' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:40:insetup_connection_adapter'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/database/sql_connection.rb:56:in has_connection?' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/command/worker.rb:99:incheck_sql_connection'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/command/worker.rb:68:in execute' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/lib/mongify/cli/application.rb:28:inexecute!'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/mongify-1.3.1/bin/mongify:15:in <top (required)>' from C:/Ruby23-x64/bin/mongify:22:inload'
from C:/Ruby23-x64/bin/mongify:22:in `<main>'
Andrew Kalek
@edulabpurpose_twitter try to run gem install mysql on your system
Eduardo Herrera
i need a little bit of help
i trying to export data from sql to mongo
but i don't have any idea how configure it
i did some configurations but i'm not sure what i am doing
Eduardo Herrera
@anlek hi i need help reading this my sql database command
set @rownum := 0;
select round(avg(t1.lat_n), 4) as median_val
from (
select @rownum := @rownum + 1 as row_number, s.lat_n
from station s, (select @rownum := 0) r
order by s.lat_n
) as t1,
select count(*) as total_rows
from station
) as t2
where t1.row_number in (floor((total_rows + 1) / 2), floor((total_rows + 2) / 2));
most especially the part that says (select @rownum := 0) r
Andrew Kalek
@oluwoleilesanmi Sorry, I'm not sure what you're referring to. If you think there is an issue with the code, please feel free to do a pull request and I'll review it as soon as I can.
@anlek hi!
There is a question in MySQL to MongoDB Migration using mongify. Why is every document embed in the first row?
I think When embedding with :embed_in => parentCollection, : on => "linkedField", it seems that mongify (or mongodb) can not find the linked row. What should I do?

In addition, I am using mongodb 3.4 version.
this is rb file.PNG

I have been working on migrating using mongify for about a month, but I could not find any answer.
Below is the process execution result.

I know that an error occurs in the operation of erasing the pre_mongified_id field and index. It's a problem with Ruby's mongo driver version, and I've also seen a recent pull request related to it.

@anlek !
I finally solved it.
The cause is that the name of the field to be keyed at embed is changed to: rename_to.

I now want to focus on eliminating errors from mongodb 3.4 or later. (Https://github.com/anlek/mongify/pull/148)
Andrew Kalek
@elvortion Glad you got the issue figured out. Odd that it picked the first row and embedded everything into it :(
Hey, how do I connect a sqlite database? unable to find the documentation on it
Hi, I'm new to Mongify. I would like to know if I can use complex queries to extract data from MS SQL Server to insert into MongoDB?
Andrew Kalek
@sharmapri Mongify does not do any custom querying. If you want custom data moved into your mongodb, try doing views in MS SQL and use mongify to move the view over. (I'm not 100% sure this will work with Mongify). Good luck
@anlek hey, I'm struggling to figure out how to connect mongify to an sqlite database. Could you please help me out?
Andrew Kalek
@mdunaiski , just specify the adaptor and file location in database.config
sql_connection do
  adapter "sqlite3"
  database "my_database.sqlite3"
  pool 5
  timeout 5000
Mohammed Ali
I am getting this error after a fresh install
/usr/lib/ruby/2.3.0/rubygems/specification.rb:2287:in `raise_if_conflicts': Unable to activate activerecord-4.2.9, because activesupport-5.0.1 conflicts with activesupport (= 4.2.9) (Gem::ConflictError)
Andrew Kalek
Hello @xc0d3rz , sorry to hear that you're having issues. It seems you have multiple versions of rails installed, try uninstalling all versions gem uninstall rails and reinstalling mongify (gem install mongify). Hopefully this will fix your problem.
Hi Im trying to figure out if its possible to migrate last month's data from a table that is years old. Does mongify allow one to specify queries like that while translating?
Andrew Kalek
Hello @dmbhatti, Mongify doesn't have a querying ability. However, you could build a view (if supported by your DB) and use the view to export the data to MongoDB. Good luck!
Hi, I am trying to use mongify to pull data from postgres into mongodb, I am using bash shell on windows and used it to install ruby. I am very new to ruby, I have created a file database.config however running mongify check database.config resulted in the below error
/home/Babatunde/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.10/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'postgresql' for database adapter, but the gem is not loaded. Add `gem 'pg'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.10/lib/active_record/connection_adapters/connection_specification.rb:174:in `spec'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/activerecord-4.2.10/lib/active_record/connection_handling.rb:50:in `establish_connection'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:40:in `setup_connection_adapter'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:56:in `has_connection?'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:in `check_sql_connection'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in `execute'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:in `execute!'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/gems/mongify-1.3.2/bin/mongify:17:in `<top (required)>'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/bin/mongify:22:in `load'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/bin/mongify:22:in `<main>'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `eval'
        from /home/Babatunde/.rvm/gems/ruby-2.4.1/bin/ruby_executable_hooks:15:in `<main>'
I have tried using the mysql approach using gem install pg seems not to work. I however don't know where the Gem file is located ? Thanks
Hi, all so I got the application to work, I just created a new Gemfile from the directory I was working from using bundler and it worked good. However I am getting an error at the end of the migration :
rescue in command: Database command 'update' failed: BSON field 'update.multi' is an unknown field. (Mongo::OperationFailure)
Solved!!! Had to downgrade to MongDB 3.2 saw the issues on github, thanks!
Hi Guys,
Could you help me to install mongify?
when I run gem install mongify, I get error