How to translate Apache Pig FILTER statement to Spark?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2021 09:52 AM
If you have the following Apache Pig FILTER statement:
XCOCD_ACT_Y = FILTER XCOCD BY act_ind == 'Y';the equivalent code in Apache Spark is:
XCOCD_ACT_Y_DF = (XCOCD_DF
.filter(col("act_ind") == "Y"))
Labels:
- Labels:
-
Apache spark
-
ApachePig
-
Pyspark