Group By Statement within HQL - hql

I'm doing a simple pull from an HQL database. Gives me an error only when I attempt to incorporate the GROUP BY statement
select
element1
,element2
,max(element3) as maxelement3
from HQLdb.HQLtable
group by element1,element2
Error message that I receive:
SELECT Failed. 35: (35) Error from server: error code: '1' error
message: 'Error while processing statement: FAILED: Execution Error,
return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

Related

Why does Laravel give error in SQL query?

If this query is executed in my database directly:
select * from `account_transactions`
where `AT_createuser` = 4 group by `AT_transactionficheno`
But this returns en error:
Transactions::with('type')->where('AT_createuser', JWTAuth::user()->id)
->groupBy('AT_transactionficheno')->get();
Error is:
SQLSTATE[42000]: Syntax error or access violation: 1055
'fee.account_transactions.AT_id' isn't in GROUP BY (SQL: select * from
account_transactions where AT_createuser = 4 group by
AT_transactionficheno)
try to go to config/database.php
on mysql > strict => false

Map Side join fails with return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask

I am trying to perform map-side joins in hive, but it keeps failing with the following message
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.mr.MapredLocalTask
The queries that I run are as follows
set hive.auto.convert.join=true;
select a.customer_id , b.order_id from customers_sample a JOIN orders_map b on a.customer_id=b.order_customer_id;
I am trying these queries in cloudera-quickstart-vm-5.12.0
Could someone please help me with what's missing here.

Hive Query FAILED: ParseException line cannot recognize input near '(' 'WITH' 'DATA_SET' in select clause

I get a failure upon compiling a Hive View query using "WITH" Clause in the select statement. Below is the same view which I try to create and I encounter the error.
create view test_view as(
with data_set as
(select * from test_data )
select * from data_set
) ;
Error - Error while compiling statement: FAILED: ParseException line 1:24 cannot recognize input near '(' 'with' 'data_set' in select
clause
Please help.
Issue is due to the bracket :)
once I remove the bracket from after create view view_name as (*.. it stated working...

hql query gives an error

I try to execute this query in hql
SELECT
t.retweeted_screen_name,
sum(retweets) AS total_retweets,
count(*) AS tweet_count
FROM (SELECT
retweeted_status.user.screen_name as retweeted_screen_name,
retweeted_status.text,
max(retweet_count) as retweets
FROM tweets
GROUP BY retweeted_status.user.screen_name,
retweeted_status.text) t
GROUP BY t.retweeted_screen_name
ORDER BY total_retweets DESC
LIMIT 10;
But I'm getting this error:
Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
Anyone can help me to fix this?
I think you need write sum(t.retweets) AS total_retweets, instead of sum(retweets) AS total_retweets,

Error querying database. Cause: java.lang.NullPointerException: QProfile is missing

I'm trying to restart SonarQube and ran into an issue with the QProfile is missing but I'm not sure what to do to address this.
2015.07.06 12:50:31 ERROR [o.s.s.p.PlatformServletContextListener] Fail to start server
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.NullPointerException: QProfile is missing
### The error may exist in org.sonar.core.qualityprofile.db.ActiveRuleMapper
### The error may involve org.sonar.core.qualityprofile.db.ActiveRuleMapper.selectAllKeysAfterTimestamp-Inline
### The error occurred while setting parameters
### SQL: SELECT r.plugin_rule_key as "rulefield", r.plugin_name as "repository", qp.kee as "profileKey" FROM active_rules a LEFT JOIN rules_profiles qp ON qp.id=a.profile_id LEFT JOIN rules r ON r.id = a.rule_id WHERE a.updated_at IS NULL or a.updated_at >= ?
### Cause: java.lang.NullPointerException: QProfile is missing

Resources