Re: Update/where statement Adds Row

2019-09-11 Thread A
Is it ok if I do this? 
... where email = em AND company_id = id IF EXISTS




Sent from Yahoo Mail for iPhone


On Wednesday, September 11, 2019, 9:08 PM, JOHN, BIBIN  wrote:

#yiv9726893009 #yiv9726893009 -- _filtered #yiv9726893009 {panose-1:2 4 5 3 5 4 
6 3 2 4;} _filtered #yiv9726893009 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 
3 2 4;}#yiv9726893009 #yiv9726893009 p.yiv9726893009MsoNormal, #yiv9726893009 
li.yiv9726893009MsoNormal, #yiv9726893009 div.yiv9726893009MsoNormal 
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv9726893009
 a:link, #yiv9726893009 span.yiv9726893009MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv9726893009 a:visited, #yiv9726893009 
span.yiv9726893009MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv9726893009 pre 
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;}#yiv9726893009 
p.yiv9726893009msonormal0, #yiv9726893009 li.yiv9726893009msonormal0, 
#yiv9726893009 div.yiv9726893009msonormal0 
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv9726893009
 span.yiv9726893009EmailStyle18 
{font-family:sans-serif;color:#1F497D;}#yiv9726893009 
span.yiv9726893009HTMLPreformattedChar {}#yiv9726893009 
span.yiv9726893009hljs-operator {}#yiv9726893009 span.yiv9726893009hljs-keyword 
{}#yiv9726893009 span.yiv9726893009hljs-string {}#yiv9726893009 
span.yiv9726893009hljs-builtin {}#yiv9726893009 .yiv9726893009MsoChpDefault 
{font-size:10.0pt;} _filtered #yiv9726893009 {margin:1.0in 1.0in 1.0in 
1.0in;}#yiv9726893009 div.yiv9726893009WordSection1 {}#yiv9726893009 
Use if exists clause.
 
  
 
UPDATE table
 
SET column ='something'
 
WHERE key = ‘value’ IF EXISTS;
 
  
 
  
 
  
 
  
 
  
 
From: A  
Sent: Wednesday, September 11, 2019 11:05 PM
To: User cassandra.apache.org 
Subject: Update/where statement Adds Row
 
  
 
I have an update statement that has a where clause with the primary key 
(email,companyid).
 
  
 
When executed it always creates a new row. It’s like it’s not finding the 
existing row with the primary key.
 
  
 
I’m using Cassandra-driver.
 
  
 
What am I doing wrong? I don’t want a new row. Why doesn’t it seem to be using 
the where clause to identify the existing row?
 
  
 
Thanks,
 
Angel
 



Sent from Yahoo Mail for iPhone
 




Re: Update/where statement Adds Row

2019-09-11 Thread A
Good idea. Tried that and it doesn’t add anything to the existing table, which 
exists


Sent from Yahoo Mail for iPhone


On Wednesday, September 11, 2019, 9:08 PM, JOHN, BIBIN  wrote:

#yiv9726893009 #yiv9726893009 -- _filtered #yiv9726893009 {panose-1:2 4 5 3 5 4 
6 3 2 4;} _filtered #yiv9726893009 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 
3 2 4;}#yiv9726893009 #yiv9726893009 p.yiv9726893009MsoNormal, #yiv9726893009 
li.yiv9726893009MsoNormal, #yiv9726893009 div.yiv9726893009MsoNormal 
{margin:0in;margin-bottom:.0001pt;font-size:11.0pt;font-family:sans-serif;}#yiv9726893009
 a:link, #yiv9726893009 span.yiv9726893009MsoHyperlink 
{color:blue;text-decoration:underline;}#yiv9726893009 a:visited, #yiv9726893009 
span.yiv9726893009MsoHyperlinkFollowed 
{color:purple;text-decoration:underline;}#yiv9726893009 pre 
{margin:0in;margin-bottom:.0001pt;font-size:10.0pt;}#yiv9726893009 
p.yiv9726893009msonormal0, #yiv9726893009 li.yiv9726893009msonormal0, 
#yiv9726893009 div.yiv9726893009msonormal0 
{margin-right:0in;margin-left:0in;font-size:11.0pt;font-family:sans-serif;}#yiv9726893009
 span.yiv9726893009EmailStyle18 
{font-family:sans-serif;color:#1F497D;}#yiv9726893009 
span.yiv9726893009HTMLPreformattedChar {}#yiv9726893009 
span.yiv9726893009hljs-operator {}#yiv9726893009 span.yiv9726893009hljs-keyword 
{}#yiv9726893009 span.yiv9726893009hljs-string {}#yiv9726893009 
span.yiv9726893009hljs-builtin {}#yiv9726893009 .yiv9726893009MsoChpDefault 
{font-size:10.0pt;} _filtered #yiv9726893009 {margin:1.0in 1.0in 1.0in 
1.0in;}#yiv9726893009 div.yiv9726893009WordSection1 {}#yiv9726893009 
Use if exists clause.
 
  
 
UPDATE table
 
SET column ='something'
 
WHERE key = ‘value’ IF EXISTS;
 
  
 
  
 
  
 
  
 
  
 
From: A  
Sent: Wednesday, September 11, 2019 11:05 PM
To: User cassandra.apache.org 
Subject: Update/where statement Adds Row
 
  
 
I have an update statement that has a where clause with the primary key 
(email,companyid).
 
  
 
When executed it always creates a new row. It’s like it’s not finding the 
existing row with the primary key.
 
  
 
I’m using Cassandra-driver.
 
  
 
What am I doing wrong? I don’t want a new row. Why doesn’t it seem to be using 
the where clause to identify the existing row?
 
  
 
Thanks,
 
Angel
 



Sent from Yahoo Mail for iPhone
 




RE: Update/where statement Adds Row

2019-09-11 Thread JOHN, BIBIN
Use if exists clause.

UPDATE table
SET column ='something'
WHERE key = ‘value’ IF EXISTS;





From: A 
Sent: Wednesday, September 11, 2019 11:05 PM
To: User cassandra.apache.org 
Subject: Update/where statement Adds Row

I have an update statement that has a where clause with the primary key 
(email,companyid).

When executed it always creates a new row. It’s like it’s not finding the 
existing row with the primary key.

I’m using Cassandra-driver.

What am I doing wrong? I don’t want a new row. Why doesn’t it seem to be using 
the where clause to identify the existing row?

Thanks,
Angel



Sent from Yahoo Mail for 
iPhone


Update/where statement Adds Row

2019-09-11 Thread A
I have an update statement that has a where clause with the primary key 
(email,companyid).
When executed it always creates a new row. It’s like it’s not finding the 
existing row with the primary key.
I’m using Cassandra-driver.
What am I doing wrong? I don’t want a new row. Why doesn’t it seem to be using 
the where clause to identify the existing row?
Thanks,Angel


Sent from Yahoo Mail for iPhone


nodetool rebuild on non-empty nodes?

2019-09-11 Thread Voytek Jarnot
Pardon the convoluted scenario, but we face some pretty ridiculous
infrastructure restrictions.

datacenter DC1: nodes containing many years of data written before
2019-09-01 (for example)

datacenter DC2: nodes containing data written after 2019-09-01

The idea is that these are independent clusters. We now connect them into a
multi-DC cluster, and alter our keyspace to replicate to both DCs.

What is the effect of running `nodetool rebuild -- DC1` on nodes in DC2? I
know we'll get that historical DC1 data, but my concern is about the new
data that had been written to the DC2 datacenter. Would the rebuild end up
dropping our post 2019-09-01 data?

Thanks,
Voytek Jarnot


Fwd: Cassandra Export error in COPY command

2019-09-11 Thread Hossein Ghiyasi Mehr
-- Forwarded message -
From: Hossein Ghiyasi Mehr 
Date: Sun, Sep 8, 2019 at 11:38 AM
Subject: Cassandra Export error in COPY command
To: 


Hi all members,
I want to export (pk, another_int_column) from single node using COPY
command. But after about 1h 45m, I've got a lot of read errors:

[image: image.png]

I tried this action many times but after maximum 2h, it failed with the
errors. cql timeout param is set correctly.

Any idea may help me!
Thanks.