carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "anubhav tarar (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CARBONDATA-2132) Error while loading data with insert overwrite in partitioned table
Date Mon, 05 Feb 2018 10:46:00 GMT

     [ https://issues.apache.org/jira/browse/CARBONDATA-2132?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

anubhav tarar reassigned CARBONDATA-2132:
-----------------------------------------

    Assignee: anubhav tarar

> Error while loading data with insert overwrite in partitioned table
> -------------------------------------------------------------------
>
>                 Key: CARBONDATA-2132
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2132
>             Project: CarbonData
>          Issue Type: Bug
>          Components: data-load
>    Affects Versions: 1.3.0
>            Reporter: Vandana Yadav
>            Assignee: anubhav tarar
>            Priority: Minor
>         Attachments: 2000_UniqData.csv
>
>
> error while loading data with insert overwrite in partitioned table
> Steps to Reproduce:
> 1) Create a hive table:
> CREATE TABLE uniqdata_hive (CUST_ID int,CUST_NAME String,ACTIVE_EMUI_VERSION string,
DOB timestamp, DOJ timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1
decimal(30,10), DECIMAL_COLUMN2 decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,
INTEGER_COLUMN1 int)ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
> Load data into the table:
> LOAD DATA LOCAL INPATH '/opt/Carbon/CarbonData/TestData/Data/uniqdata/2000_UniqData.csv'
into table UNIQDATA_HIVE
> 2) Create Carbon table:
> CREATE TABLE uniqdata_string(CUST_NAME String,ACTIVE_EMUI_VERSION string,DOB timestamp,DOJ
timestamp, BIGINT_COLUMN1 bigint,BIGINT_COLUMN2 bigint,DECIMAL_COLUMN1 decimal(30,10),DECIMAL_COLUMN2
decimal(36,10),Double_COLUMN1 double, Double_COLUMN2 double,INTEGER_COLUMN1 int) PARTITIONED
BY(CUST_ID int) STORED BY 'org.apache.carbondata.format' TBLPROPERTIES ('TABLE_BLOCKSIZE'=
'256 MB')
> Load data into the table:
> LOAD DATA INPATH 'HDFS_URL/BabuStore/Data/uniqdata/2000_UniqData.csv' into table uniqdata_string
partition(CUST_ID='1111') OPTIONS('FILEHEADER'='CUST_ID,CUST_NAME ,ACTIVE_EMUI_VERSION,DOB,DOJ,
BIGINT_COLUMN1,BIGINT_COLUMN2,DECIMAL_COLUMN1,DECIMAL_COLUMN2,Double_COLUMN1, Double_COLUMN2,INTEGER_COLUMN1','BAD_RECORDS_ACTION'='FORCE')
> 3) Execute insert overwrite query:
> a) insert overwrite table uniqdata_string partition(CUST_ID='0000') select CUST_NAME,ACTIVE_EMUI_VERSION,DOB,doj,
bigint_column1, bigint_column2, decimal_column1, decimal_column2,double_column1, double_column2,integer_column1
from uniqdata_hive limit 10
> Actual Output: 
> Error: org.apache.spark.sql.AnalysisException: Partition spec is invalid. The spec (CUST_ID)
must be contained within the partition spec (cust_id) defined in table '`bug`.`uniqdata_string`';
(state=,code=0)
> b) insert overwrite table uniqdata_string partition(cust_id='3333') select CUST_NAME,ACTIVE_EMUI_VERSION,DOB,doj,
bigint_column1, bigint_column2, decimal_column1, decimal_column2,double_column1, double_column2,integer_column1
from uniqdata_hive limit 10
> Actual Output:
>  +---------+--+
> | Result |
> +---------+--+
> +---------+--+
> No rows selected (2.551 seconds)
> Expected Output: data should be inserted successfully in both case.(partition spec should
be case insensitive)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message