【发布时间】:2018-01-11 15:41:12
【问题描述】:
我一直在尝试在 NiFi 的 ExecuteScript 处理器中运行 python 脚本。虽然这里的问题是我没有服务器文件位置访问权限,并且所有 python 库都安装在“/data/jython”、“/data/jython/Lib/site-packages/”和“data/nltk”
下面是我的python脚本的导入部分:
import json, traceback, pycountry, requests, geocoder, re, sys, nltk
from nltk.sentiment.vader import SentimentIntensityAnalyzer
from nltk.corpus import stopwords
from java.nio.charset import StandardCharsets
from org.apache.commons.io import IOUtils
from org.apache.nifi.processor.io import StreamCallback
from org.python.core.util import StringUtil
我有什么遗漏吗?我参考了另一个答案here,但无法弄清楚我的代码有什么问题。
【问题讨论】:
标签: python apache-nifi