We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the following error in the running of the following code from Chapter 3 (Structured Streaming)
streamingDataFrame = spark.readStream .schema(staticSchema) .option("maxFilesPerTrigger", 1) .format("csv") .option("header", "true") .load("/data/retail-data/by-day/*.csv")
NameError Traceback (most recent call last) in 2 #How many files read together is identified by maxFilesPerTrigger 3 streamingDataFrame = spark.readStream ----> 4 .schema(staticSchema) 5 .option("maxFilesPerTrigger", 1) 6 .format("csv")\
NameError: name 'staticSchema' is not defined
Can anyone guide me about it? I am running the code on Databricks community cluster.
Thanks,
The text was updated successfully, but these errors were encountered:
I think you are missing this:
staticDataFrame = spark.read.format("csv")\ .option("header", "true")\ .option("inferSchema", "true")\ .load("/data/retail-data/ by-day/*.csv") staticSchema = staticDataFrame.schema
For reference:
Chambers, Bill; Zaharia, Matei. Spark: The Definitive Guide: Big Data Processing Made Simple (p. 63). O'Reilly Media. Kindle Edition.
Sorry, something went wrong.
No branches or pull requests
I get the following error in the running of the following code from Chapter 3 (Structured Streaming)
in Python
streamingDataFrame = spark.readStream
.schema(staticSchema)
.option("maxFilesPerTrigger", 1)
.format("csv")
.option("header", "true")
.load("/data/retail-data/by-day/*.csv")
NameError: name 'staticSchema' is not defined
NameError Traceback (most recent call last)
in
2 #How many files read together is identified by maxFilesPerTrigger
3 streamingDataFrame = spark.readStream
----> 4 .schema(staticSchema)
5 .option("maxFilesPerTrigger", 1)
6 .format("csv")\
NameError: name 'staticSchema' is not defined
Can anyone guide me about it? I am running the code on Databricks community cluster.
Thanks,
The text was updated successfully, but these errors were encountered: