Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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
edulabpurpose
@edulabpurpose_twitter
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-4.2.7.1/lib/active_record/connection_adapters/connection_specification.rb:177:in 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-4.2.7.1/lib/active_record/connection_adapters/connection_specification.rb:174:inspec'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/activerecord-4.2.7.1/lib/active_record/connection_handling.rb:50:in 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
@anlek
@edulabpurpose_twitter try to run gem install mysql on your system
Eduardo Herrera
@ito2307
hey
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
@ito2307
image.png
Olu
@oluwoleilesanmi
@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
@anlek
@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.
JungSooBin
@elvortion
@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?
JungSooBin
@elvortion

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.

JungSooBin
@elvortion
@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
@anlek
@elvortion Glad you got the issue figured out. Odd that it picked the first row and embedded everything into it :(
mdunaiski
@mdunaiski
Hey, how do I connect a sqlite database? unable to find the documentation on it
sharmapri
@sharmapri
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
@anlek
@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
mdunaiski
@mdunaiski
@anlek hey, I'm struggling to figure out how to connect mongify to an sqlite database. Could you please help me out?
Andrew Kalek
@anlek
@mdunaiski , just specify the adaptor and file location in database.config
sql_connection do
  adapter "sqlite3"
  database "my_database.sqlite3"
  pool 5
  timeout 5000
end
Mohammed Ali
@xc0d3rz
Hi
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
@anlek
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.
dmbhatti
@dmbhatti
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
@anlek
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!
Bherbhertunde
@Babatee760_twitter
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
Bherbhertunde
@Babatee760_twitter
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)
Bherbhertunde
@Babatee760_twitter
Solved!!! Had to downgrade to MongDB 3.2 saw the issues on github, thanks!
Dan
@elitedan0401
Hi Guys,
Could you help me to install mongify?
when I run gem install mongify, I get error
@anlek ^^
Maxime Riehl
@Holtolee_twitter

Hello,

i have this error at the end of mongify process:

```ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/db.rb:610:in `rescue in command': Database command 'update' failed: BSON field 'update.multi' is an unknown field. (Mongo::OperationFailure)              | ETA:  --:--:--
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/db.rb:606:in `command'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/collection_writer.rb:314:in `block in send_write_command'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:55:in `block in instrument'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:20:in `instrument'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/functional/logging.rb:54:in `instrument'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/collection_writer.rb:313:in `send_write_command'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/collection.rb:1104:in `send_write'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongo-1.12.5/lib/mongo/collection.rb:497:in `update'
    from /Users/mriehl/.rvm/gems/ruby-2.1.10/gems/mongify-1.3.2/lib/mongify/database/no_sql_connection.rb:145:in `remove_pre_mongified_ids'    ```

Someone know how to resolve this?

ps: i'm on mac

Nitin Singh Solanky
@nitin41
Hello
i'm getting this error
/Library/Ruby/Gems/2.3.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/connection_specification.rb:177:in 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 /Library/Ruby/Gems/2.3.0/gems/activerecord-4.2.11/lib/active_record/connection_adapters/connection_specification.rb:174:inspec'
from /Library/Ruby/Gems/2.3.0/gems/activerecord-4.2.11/lib/active_record/connection_handling.rb:50:in establish_connection' from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:40:insetup_connection_adapter'
from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:56:in has_connection?' from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:incheck_sql_connection'
from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in execute' from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!'
from /Library/Ruby/Gems/2.3.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' from /usr/local/bin/mongify:22:inload'
from /usr/local/bin/mongify:22:in `<main>'
I did gem install mysql also but still getting this error
Ananthu R V
@ananthurv_gitlab
hi @nitin41 , I also faced the same issue. I solved it by creating a gem file and adding the following in the gem 'mysql2', '~> 0.5.2' gem 'activerecord'. I have used mysql2 adapter might differ for you.
kietvo01314
@kietvo01314

Hi guys, I really need help about this problem, i am trying to user sqlserver-adapter but it appears this
I searched a lot of issues but i cant find how to solve this

C:\Users\kietvo\Downloads\rubygems-3.0.3>mongify check database.config
(eval):5: warning: Object#timeout is deprecated, use Timeout.timeout instead.
Traceback (most recent call last):
17: from C:/Ruby25-x64/bin/mongify:23:in <main>' 16: from C:/Ruby25-x64/bin/mongify:23:inload'
15: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:27:inexecute!'
13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/options.rb:58:in parse' 12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/options.rb:78:inconfig_file'
11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:in parse' 10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:ininstance_eval'
9: from (eval):1:in parse' 8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:34:insql_connection'
7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:34:in instance_exec' 6: from (eval):5:inblock in parse'
5: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:122:in timeout' 4: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:108:intimeout'
3: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:in catch' 2: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:incatch'
1: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:in block in catch' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:ininstance_eval': no block given (yield) (LocalJumpError)

nguyenhoangnhon
@nguyenhoangnhon
Hi guys, I am using Mongify to migrate data from PostgreSQL to Mongo DB. When I run command to check PostgreSQL connection , I get a following issue, please help me fix it .
My OS is Ubuntu18.04.
lab@lab:~/mongify$ mongify check database.config
Traceback (most recent call last):
22: from /usr/local/bin/mongify:23:in <main>' 21: from /usr/local/bin/mongify:23:inload'
20: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 19: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!'
18: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:68:in execute' 17: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:99:incheck_sql_connection'
16: from /var/lib/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:57:in has_connection?' 15: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_handling.rb:87:inconnection'
14: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_handling.rb:113:in retrieve_connection' 13: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:571:inretrieve_connection'
12: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in connection' 11: from /usr/lib/ruby/2.5.0/monitor.rb:226:inmon_synchronize'
10: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in block in connection' 9: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:incheckout'
8: from /usr/lib/ruby/2.5.0/monitor.rb:226:in mon_synchronize' 7: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:inblock in checkout'
6: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in acquire_connection' 5: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:incheckout_new_connection'
4: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in new_connection' 3: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:45:inpostgresql_connection'
2: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:45:in new' 1: from /var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:243:ininitialize'
/var/lib/gems/2.5.0/gems/activerecord-4.2.11.1/lib/active_record/connection_adapters/postgresql_adapter.rb:652:in `connect': uninitialized constant ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::PGconn (NameError)
peppemath
@peppemath

Hi, I'm trying to port from sqlserver to mongodb; I have the following problem when I try to check connections:

mongify check database.config
Traceback (most recent call last):
16: from C:/Ruby25-x64/bin/mongify:23:in <main>' 15: from C:/Ruby25-x64/bin/mongify:23:inload'
14: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 13: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:27:inexecute!'
12: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/options.rb:58:in parse' 11: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/cli/options.rb:78:inconfig_file'
10: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:in parse' 9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:ininstance_eval'
8: from (eval):1:in parse' 7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:34:insql_connection'
6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:34:in instance_exec' 5: from (eval):7:inblock in parse'
4: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:108:in timeout' 3: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:incatch'
2: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:in catch' 1: from C:/Ruby25-x64/lib/ruby/2.5.0/timeout.rb:33:inblock in catch'
C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/mongify-1.3.2/lib/mongify/configuration.rb:14:in `instance_eval': no block given (yield) (LocalJumpError).

my database.config is
sql_connection do
adapter "sqlserver"
host "."
username "sa"
password "password"
database "dvicedb"
Timeout.timeout 10000
end

mongodb_connection do
host "localhost:27017"
database "dvicedb"
end

Can someone help me? Grazie