by Diego Calvo | Jul 20, 2018 | Apache Spark, Big Data, Scala-example
Displays a number of examples of file compression and decompression in different formats of both rendering and Compression. Compress Json Files val rdd = sc.parallelize( Array(1, 2, 3, 4, 5) ) // Define RDD val df = rdd.toDF() // df transform... by Diego Calvo | Jun 22, 2018 | Scala-example
Function without parameters Simple Scala function Example def hello_world() = { println (“Hello world!”) } Hello world! Function with parameters Example of a scalar function that supports parameters def sum_data(x: Int = 2, y: Int = 3): Int = { x +... by Diego Calvo | Jun 22, 2018 | Apache Spark, Big Data, Scala-example
IF Example of conditional use where it determines whether a note is approved or suspense var x = 6 if (x > = 5) { println (“approved”) } else {} println (“Substeno”) } X: Int = 6 Approved FOR Example of using “for” where... by Diego Calvo | Nov 23, 2017 | Apache Spark, Neo4J Data Base, Python-example, R-example, Scala-example
Comparison of programming languages