Can I add documents in cocuhabse bucket through sync_gateway without using mobile device

We can populate the data on mobile divices to couchbase server using sync_gateway.

Is it possible to insert records in couchbase server using Sync_gateway without using mobile devices.
That is if I want to insert records in couchbase data bucket through sync_gateway using Python code.
(I do not want to use ‘upsert’ or ‘insert’ methods of cocuhbase bucket object in python)

Is this really possible ?
Or if I want to insert records in couchbase bucket through sync_gateway I need to add them using a mobile device only

You can use the Sync Gateway REST API for this purpose.

Curious - Is there a reason you want to do this ? Note that as of Couchbase 5.0/ Sync Gateway 1.5, we have shared bucket support which allows all documents inserted directly into couchbase server bucket to be imported and processed with sync metadata by the Sync Gateway.

I want to check performance of couchbase, the scenario is like,
If thousands records are getting inserted in couchbase server through sync_gateway, at the same time records are pulled by mobile devices through sync_gateway REST APIs, aslo records are pulled by N1QL query.
At the same time we want to run ‘delete’ n1ql query to clean up old records.
If all these things are going simultaniously, then how much load couchbase server can stand by.

Is cocuhbase server is having any limits for performing these types of operations at the same time.

K- in that case, the REST API should work for you. You should consider factors like document size while testing as that has an impact. Also, indexing can improve your query performance .

Would be great to learn what you find from your testing.

In a typical couchbase installation, there is massive data creation.
At certain stage the data becomes so huge that you need to delete that in order to free up memory and disc space.

So what is normal practice for that.
N1QL ‘delete’ query or setting up ‘ttl’ value or some thing else.

Couchbase has provided partial data backup facility in the same way why partial data clean up facility is not provided ?
I mean if I want to clean up data generated upto a certain date is that possible ?

Hi @mdrdhaygude,

You can use TTL or a DELETE, that’s really up to you. I have heard of some customers that set a TTL value on documents. They use a Hadoop/Spark/Kafka connector to move the data somewhere else before it’s deleted for the purpose of long term storage.