Hsqlでpythonを使用したUDF
388 ワード
Author:杜七
1、Pythonのスクリプトを書く
データを処理するスクリプトを次のように書きます.
testに保存pyでは、/home/duqiなど、地元のどこにでも置きます.yc/scripts/python/
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/