I am new to Python, so it might be something obvious. I am trying to do some transformation on a string variables (or even literals), but any function I use fails with:
com.incorta.api.exceptions.DataException: INC_03070101: Transformation error [Error An error occurred while calling o74.getnewargs. Trace: py4j.Py4JException: Method getnewargs([]) does not exist ('Py4JError', ':', Py4JError(u'An error occurred while calling o74.getnewargs. Trace:\npy4j.Py4JException: Method getnewargs([]) does not exist\n\tat py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318)\n\tat py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326)\n\tat py4j.Gateway.invoke(Gateway.java:274)\n\tat py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)\n\tat py4j.commands.CallCommand.execute(CallCommand.java:79)\n\tat py4j.GatewayConnection.run(GatewayConnection.java:238)\n\tat java.lang.Thread.run(Thread.java:750)\n\n',))
Spark version 2.4.7
Sample code:
from pyspark.sql.functions import substring
objectName = substring("fullFieldString", 1, 4)