0

I have no problem importing one CSV file into a collection by using the keen-cli command

keen events:add -p xxxxxx -k xxxxxx -w xxxxxx -r xxxxxx --collection xxxxx --file xxxxxx.csv --csv

With -p, -k, -w, -r being key overrides to avoid installing dotenv and having to mess with an .env file.

This import works fine the first time until I try to repeat this with a different file and a different collection. By goal is to be able to compare both collections so I want to keep them in the same project but I always get the following error.

/Library/Ruby/Gems/2.0.0/gems/keen-cli-0.2.3/lib/keen-cli.rb:16:in `deep_merge': undefined method `keys' for "15:53:30":String (NoMethodError)

I know Keen allows for multiple collections in the same project so I'm not 100% sure what's going on here.

Adam
  • 518
  • 2
  • 19
  • Can you give an example of the data that is stored in your CSV? Specifically I'd be interested in any fields containing "15:53:30" – jwegner Sep 06 '16 at 14:33
  • @jwegner couldn't find any instance of 15:53:30 , why would that cause an issue? – Adam Sep 12 '16 at 13:59

2 Answers2

0

If one file is working and a seemingly identical file isn't working, try inspecting the not-working file for:

  • misc or missing spaces, commas, and carriage returns at the end of the text
  • misc or missing spaces, commas, and carriage returns at the end of lines
Michelle Wetzler
  • 734
  • 4
  • 16
0

Figured it out!

Keen assumes that whatever your first column is will act as your unique key for the collection.

If there is any missing values in that list the entire thing fails.

Adam
  • 518
  • 2
  • 19