Scala ingest code