How to UPDATE a value in hive table?

I have a flag column in Hive table that I want to update after some processing. I have tried using hive and impala using the below query but it didn’t work, and got that it needs to be a kudu table …

In Hive, how to read through NULL / empty tags present within an XML using explode(XPATH(..)) function?

In below Hive-query, I need to read the null / empty “string” tags as well, from the XML content. Only the non-null “string” tags are getting considered within the XPATH() list now….

Hive: group by calculated column

I need to execute query like select myUsualField, SOME_FUNCTION(myAnotherField) as myUnusualField from MYTABLE group by myUsualField, myUnusualField In Hive this query fails: it cannot find field …

AWS Athena custom data format?

I’d like to query my app logs on S3 with AWS Athena but I’m having trouble creating the table/specifying the data format. This is how the log lines look: 2020-12-09T18:08:48.789Z {“reqid”:&…

SQL: Expression Not in GROUP BY Key

I have a transaction table t1 in Hive that looks like this: store_id cust_id zip_code transaction_count spend 1000 100 123 3 50 2000 200 …

Create Missing Data Hive SQL

I have a table that has an activity date of when things change such as 2020-08-13 123 Upgrade 2020-08-17 123 Downgrade 2020-08-21 123 Upgrade Basically this in relation to a line there are 3 …

how to select all the values in hive with distinct of 2 columns in hive

I have a hive table that looks like this (total 460 columns) colA colB ……. ce_id filename ……… dt v j 4 gg 40 v j 5 gg …

HIVE SQL: Select rows whose values contain string in a column

I want to select rows whose values contain a string in a column. For example, I want to select all rows whose values contain a string ‘123’ in the column ‘app’. table: app id 123helper …

Unable to run simple presto shell query

I am trying to run simplest query. However it is not working. -bash-4.2$ prestosql –execute “select 1;” Exception in thread “main” io.airlift.airline.ParseArgumentsUnexpectedException: Found …

Hive – find 2 characters anywhere in the string/row – RLIKE

How do I get the data for ONLY “_WA” data assigned to “USA_RBB_WA_BU”? However the column I look at has rows that contain _WA and _SA (USA_CA_SAWANT) I used, select…. …