This post was updated on .
why there is table name option in carbon source format when we are alreday giving table name with create table command
here are the logs 0: jdbc:hive2://localhost:10000> CREATE TABLE testing2(String string)USING org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", "bucketcolumns"="String",tableName="testing1"); table that get created in hdfs is testing1 |
For Spark 2, when using SparkSession to create carbon table, need tableName option to create carbon schema in store location folder. Better to use CarbonSession to create carbon table now.
Best Regards
David Cai |
exactly my point if table name in create table statement and table name in
carbon source option is different consider this example 0: jdbc:hive2://localhost:10000> CREATE TABLE testing2(String string)USING org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", "bucketcolumns"="String",tableName=" testing1"); then the table which get created in hdfs is testing1 not testing testing2 it is quite confusing from user side On Wed, Jan 4, 2017 at 8:33 AM, QiangCai <[hidden email]> wrote: > For Spark 2, when using SparkSession to create carbon table, need > tableName > option to create carbon schema in store location folder. Better to use > CarbonSession to create carbon table now. > > > > -- > View this message in context: http://apache-carbondata- > mailing-list-archive.1130556.n5.nabble.com/why-there-is-a- > table-name-option-in-carbon-source-format-tp5385p5420.html > Sent from the Apache CarbonData Mailing List archive mailing list archive > at Nabble.com. > -- Thanks and Regards * Anubhav Tarar * * Software Consultant* *Knoldus Software LLP <http://www.knoldus.com/home.knol> * LinkedIn <http://in.linkedin.com/in/rahulforallp> Twitter <https://twitter.com/RahulKu71223673> fb <[hidden email]> mob : 8588915184 |
you can directly use the other sql create table command like in 1.6.
CREATE TABLE IF NOT EXISTS t3 (ID Int, date Timestamp, country String, name String, phonetype String, serialname char(10), salary Int) STORED BY 'carbondata' On 4 January 2017 at 10:02, Anubhav Tarar <[hidden email]> wrote: > exactly my point if table name in create table statement and table name in > carbon source option is different consider this example > > 0: jdbc:hive2://localhost:10000> CREATE TABLE testing2(String string)USING > org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", > "bucketcolumns"="String",tableName=" testing1"); > > then the table which get created in hdfs is testing1 not testing testing2 > it is quite confusing from user side > > On Wed, Jan 4, 2017 at 8:33 AM, QiangCai <[hidden email]> wrote: > > > For Spark 2, when using SparkSession to create carbon table, need > > tableName > > option to create carbon schema in store location folder. Better to use > > CarbonSession to create carbon table now. > > > > > > > > -- > > View this message in context: http://apache-carbondata- > > mailing-list-archive.1130556.n5.nabble.com/why-there-is-a- > > table-name-option-in-carbon-source-format-tp5385p5420.html > > Sent from the Apache CarbonData Mailing List archive mailing list archive > > at Nabble.com. > > > > > > -- > Thanks and Regards > > * Anubhav Tarar * > > > * Software Consultant* > *Knoldus Software LLP <http://www.knoldus.com/home.knol> * > LinkedIn <http://in.linkedin.com/in/rahulforallp> Twitter > <https://twitter.com/RahulKu71223673> fb <[hidden email]> > mob : 8588915184 > -- Thanks & Regards, Ravi |
ya but if user wanted to create table using carbon session and there is a
option of using tableName it is a kind of bug plus table name in options also allow to create table with spaces see logs CREATE TABLE Bug212(int string)USING org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", "bucketcolumns"="int","tableName"="t 100"); +---------+--+ | Result | +---------+--+ +---------+--+ table t 100 is there in hdfs this should not happened On Wed, Jan 4, 2017 at 12:56 PM, Ravindra Pesala <[hidden email]> wrote: > you can directly use the other sql create table command like in 1.6. > > CREATE TABLE IF NOT EXISTS t3 > (ID Int, date Timestamp, country String, > name String, phonetype String, serialname char(10), salary Int) > STORED BY 'carbondata' > > > On 4 January 2017 at 10:02, Anubhav Tarar <[hidden email]> > wrote: > > > exactly my point if table name in create table statement and table name > in > > carbon source option is different consider this example > > > > 0: jdbc:hive2://localhost:10000> CREATE TABLE testing2(String > string)USING > > org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", > > "bucketcolumns"="String",tableName=" testing1"); > > > > then the table which get created in hdfs is testing1 not testing testing2 > > it is quite confusing from user side > > > > On Wed, Jan 4, 2017 at 8:33 AM, QiangCai <[hidden email]> wrote: > > > > > For Spark 2, when using SparkSession to create carbon table, need > > > tableName > > > option to create carbon schema in store location folder. Better to use > > > CarbonSession to create carbon table now. > > > > > > > > > > > > -- > > > View this message in context: http://apache-carbondata- > > > mailing-list-archive.1130556.n5.nabble.com/why-there-is-a- > > > table-name-option-in-carbon-source-format-tp5385p5420.html > > > Sent from the Apache CarbonData Mailing List archive mailing list > archive > > > at Nabble.com. > > > > > > > > > > > -- > > Thanks and Regards > > > > * Anubhav Tarar * > > > > > > * Software Consultant* > > *Knoldus Software LLP <http://www.knoldus.com/home.knol> * > > LinkedIn <http://in.linkedin.com/in/rahulforallp> Twitter > > <https://twitter.com/RahulKu71223673> fb <[hidden email]> > > mob : 8588915184 > > > > > > -- > Thanks & Regards, > Ravi > -- Thanks and Regards * Anubhav Tarar * * Software Consultant* *Knoldus Software LLP <http://www.knoldus.com/home.knol> * LinkedIn <http://in.linkedin.com/in/rahulforallp> Twitter <https://twitter.com/RahulKu71223673> fb <[hidden email]> mob : 8588915184 |
hi,
CarbonSession match "STORED BY 'carbondata'", SparkSession will macth "USING org.apache.spark.sql.CarbonSource". Now SparkSession can not perfectly support carbon. better to try by @Ravindra's suggestion.
Best Regards
David Cai |
This post was updated on .
see this
this is the result of ravinders suggestion that he give me for unusual behavior of carbon thrift server 0: jdbc:hive2://localhost:10000> CREATE TABLE Bug212216(int STRING) stored by 'carbondata' OPTIONS("bucketnumber"="1", "bucketcolumns"="int","tablenName"="t100"); Error: java.lang.RuntimeException: [1.1] failure: identifier matching regex (?i)ALTER expected CREATE TABLE Bug212216(int STRING) stored by 'carbondata' OPTIONS("bucketnumber"="1", "bucketcolumns"="int","tablenName"="t100") ^ (state=,code=0) it doesnt work and even CREATE TABLE Bug221755914(int111 string) stored by 'carbondata'; +---------+--+ | Result | +---------+--+ +---------+--+ No rows selected (0.273 seconds) how does this work it cant be? |
In reply to this post by David CaiQiang
and my question for this post is that if i use carbonsource and create table like this
CREATE TABLE Bug211(int int)USING org.apache.spark.sql.CarbonSource OPTIONS("bucketnumber"="1", "bucketcolumns"="String","tableName"="t 100"); here table t 100 is created in hdfs if tablename and defaulttablename is different and even second thing how can table name have spaces t 100 |
Free forum by Nabble | Edit this page |