I have the following data below:
+-------+----------+------------+---------+---------------------+-----------+
|id |resource id|resource name|event-desc|event-date |ipaddress1 |
+-------+----------+------------+---------+---------------------+-----------+
|2010001|119 |Netopia |logout |+56975-05-07 23:01:37|25:34:21:44|
|2010001|119 |Netopia |login |+56975-05-07 23:01:37|25:34:21:44|
|2010001|119 |Netopia |logout |+56975-05-07 23:01:37|25:34:21:45|
|2010001|119 |Netopia |login |+56975-05-07 23:01:37|25:34:21:45|
|2010001|119 |Netopia |logout |+56975-05-07 23:01:37|25:34:21:44|
|2010001|119 |Netopia |logout |+56975-05-07 23:01:37|25:34:21:46|
+-------+----------+------------+---------+---------------------+-----------+
I need to apply multiple filters to same dataset and pass to Kafka.
Dataset<Row> mainData=df.select( "data.*").filter("data.eventdesc='logout'");
Send the filtered data to kafka, again there will be another filter condition.
mainData=df.select( "data.*").filter("data.eventdesc='login'");
send the data to kafka.
In this case only the last expression is working. Any suggestions on how I can filter data for both of the conditions and send to kafka?