我正在尝试在Jython中创建一个过程,以创建并填充带有一些信息的新文本文件。顺便说一下,我尝试使用ODI安装中打包的jython.jar脚本,效果很好。
在我的过程中使用ODI "Run..."
命令时,出现错误或什么也没有发生。这是我尝试使用 ODI Studio :
# [NOTHING HAPPENS] In operator tab, is marked OK
#try:
# ubicIdList = open("C:\\apps\\dataflow\\nas\\CANS\\ent\\Test1.txt", "w+")
# ubicIdList.write("ASDF1")
# ubicIdList.close()
#except:
# raise 'Error 1'
# [ERROR] File Permission
#try:
# ubicIdList = open("C:/apps/dataflow/nas/CANS/ent/Test2.txt", "w+")
# ubicIdList.write("ASDF2")
# ubicIdList.close()
#except:
# raise 'Error 2'
# [ERROR] File Permission
#try:
# ubicIdList = open("/apps/dataflow/nas/CANS/ent/Test3.txt", "w+")
# ubicIdList.write("ASDF3")
# ubicIdList.close()
#except:
# raise 'Error 3'
# [NOTHING HAPPENS] In operator tab, is marked OK
#try:
# ubicIdList = open("C:\apps\dataflow\nas\CANS\ent\Test4.txt", "w+")
# ubicIdList.write("ASDF4")
# ubicIdList.close()
#except:
# raise 'Error 4'
当我从文件夹中使用jython.jar运行此脚本时,只会得到打印错误“ Error 4”,并且其他3个文件已成功创建。
Jython.jar版本为 Jython 2.5.1(Release_2_5_1:6813)