While running this query from spark phoenix connector:

select distinct(C_TXN.CUSTMR_ID) from CUS_TXN where (CUS_TXN.TXN_TYPE='xxxx') 
and (substr(CUS_TXN.ROW_KEY,0,8)>='20160101') group by CUS_TXN.CUSTMR_ID having 
sum(CUS_TXN.TXN_AMOUNT)>=300 union all select distinct(CUS_TXN.CUSTMR_ID) from 
CUS_TXN where (CUS_TXN.TXN_TYPE='yyyy') and 
(substr(CUS_TXN.ROW_KEY,0,8)>='20160101') group by CUS_TXN.CUSTMR_ID having 
sum(CUS_TXN.TXN_AMOUNT)>100



getting below exception:

Getting some phoenix exception for below query:
java.lang.RuntimeException: org.apache.phoenix.exception.PhoenixIOException: 
Table 'unionSchemaName.unionTableName' was not found, got: hbase:namespace.
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at org.apache.phoenix.mapreduce.PhoenixRecordReader.initialize(Phoen



my code for fetching records is:

PhoenixConfigurationUtil.setInputTableName(configuration , TABLE_NAME);
PhoenixConfigurationUtil.setOutputTableName(configuration ,TABLE_NAME);
PhoenixConfigurationUtil.setInputQuery(configuration, QueryToRun);
PhoenixConfigurationUtil.setInputClass(configuration, DataRecord.class);

configuration.setClass(JobContext.OUTPUT_FORMAT_CLASS_ATTR,PhoenixOutputFormat.class,
 OutputFormat.class);

@SuppressWarnings("unchecked")
JavaPairRDD<NullWritable, DataRecord> stocksRDD = jsc.newAPIHadoopRDD(
configuration,
PhoenixInputFormat.class,
NullWritable.class,
DataRecord.class);


Regards,
Parveen Jain




Any pointer why this could be happening.


Regards,

Parveen Jain

Reply via email to