Skip to Content
0
Oct 07 at 09:43 AM

SAP Data Intelligence Python3 Operator

217 Views Last edit Oct 07 at 11:52 AM 3 rev

Hi Everyone,

I am trying to read pickle file from SDL data lake but it seems unable to map with the input port.It works fine in the Jupyter notebook but unable to map the file to input port using python3 operator .

Here is the below error

Here is the python code

import pickle

import pandas as pd

import numpy as np

import re

import nltk

SVM = None

text = None

def on_input(data):

with open(data, 'rb') as data1:

SVM = pickle.load(data1)

data1.close()

api.send("output", str(SVM))

api.set_port_callback("input1", on_input)

I have even tried to set the input port as byte but it is not mapping therefore had to use string type for input port .Any thoughs as how to map the pickle file from DI_DATA_LAKE (SDL) to python opertor

Thanks

Attachments

errore.png (39.3 kB)