vendettaa Posted January 22, 2019 Report Posted January 22, 2019 I have data frame in scala trying to save it into cassandra where column data type in cassandra is Map<text,text> . So when i try to save it am getting error as type mismatch val df_m=spark.sql( """select concat('{',"v_id'',':',v_id,',',''model_score'',':',model_score,',',''reserved3'',':',nvl(reserved3,'NULL'),'}') |as insight_meta_data from model_scores """.stripMargin) Result is {v_id:8888,v_score:9999,reserved3:Null}, i need result to be saved as {v_id:8888,v_score:9999,reserved3:Null} how i can save this string into data type: Map<text,text> in cassandra Quote
MuPaGuNa Posted January 22, 2019 Report Posted January 22, 2019 vanty nuvvu client location lo pani chesthunnava..db lo pani chesthunnava intlo practice chesukuntunnava ... Quote
vendettaa Posted January 22, 2019 Author Report Posted January 22, 2019 22 minutes ago, MuPaGuNa said: vanty nuvvu client location lo pani chesthunnava..db lo pani chesthunnava intlo practice chesukuntunnava ... pakakelli yeduv Quote
jefferson1 Posted January 23, 2019 Report Posted January 23, 2019 21 minutes ago, vendettaa said: pakakelli yeduv Ikkada evariki nee subject Radu anukunta better try in forums Quote
pachimirchi Posted January 23, 2019 Report Posted January 23, 2019 try with quotes around key/value Quote
MuPaGuNa Posted January 23, 2019 Report Posted January 23, 2019 28 minutes ago, vendettaa said: pakakelli yeduv pakkakkelladam varaku ok, edavadam enduku... Quote
vendettaa Posted January 23, 2019 Author Report Posted January 23, 2019 issue fixed , evaru help cheyaru nene cheskovali kasta stack over flow baga search cheskuni Quote
vendettaa Posted January 23, 2019 Author Report Posted January 23, 2019 4 minutes ago, pachimirchi said: try with quotes around key/value adi kadu solution Quote
k2s Posted January 23, 2019 Report Posted January 23, 2019 1 hour ago, vendettaa said: I have data frame in scala trying to save it into cassandra where column data type in cassandra is Map<text,text> . So when i try to save it am getting error as type mismatch val df_m=spark.sql( """select concat('{',"v_id'',':',v_id,',',''model_score'',':',model_score,',',''reserved3'',':',nvl(reserved3,'NULL'),'}') |as insight_meta_data from model_scores """.stripMargin) Result is {v_id:8888,v_score:9999,reserved3:Null}, i need result to be saved as {v_id:8888,v_score:9999,reserved3:Null} how i can save this string into data type: Map<text,text> in cassandra type mismatch means expected output is not what it is. ex: result is stream and your expected output is Boolean Quote
gillette Posted January 23, 2019 Report Posted January 23, 2019 Just now, k2s said: type mismatch means expected output is not what it is. ex: result is stream and your expected output is Boolean masthu coding skills unnayi sumi neeku Quote
pachimirchi Posted January 23, 2019 Report Posted January 23, 2019 4 minutes ago, vendettaa said: adi kadu solution my bad!! already quotes vunnai ga code lo. What was the issue? Quote
vendettaa Posted January 23, 2019 Author Report Posted January 23, 2019 20 minutes ago, k2s said: type mismatch means expected output is not what it is. ex: result is stream and your expected output is Boolean Expected output Map data type not Boolean Quote
k2s Posted January 23, 2019 Report Posted January 23, 2019 16 minutes ago, vendettaa said: Expected output Map data type not Boolean Read my reply again. Thondara patu antey idey mari Quote
Amy99 Posted January 23, 2019 Report Posted January 23, 2019 1 hour ago, vendettaa said: issue fixed , evaru help cheyaru nene cheskovali kasta stack over flow baga search cheskuni ela annav ante...intlo mommy.. pani antha nene cheskovali evvaru help cheyaru naku ani intlo vallani annatlu annav ... 😁😁 2 Quote
vendettaa Posted January 23, 2019 Author Report Posted January 23, 2019 51 minutes ago, k2s said: Read my reply again. Thondara patu antey idey mari type mismatch ani yepdo telsu , but doubt scala lo rasina dataframe ni cassandra lo map data type ki ela save cheydam Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.