How to set TTL for the json objects inserted using cbdocloader command line tool?

I was trying to bulk insert data into my couchbase servers which i was able to do using "cbdocloader". But what about the TTL of the objects inserted?
Is there a way to set the properties like TTL, TTI, etc that we can set using the Java api?

1 Answer

« Back to question.

Hello,
The cbdocloader tool does not provide any official way to send a TTL.
Since cbdocloader is a python script you can modify it, obviously it is not a supported thing but it is working.
So what you can do is:
- edit the cbdocloader file located in $COUCHBASE_INSTALL/couchbase-core/lib/python
- go to line 129 ( self.bucket.set(dockey, 0, 0, raw_data) )
and replace the first 0 with you TTL
Regards