'AWS Glue Studio Custom Transform Data Preview error: illegal start of simple pattern


I'm building simple test pipeline in AWS Glue Studio with Glue 3.0 using Scala. I'm trying to run code described in documentation: https://docs.aws.amazon.com/glue/latest/ug/transforms-custom.html#scala
The only change introduced by me is change of object name and usage of column that I have in my DynamicFrame. My code is:
object AndrzejTransform {
  def execute(glueContext : GlueContext, input : Seq[DynamicFrame]) : Seq[DynamicFrame] = {
    val frame = input(0).toDF()
    val filtered = DynamicFrame(frame.filter(frame("bags_number") > 9), glueContext)
    Seq(filtered)
  }
}

when I try to run "Data Preview" on the component I'm getting "illegal start of simple pattern" error: enter image description here

When I run the job, it finish successfully. Any idea what can I do to make "Data Preview" functionlity working correctly on "Custom Transform" component?

Thanks in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source