Jump to content

Spark cassandra doubt


Recommended Posts

Posted
3 hours ago, soodhilodaaram said:

primary key is unique, will alow only one record per key

you may have to check non unique primary key options in cassandra, i dont know cassandra..logically by data modelling thoughts

exactly , this is the solution 

cassandra row key should be unique, fixed it 

i was provoded a data feed without any primary key ,then i realised i cant make any key as row key,  then i asked my lead to specify the row key which was combination of two columns, i have changed the data frame logic on spark and loaded into cassandra 

Posted
6 hours ago, vendettaa said:

POC idi 

 

ante point of contact ana vanty...

Posted
1 hour ago, vendettaa said:

exactly , this is the solution 

cassandra row key should be unique, fixed it 

i was provoded a data feed without any primary key ,then i realised i cant make any key as row key,  then i asked my lead to specify the row key which was combination of two columns, i have changed the data frame logic on spark and loaded into cassandra 

akkai apice env lo afdb access ichada ne damager gadu .....

Posted
12 hours ago, vendettaa said:

Am trying to save dataframe into cassandra

so dataframe has 2000 records 

while saving to cassandra am able to save only one record 

for example 

dataframe is like below i.e dfout

emp_id   emp_score

1          12222 

1          33334

1           44556

1          89909

2         7889090

2     67788

2      55678

 

In cassandra i have table  as

 structuredstreaming.emp_1 (emp_id text,emp_score text,    PRIMARY KEY (emp_id)

below is the code for saving into cassandra from spark (dataframe)


dfout.write.format("org.apache.spark.sql.cassandra").mode("overwrite").option("confirm.truncate","true").option("spark.cassandra.connection.host","1000.000.00").
  option("spark.cassandra.connection.port","1111").option("keyspace","structuredstreaming").option("table"," emp_1").save()

with this code am able to save only one record per primary key in cassandra that is 

it is saving as 

emp_id emp_score

1              12222

2              67788

I want complete data frame into cassandra .how

??????

 structuredstreaming.emp_1 (emp_id text,emp_score text,    PRIMARY KEY (emp_id) ee line lone vundhi ga melika adhi sari cheyyi automatic ga set avtadi

Posted

2 hours lo self fix chesukune daniki malla thread okati edo Big data stack lo working ani chupinchatanika or inkemaina show off anukovala 

Posted
31 minutes ago, fake_Bezawada said:

2 hours lo self fix chesukune daniki malla thread okati edo Big data stack lo working ani chupinchatanika or inkemaina show off anukovala 

Afdb lo worthy menebers unnaru not just trollers like u 

past I got help from them ,technically they helped me in building data pipelines 

so better u stay away edo telsinattu show off nuvu chesindi chalu 

4 hours ago, jua_java said:

akkai apice env lo afdb access ichada ne damager gadu .....

Gmail ki access ledu gani diniki undi

i felt afdb messenger inka safe kode snipppets sharing and resolving ki

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...