Step1: Run pyspark2teradataml with PySpark Script as Input - Step1: Run pyspark2teradataml with PySpark Script/Notebook as Input - Teradata Package for Python

Teradata® pyspark2teradataml User Guide

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
December 2024
ft:locale
en-US
ft:lastEdition
2024-12-18
dita:mapPath
oeg1710443196055.ditamap
dita:ditavalPath
ayr1485454803741.ditaval
dita:id
oeg1710443196055
Product Category
Teradata Vantage

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.