In this step, import the pyspark2teradataml utility function from teradatamlspk package, then pass the PySpark script/notebook or a directory containing PySpark scripts as input to the function.
Utility function generates the Python script/notebook with teradatamlspk syntax and an HTML report for the conversion.
How to run pyspark2teradataml
>>> from teradatamlspk import pyspark2teradataml
>>> pyspark2teradataml('/tmp/pyspark_script.py')
Python script '/tmp/pyspark_script.py' converted to '/tmp/pyspark_script_tdmlspk.py' successfully. Script conversion report '/tmp/pyspark_script_tdmlspk.html' published successfully.