Import a CSV to couchbase bucket

Im confused as too how to import a csv file into a couchbase bucket using python. Ive been looking for example code to examine but have yet to find any specific to importing a csv file. Any assistance with this is appreciated.

Hi @odonnry you could do something like Convert CSV to JSON using Python - GeeksforGeeks but instead of writing to a JSON file after creating the dictionary you would iterate over it and insert/upsert each object into couchbase - Data Operations | Couchbase Docs.

If you just have a csv file that you want to get the data from into couchbase and don’t really mind how then you could also look at GitHub - couchbaselabs/couchbase-shell: Shell yeah!

There is also cbimport which can import CSV data, if you do not want to write code.