keen-cli icon indicating copy to clipboard operation
keen-cli copied to clipboard

events:add is not working with latest csv format

Open willianba opened this issue 2 years ago • 0 comments

currently i've been trying to import a csv file with my extracted events from keen and it's not working.

steps to reproduce: 1 - extract events with keen API in csv format 2 - add them using the events:add command in the cli

error:

/home/willianba/.rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/csv.rb:1632:in `parse_line': wrong number of arguments (given 2, expected 1) (ArgumentError)
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/lib/keen-cli/batch_processor.rb:114:in `set_headers'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/lib/keen-cli/batch_processor.rb:41:in `add'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/lib/keen-cli/events.rb:41:in `block in events_add'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/lib/keen-cli/events.rb:40:in `each'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/lib/keen-cli/events.rb:40:in `events_add'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
        from /home/willianba/.rvm/gems/ruby-3.0.0/gems/keen-cli-0.2.4/bin/keen:6:in `<top (required)>'
        from /home/willianba/.rvm/gems/ruby-3.0.0/bin/keen:23:in `load'
        from /home/willianba/.rvm/gems/ruby-3.0.0/bin/keen:23:in `<main>'

alternative:

  • export events in json format and import using the cli. it has no errors import with json format

willianba avatar Jan 26 '23 14:01 willianba