You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Abdul Jabbar Azam <aj...@gmail.com> on 2016/02/10 10:43:21 UTC

Materialized views and composite partition keys

Hello,

I tried creating a material view using a composite partition key but I got
an error. I can't remember the error but it was complaining about the
presence of the second field in the partition key.

Has anybody experienced this or have a workaround. I haven't tried UDT's
yet.


-- 
Regards

Abdul Jabbar Azam
twitter: @ajazam

Re: Materialized views and composite partition keys

Posted by Abdul Jabbar Azam <aj...@gmail.com>.
Hello,

I've just changed my materialized view to have one partition key. The view
gets generated now.

After some refactoring I found that I didn't need a composite primary key
at all. However if I later need one then I'll use a UDT. If it works...

On Wed, 10 Feb 2016 at 13:04 DuyHai Doan <do...@gmail.com> wrote:

> You can't have more than 1 non-pk column from the base table as primary
> key column of the view. All is explained here:
> http://www.doanduyhai.com/blog/?p=1930
>
> On Wed, Feb 10, 2016 at 10:43 AM, Abdul Jabbar Azam <aj...@gmail.com>
> wrote:
>
>> Hello,
>>
>> I tried creating a material view using a composite partition key but I
>> got an error. I can't remember the error but it was complaining about the
>> presence of the second field in the partition key.
>>
>> Has anybody experienced this or have a workaround. I haven't tried UDT's
>> yet.
>>
>>
>> --
>> Regards
>>
>> Abdul Jabbar Azam
>> twitter: @ajazam
>>
>
> --
Regards

Abdul Jabbar Azam
twitter: @ajazam

Re: Materialized views and composite partition keys

Posted by Abdul Jabbar Azam <aj...@gmail.com>.
Ah. I think that's where I'm going wrong. I'll have a look when I get home.

On Wed, 10 Feb 2016 at 13:04 DuyHai Doan <do...@gmail.com> wrote:

> You can't have more than 1 non-pk column from the base table as primary
> key column of the view. All is explained here:
> http://www.doanduyhai.com/blog/?p=1930
>
> On Wed, Feb 10, 2016 at 10:43 AM, Abdul Jabbar Azam <aj...@gmail.com>
> wrote:
>
>> Hello,
>>
>> I tried creating a material view using a composite partition key but I
>> got an error. I can't remember the error but it was complaining about the
>> presence of the second field in the partition key.
>>
>> Has anybody experienced this or have a workaround. I haven't tried UDT's
>> yet.
>>
>>
>> --
>> Regards
>>
>> Abdul Jabbar Azam
>> twitter: @ajazam
>>
>
> --
Regards

Abdul Jabbar Azam
twitter: @ajazam

Re: Materialized views and composite partition keys

Posted by DuyHai Doan <do...@gmail.com>.
You can't have more than 1 non-pk column from the base table as primary key
column of the view. All is explained here:
http://www.doanduyhai.com/blog/?p=1930

On Wed, Feb 10, 2016 at 10:43 AM, Abdul Jabbar Azam <aj...@gmail.com>
wrote:

> Hello,
>
> I tried creating a material view using a composite partition key but I got
> an error. I can't remember the error but it was complaining about the
> presence of the second field in the partition key.
>
> Has anybody experienced this or have a workaround. I haven't tried UDT's
> yet.
>
>
> --
> Regards
>
> Abdul Jabbar Azam
> twitter: @ajazam
>