Create Spark code