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 (Created) (JIRA)" <ji...@apache.org> on 2012/03/09 20:08:57 UTC
[jira] [Created] (PIG-2577) UDF :To take first three digit(leading
digit) from a column
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
[jira] [Commented] (PIG-2577) UDF :To take first three
digit(leading digit) from a column
Posted by "Prashant Kommireddi (Commented) (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Commented] (PIG-2577) UDF :To take first three
digit(leading digit) from a column
Posted by "vaibhav (Commented) (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (PIG-2577) UDF :To take first three digit(leading
digit) from a column
Posted by "Prashant Kommireddi (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prashant Kommireddi resolved PIG-2577.
--------------------------------------
Resolution: Invalid
> 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