> On 7. Jul 2020, at 16:42, Nick Vatamaniuc <[email protected]> wrote:
> 
> Hi Sharath,
> 
> You can use {"source": ..., "target": ..., "create_target": true,
> "create_target_params": {"partitioned": true}, ...} to create
> partitioned target dbs.
> 
> The option was there since version 2.2.0
> https://docs.couchdb.org/en/stable/whatsnew/2.2.html?highlight=create_target_params#features
> but unfortunately it was not documented yet.


lol, thanks for digging this out. That explains why I couldn’t find it in the 
docs 😂

PRs welcome ;)

Best
Jan
—
> 
> Cheers,
> -Nick
> 
> On Tue, Jul 7, 2020 at 9:23 AM Jan Lehnardt <[email protected]> wrote:
>> 
>> 
>> 
>>> On 7. Jul 2020, at 15:19, Sharath <[email protected]> wrote:
>>> 
>>> Thanks - thats what I thought.
>> 
>> Ah yes, I was assuming your _ids were already set up correctly.
>> 
>> Best
>> Jan
>> —
>>> 
>>> Have to write an ETL job for my hugeish database - would be cool if
>>> replication protocol could be used to achieve the same thing.
>>> 
>>> Sharath
>>> 
>>> 
>>> On Tue, Jul 7, 2020 at 11:15 PM Adam Kocoloski <[email protected]> wrote:
>>> 
>>>> The tricky part is that partitioned databases have a hard requirement on
>>>> document IDs to have a “:” in them to demarcate between the partition and
>>>> rest of the document ID.  Replication can’t change document ID, but if the
>>>> source database happens to fulfill that requirement for all of its
>>>> documents (excluding _design documents), then you could create a
>>>> partitioned database on the target and replicate into it. But that’s a
>>>> pretty unlikely coincidence.
>>>> 
>>>> Switching to partitioned databases is unfortunately more likely to require
>>>> an external ETL job.
>>>> 
>>>> Adam
>>>> 
>>>>> On Jul 7, 2020, at 8:30 AM, Jan Lehnardt <[email protected]> wrote:
>>>>> 
>>>>> Hi Sharath,
>>>>> 
>>>>>> On 7. Jul 2020, at 14:17, Sharath <[email protected]> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Got couchdb 3.1 running and migrated my database (replicated) over.
>>>>>> 
>>>>>> Read about partitioning and have the following questions:
>>>>>> 
>>>>>> Can a partitioned database be created when replicating from another
>>>> couchdb
>>>>>> instance?
>>>>> 
>>>>> Do you mean with the `create_target: true` option? Probably not, but you
>>>> can
>>>>> create the database yourself as partitioned and then replicate over.
>>>>> 
>>>>> Best
>>>>> Jan
>>>>> —
>>>>> 
>>>>>> 
>>>>>> [I think not but have to ask]
>>>>>> 
>>>>>> thanks
>>>>>> Sharath
>>>> 
>>>> 
>> 

Reply via email to