Category: Create an Azure Stream Analytics Job

Implement Partitioning – The Storage of Data-2

Implement Partitioning – The Storage of Data-2

%%pysparkdf = spark.read \  .load(‘abfss://[email protected]/SessionCSV/…ODE_FREQUENCY_VALUE.csv’, \         format=’csv’, header=True)df.write \ .partitionBy(‘SCENARIO’).mode(‘overwrite’).csv(‘/SessionCSV/ScenarioPartitions’)data = spark.read.csv(‘/SessionCSV/ScenarioPartitions/SCENARIO=PlayingGuitar’)data.show(5) The code snippet is available in the Chapter04/Ch04Ex02 directory on GitHub, in a file named partitionSpark.txt. The output resembles Figure 4.4. FIGURE 4.4…