n1ql - How to rename a bucket in couchbase? -


i have bucket name 0001 when use following n1ql statement "5000" syntax error:

cbq> select * 0001; {     "requestid": "f2b70856-f80c-4c89-ab37-740e82d119b5",     "errors": [         {             "code": 5000,             "msg": "syntax error"         }     ],     "status": "fatal",     "metrics": {         "elapsedtime": "349.733us",         "executiontime": "204.442us",         "resultcount": 0,         "resultsize": 0,         "errorcount": 1     } } 

i think takes 0001 number , not bucket name, there easy way rename it?

in case can use ticks in n1ql escape bucket name:

cbq> select * `0001`; {     "requestid": "f48527e6-6035-47e7-a34f-90efe9f90d4f",     "signature": {         "*": "*"     },     "results": [         {             "0001": {                 "hello": "world"             }         }     ],     "status": "success",     "metrics": {         "elapsedtime": "2.410929ms",         "executiontime": "2.363788ms",         "resultcount": 1,         "resultsize": 80     } } 

currently there noway rename bucket instead 1 of following:

  1. backup bucket using cbbackup. recreate , restore using cbrestore.
  2. create second cluster , use xdcr transfer data new cluster correctly named bucket.

Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -