@anlek Hey I have some doubts and issue with mongify can you please help me to resolve it, I request you to go through the below mentioned questions:
1 . How to ensure the data is not corrupted while migrating ?
data types conversion from sql to mongo
3 . Check what permissions are required for Mongify to work ?For example, the environment in the Bank is restricted
4 . What is “check” doing ? (Mean it only checks the connection or checks the schema also)
5 . How is Mongify working ? What is the mechanism ?
6 . Constraints – if any for mongify – like linux / ubuntu / versions.
And also I have error while using sync command the error as mentioned below
/var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/fanout.rb:19: warning: Capturing the given block using Proc.new is deprecated; use &block instead
Traceback (most recent call last):
23: from /usr/local/bin/mongify:23:in <main>' 22: from /usr/local/bin/mongify:23:inload'
21: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 20: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!'
19: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:75:in execute' 18: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:29:insync'
17: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:in sync_data' 16: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:ineach'
15: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:61:in block in sync_data' 14: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:108:inselect_by_query'
13: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in select_all' 12: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:32:inselect_all'
11: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:217:in select' 10: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:inexec_query'
9: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:262:in sp_executesql' 8: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:inraw_select'
7: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log' 6: from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:ininstrument'
5: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log' 4: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:inblock in raw_select'
3: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:318:in _raw_select' 2: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:343:inhandle_to_names_and_values'
1: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:in handle_to_names_and_values_dblib' /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:ineach': Invalid column name 'updated_at'. (TinyTds::Error)
23: from /usr/local/bin/mongify:23:in <main>' 22: from /usr/local/bin/mongify:23:inload'
21: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/bin/mongify:17:in <top (required)>' 20: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:inexecute!'
19: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:75:in execute' 18: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:29:insync'
17: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:in sync_data' 16: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:ineach'
15: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:61:in block in sync_data' 14: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:108:inselect_by_query'
13: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in select_all' 12: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:32:inselect_all'
11: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:217:in select' 10: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:inexec_query'
9: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:262:in sp_executesql' 8: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:inraw_select'
7: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:in log' 6: from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:ininstrument'
5: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:in block in log' 4: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:inblock in raw_select'
3: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:318:in _raw_select' 2: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:343:inhandle_to_names_and_values'
1: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:in handle_to_names_and_values_dblib' /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:ineach': TinyTds::Error: Invalid column name 'updated_at'.: EXEC sp_executesql N'SELECT t.* FROM mongify_sync_helper t, mongify_sync_helper u WHERE t.updated_at > u.last_updated_at AND u.table_name = ''mongify_sync_helper''' (ActiveRecord::StatementInvalid)
@anlek Hey I have some doubts and issue with mongify can you please help me to resolve it, I request you to go through the below mentioned questions: 1 . How to ensure the data is not corrupted while migrating ?
And also I have error while using sync command the error as mentioned below
/var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/fanout.rb:19: warning: Capturing the given block using Proc.new is deprecated; use
&block
instead Traceback (most recent call last): 23: from /usr/local/bin/mongify:23:in<main>' 22: from /usr/local/bin/mongify:23:in
load' 21: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/bin/mongify:17:in<top (required)>' 20: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:in
execute!' 19: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:75:inexecute' 18: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:29:in
sync' 17: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:insync_data' 16: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:in
each' 15: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:61:inblock in sync_data' 14: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:108:in
select_by_query' 13: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/query_cache.rb:70:inselect_all' 12: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in
select_all' 11: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:217:inselect' 10: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:in
exec_query' 9: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:262:insp_executesql' 8: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:in
raw_select' 7: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:inlog' 6: from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:in
instrument' 5: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:inblock in log' 4: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:in
block in raw_select' 3: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:318:in_raw_select' 2: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:343:in
handle_to_names_and_values' 1: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:inhandle_to_names_and_values_dblib' /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:in
each': Invalid column name 'updated_at'. (TinyTds::Error) 23: from /usr/local/bin/mongify:23:in<main>' 22: from /usr/local/bin/mongify:23:in
load' 21: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/bin/mongify:17:in<top (required)>' 20: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/application.rb:28:in
execute!' 19: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/cli/command/worker.rb:75:inexecute' 18: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:29:in
sync' 17: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:insync_data' 16: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:58:in
each' 15: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/translation/sync.rb:61:inblock in sync_data' 14: from /var/lib/gems/2.7.0/gems/mongify-1.3.2/lib/mongify/database/sql_connection.rb:108:in
select_by_query' 13: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/query_cache.rb:70:inselect_all' 12: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in
select_all' 11: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:217:inselect' 10: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:19:in
exec_query' 9: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:262:insp_executesql' 8: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:in
raw_select' 7: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:478:inlog' 6: from /var/lib/gems/2.7.0/gems/activesupport-4.2.11.3/lib/active_support/notifications/instrumenter.rb:20:in
instrument' 5: from /var/lib/gems/2.7.0/gems/activerecord-4.2.11.3/lib/active_record/connection_adapters/abstract_adapter.rb:484:inblock in log' 4: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:313:in
block in raw_select' 3: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:318:in_raw_select' 2: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:343:in
handle_to_names_and_values' 1: from /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:inhandle_to_names_and_values_dblib' /var/lib/gems/2.7.0/gems/activerecord-sqlserver-adapter-4.2.18/lib/active_record/connection_adapters/sqlserver/database_statements.rb:354:in
each': TinyTds::Error: Invalid column name 'updated_at'.: EXEC sp_executesql N'SELECT t.* FROM mongify_sync_helper t, mongify_sync_helper u WHERE t.updated_at > u.last_updated_at AND u.table_name = ''mongify_sync_helper''' (ActiveRecord::StatementInvalid)