Skip to content

Instantly share code, notes, and snippets.

View thomasht86's full-sized avatar

Thomas Hjelde Thoresen thomasht86

View GitHub Profile
# /// script
# dependencies = [
# "certifi==2024.2.2",
# "cffi==1.16.0",
# "charset-normalizer==3.3.2",
# "cryptography==42.0.7",
# "idna==3.7",
# "pycparser==2.22",
# "pyOpenSSL==24.1.0",
# "requests==2.32.3",
@thomasht86
thomasht86 / read-flowfile-contents.py
Created May 25, 2018 05:12 — forked from ijokarumawak/read-flowfile-contents.py
Example Python script to use from NiFi ExecuteScript processor which reads the first line from an incoming flow file.
from org.apache.nifi.processors.script import ExecuteScript
from org.apache.nifi.processor.io import InputStreamCallback
from java.io import BufferedReader, InputStreamReader
class ReadFirstLine(InputStreamCallback) :
__line = None;
def __init__(self) :
pass