Skoky Skoky - 1 year ago 211
Scala Question

Spark scala Dataframe isin

I have a Spark Dataframe that contains Array[Byte]. Can I use

for matching data against my Array[Byte]? If i try to use it like this:


it does not match as the
does not format the byte array to
properly. Any idea how to fix this?

Answer Source

You can convert Array[Byte] to Java String, then you can match this with isin(whitelist:_*) if your white list List<String>

As per documentation, isin method accepts java.lang.object or Seq(java.lang.object)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download