Exception: `to_table': undefined method `split'
riyadparvez opened this issue · 2 comments
riyadparvez commented
This is the command I've run: pgsync pipeline --debug --disable-user-triggers --fail-fast --disable-integrity --no-rules
This is the config.yml
:
from:
to: postgresql://local_user@localhost:5432/local_database
groups:
pipeline:
- device: "LIMIT 10"
Here is the log:
From:
To: local_database on localhost:5432
[from] SELECT unnest(current_schemas(true)) AS schema
/Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:95:in `to_table': undefined method `split' for {"device"=>"LIMIT 10"}:Hash (NoMethodError)
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:64:in `block in group_to_tasks'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:57:in `map'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:57:in `group_to_tasks'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:26:in `block in tasks'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:25:in `each'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/task_resolver.rb:25:in `tasks'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/sync.rb:46:in `perform'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/client.rb:25:in `perform'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/lib/pgsync/client.rb:34:in `start'
from /Library/Ruby/Gems/2.6.0/gems/pgsync-0.6.8/exe/pgsync:7:in `<top (required)>'
from /usr/local/bin/pgsync:23:in `load'
from /usr/local/bin/pgsync:23:in `<main>'
ankane commented
Hey @riyadparvez, the error message could be improved, but the syntax should be:
groups:
pipeline:
device: "LIMIT 10"
riyadparvez commented
Thank you, it resolved the issue. This tool has been very helpful.