#!/usr/bin/python
import sys
for line in sys.stdin:
values = line.split('\t') #输入数据默认用\t分割
values = [ i.strip() for i in values ]
print values[0]+"-"+values[1],"\t","ok" #输出数据也要用\t分隔
添加脚本资源 add file demo.py
执行命令 select TRANSFORM(id ,age) using 'python demo.py' as a,b from t limit 5;