MicrosoftLearning / mslearn-fabric

This repository hosts content related to Microsoft Fabric content on Microsoft Learn.
https://microsoftlearning.github.io/mslearn-fabric/
MIT License
164 stars 128 forks source link

Additional Spaces #123

Closed thomasthaddeus closed 5 months ago

thomasthaddeus commented 5 months ago

Module: Analyze data with Apache Spark

Lab/Demo: 02

Task: Load data into a dataframe

Step: 09

Description of issue

The code class is the wrong code class as all the rest of the python blocks use language-Python not language-python

Repro steps:

  1. this is how it shows up in the html which is not how it is written in the markdown
    <pre><code class="language-python"> from pyspark.sql.types import *

 orderSchema = StructType([
    StructField("SalesOrderNumber", StringType()),
    StructField("SalesOrderLineNumber", IntegerType()),
    StructField("OrderDate", DateType()),
    StructField("CustomerName", StringType()),
    StructField("Email", StringType()),
    StructField("Item", StringType()),
    StructField("Quantity", IntegerType()),
    StructField("UnitPrice", FloatType()),
    StructField("Tax", FloatType())
    ])

 df = spark.read.format("csv").schema(orderSchema).load("Files/orders/*.csv")
 display(df)
</code></pre>

1. 1.

thomasthaddeus commented 5 months ago

Must have deleted the part about how because it is the wrong class, it seems to be adding an extra space to the front of all the text in the block

AngieRudduck commented 5 months ago

Hi @thomasthaddeus can you please confirm how you interacted with the instructions? You mention wrong class, and I want to understand if you had issues using the copy/paste from instructions on GitHub or if you had issues with a TypeText feature in a hosted VM, etc. Thanks in advance!

afelix-95 commented 5 months ago

Hi @thomasthaddeus perhaps you were interacting with the .md file in Code mode instead of Preview? Those extra spaces are for fixing an issue with leading spaces in Preview mode or HTML and should not be a problem when you copy the code block from those. Also, enabling syntax highlighting can be done with either Python or python without any differences in the output. So, for best learning experience I'd recommend doing the lab through its HTML version at https://microsoftlearning.github.io/mslearn-fabric/Instructions/Labs/02-analyze-spark.html

thomasthaddeus commented 5 months ago

@afelix-95 its still an issue both of these are the same as they were before. I'm looking at the html, the first one is the block i mentioned, the second one is a different block that doesnt have leading spaces.

image

image

Heres the code in the sources for both of the previous snapshots.

image

image

afelix-95 commented 5 months ago

@thomasthaddeus Thank you for the screenshots and further clarification. Looking again at the code, there was indeed an indentation mistake in the code block of your first screenshot that is omitted in Preview mode but not in the HTML page. It is fixed now.