Curățarea datelor cu PySpark
Mike Metzger
Data Engineering Consultant
Câmpuri ID obișnuite:
| id | prenume | nume | stat |
|---|---|---|---|
| 0 | Smith | John | TX |
| 1 | Wilson | A. | IL |
| 2 | Adams | Wendy | OR |
pyspark.sql.functions.monotonically_increasing_id()
| id | prenume | nume | stat |
|---|---|---|---|
| 0 | Smith | John | TX |
| 134520871 | Wilson | A. | IL |
| 675824594 | Adams | Wendy | OR |
Atenție, Spark este leneș!
Curățarea datelor cu PySpark