美文网首页
Hsql中使用python的UDF

Hsql中使用python的UDF

作者: 杜七 | 来源:发表于2015-10-21 13:41 被阅读0次

Author:杜七


1,写一个Python的脚本

先写一个处理数据的脚本,如下:

#!/home/tops/bin/python

import sys

def main():
    try:
            for line in sys.stdin:
                    n = line.strip()
                    print n
    except:
            return None

if __name__ == "__main__":
    main()

保存到test.py中,放在本地的任何地方,比如/home/duqi.yc/scripts/python/

相关文章

网友评论

      本文标题:Hsql中使用python的UDF

      本文链接:https://www.haomeiwen.com/subject/dlqthttx.html