We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We'll have to translate this to Python:
val duplicates = df .select(<pk cols>) .withColumn("__file_path", col("_metadata.file_path")) .withColumn("__row_index", col("_metadata.row_index")) .withColumn( "rank", row_number().over( Window() .partitionBy(<pk cols>) .orderBy(<pk cols>))) .filter("rank > 1") .drop("rank")
And then:
df.alias("old") .merge( duplicates.alias("new"), "old.<pk1> = new.<pk1> AND ... AND old.<pkn> = new.<pkn>" + " AND old._metadata.file_path = new.__file_path" + " AND old._metadata.row_index = new.__row_index") .whenMatchedDelete() .execute()
The text was updated successfully, but these errors were encountered:
Where is the row_index property documented?
Sorry, something went wrong.
Ahh, found it! ;) https://issues.apache.org/jira/browse/SPARK-37980
No branches or pull requests
We'll have to translate this to Python:
And then:
The text was updated successfully, but these errors were encountered: