You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "vaibhav (Commented) (JIRA)" <ji...@apache.org> on 2012/03/11 09:57:59 UTC

[jira] [Commented] (PIG-2577) UDF :To take first three digit(leading digit) from a column

    [ https://issues.apache.org/jira/browse/PIG-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13227020#comment-13227020 ] 

vaibhav commented on PIG-2577:
------------------------------

please tell me any UDF for it ??
                
> 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