RE: Get 100 items in Comma Separated strings from Hive Column.

2016-06-09 Thread Markovitz, Dudu
+ bug fix This version will differentiate between empty strings and strings with a single token (both have no commas) hive> select RowID,length(regexp_replace(stringColumn,'[^,]',''))+if(length(stringColumn)=0,0,1) as count from t; From: Markovitz, Dudu [mailto:dmarkov...@paypal.com] Sent: Fr

RE: Get 100 items in Comma Separated strings from Hive Column.

2016-06-09 Thread Markovitz, Dudu
+ Improvement The “Count” can be done in a cleaner way (The previous way works also with simple ‘replace’) hive> select RowID,length(regexp_replace(stringColumn,'[^,]',''))+1 as count from t; 1 2 2 5 3 24 4 17 5 8 6 1

Re: Where are jars stored for permanent functions

2016-06-09 Thread dhruv kapatel
In order to add it permanently recommended ways are as follows. 1. add in hive-site.xml hive.aux.jars.path file://localpath/yourjar.jar 2. Copy and paste the JAR file to the ${HIVE_HOME}/auxlib/ folder (create it if it does not exist). Source: Apache hive essentials b

Re: Where are jars stored for permanent functions

2016-06-09 Thread Jason Dere
Hive doesn't currently handle storing of the JARs. Doing ADD JAR only adds the jars to the current session, but won't help for other sessions. The permanent functions syntax allows you to specify JAR paths when you create the function. These should be on HDFS or other non-local path. create fu

RE: Get 100 items in Comma Separated strings from Hive Column.

2016-06-09 Thread Markovitz, Dudu
-- bash mkdir t cat>t/data.txt 1|44,85 2|56,37,83,68,43 3|33,48,42,18,23,80,31,86,48,42,37,52,9

Re: Hive Table Creation failure on Postgres

2016-06-09 Thread Mich Talebzadeh
Well I know that the script works fine for Oracle (both base and transactional). Ok this is what this table is in Oracle. That column is 256 bytes. [image: Inline images 2] HTH Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

Hive Table Creation failure on Postgres

2016-06-09 Thread Siddhi Mehta
Hello Everyone, We are using postgres for hive persistent store. We are making use of the schematool to create hive schema and our hive configs have table and column validation enabled. While trying to create a simple hive table we ran into the following error. Error: Error while processing sta

Get 100 items in Comma Separated strings from Hive Column.

2016-06-09 Thread Mahender Sarangam
Hi, We have hive table which has a single column with more than 1000 comma separated string items. Is there a way to retrieve only 100 string items from that Column. Also we need to capture number of comma separated string items. We are looking for more of "substring_index" functionality, si

SMB join VS SMB Map Join?

2016-06-09 Thread Rohit Kumar Prusty
Hi All, I have a basic questions on the Hive joins. What is the core difference between SMB join and SMB Map Join? Any pictorial representation will be a real help. Regards Rohit Kumar Prusty +91-9884070075

Re: Delete hive partition while executing query.

2016-06-09 Thread Igor Kuzmenko
I've opened jira issue On Wed, Jun 8, 2016 at 9:01 PM, Eugene Koifman wrote: > This looks like proof of a bug. The reads locks 179730 and 179731 should > have been blocked by 179729. > As Alan said this won’t prevent the exception you are getti

RE: LINES TERMINATED BY only supports newline '\n' right now

2016-06-09 Thread Markovitz, Dudu
I’ve checked “sentences” source code. It turns out it is using BreakIterator.getSentenceInstance to break the text to sentences. Apparently ‘\n’ is not considered as a sentence separator nor ‘.’, but ‘?’ and ‘!’ does. Dudu hive> select id,name,sentences(regexp_replace (lyrics,'\n','?')) from s

Re: Using Hive table for twitter data

2016-06-09 Thread Gopal Vijayaraghavan
> Any reason why that table in Hive cannot read data in? No idea how you're loading data with flume, but it isn't doing it right. >> PARTITIONED BY (datehour INT) ... >> -rw-r--r-- 2 hduser supergroup 433868 2016-06-09 09:52 >>/twitter_data/FlumeData.1465462333430 No ideas on how to get

Re: Using Hive table for twitter data

2016-06-09 Thread Mich Talebzadeh
thanks Gopal that link 404 - OOPS! Looks like you wandered too far from the herd! LOL Any reason why that table in Hive cannot read data in? cheers Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=AAEWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

Re: Using Hive table for twitter data

2016-06-09 Thread Gopal Vijayaraghavan
> Has anyone done recent load of twitter data into Hive table. Not anytime recently, but the twitter corpus was heavily used to demo Hive. Here's the original post on auto-learning schemas from an arbitrary collection of JSON docs (like a MongoDB dump). http://hortonworks.com/blog/discovering-h

Using Hive table for twitter data

2016-06-09 Thread Mich Talebzadeh
Hi, I am just exploring this. Has anyone done recent load of twitter data into Hive table. I used few of them. This one I tried ADD JAR /home/hduser/jars/hive-serdes-1.0-SNAPSHOT.jar; --SET hive.support.sql11.reserved.keywords=false; use test; drop table if exists tweets; CREATE EXTERNAL TABLE

RE: Need Your Inputs For Below Scenario

2016-06-09 Thread Markovitz, Dudu
Explode + joins -- bash mkdir t1 mkdir t2 cat>t1/data.txt A B1 B2B4

RE: LINES TERMINATED BY only supports newline '\n' right now

2016-06-09 Thread Markovitz, Dudu
Partial success after few more trials and errors – 1. “insert into … values (),(),…,()” doesn’t work right in any case “insert into … values (); insert into … values ();…;insert into … values();” works only with textinputformat.record.delimiter changed. Insert into … select … union all select … w

RE: LINES TERMINATED BY only supports newline '\n' right now

2016-06-09 Thread Markovitz, Dudu
Same issues. Dudu From: abhishek [mailto:ec.abhis...@gmail.com] Sent: Thursday, June 09, 2016 9:23 AM To: user@hive.apache.org Subject: Re: LINES TERMINATED BY only supports newline '\n' right now Did you try defining the table with hive In built SerDe. 'Stored as ORC' This should resolve your