Last active
July 16, 2020 13:12
-
-
Save nsivabalan/fbb81f46fe7ba52fc4bf76a11fa348b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.apache.hudi.utilities.transform; | |
import org.apache.hudi.common.config.TypedProperties; | |
import org.apache.spark.api.java.JavaSparkContext; | |
import org.apache.spark.sql.Dataset; | |
import org.apache.spark.sql.Row; | |
import org.apache.spark.sql.SparkSession; | |
import org.apache.spark.sql.functions; | |
import org.apache.spark.sql.types.DataTypes; | |
public class DeleteTransformer implements Transformer { | |
@Override | |
public Dataset<Row> apply(JavaSparkContext jsc, SparkSession sparkSession, Dataset<Row> rowDataset, | |
TypedProperties properties) { | |
return rowDataset.withColumn("_hoodie_is_deleted", functions.lit("true").cast(DataTypes.BooleanType)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment