RubiSpark is a feature within the code fusion on the Rubiscape platform for implementing Spark code. It operates as an independent node, meaning it cannot be connected to any predecessor, successor or reader nodes.
In the RubiSpark code editor, you can write your Spark code.
A sample code snippet is shown in the image below.
The table below explains the above code snippet.
Line of Code | Result |
df= spark.createDataFrame([('2015-04-08',200)],['Date','Sales']) | It creates a DataFrame with column names Date and Sales with respective values. |
df.show() | It will print the created DataFrame, which can be viewed in custom component log. |
Notes |
|
To write your custom code using RubiSpark, follow the steps given below.