[
https://issues.apache.org/jira/browse/PIG-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227022#comment-13227022
]
Prashant Kommireddi commented on PIG-2577:
------------------------------------------
Hi Vaibhav,
This seems like a specific use-case. Please post these questions on Pig Users
Mailing list and someone would be able to suggest solutions. JIRA is more of a
place to suggest improvements, new features, bugs...
For this problem, if you are reading from a file you could possibly do a
SUBSTRING on these values. Let's take this to the mailing list in any case.
> UDF :To take first three digit(leading digit) from a column
> ------------------------------------------------------------
>
> Key: PIG-2577
> URL: https://issues.apache.org/jira/browse/PIG-2577
> Project: Pig
> Issue Type: Test
> Reporter: vaibhav
>
> i have a input file in this NUMBER length is four,five upto fiftheen , i want
> to take leading three digit of all these number after that some pig script. i
> have to sort those number start with 805,811,715 like that, so i want first
> three digit.
> Can you please provide me any UDF or CUSTOM UDF that will do this easily.
> input:
> MSISDN
> 565625
> 456
> 9656
> 98569895
> 69369520256526
> 15698456
> 45654
> 232695888
> 8590126509
> ouput:
> 565
> 456
> 965
> 985
> 693
> 156
> 456
> 232
> 859
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira