'DataFrame' object has no attribute 'sql' [on hold]2019 Community Moderator ElectionHow do I set/get heap size for Spark (via Python notebook)Spark DataFrame coursesRDD of gziped files to “uncompressed” DataframeDataframe request with groupBySpark SQL Pivot CrossTab functionalityPlot RDD data using a pyspark dataframe from csv filePySpark dataframe repartitionAdding multiple columns to spark dataframeSpark DataFrame Limit Function Takes Too Much Time to ShowHow to store dataframe result into text file?

Everything Bob says is false. How does he get people to trust him?

How to be diplomatic in refusing to write code that breaches the privacy of our users

Applicability of Single Responsibility Principle

Do I need a multiple entry visa for a trip UK -> Sweden -> UK?

Increase performance creating Mandelbrot set in python

Is there a problem with hiding "forgot password" until it's needed?

How to verify if g is a generator for p?

Opposite of a diet

Cynical novel that describes an America ruled by the media, arms manufacturers, and ethnic figureheads

There is only s̶i̶x̶t̶y one place he can be

How does it work when somebody invests in my business?

Bash method for viewing beginning and end of file

I'm in charge of equipment buying but no one's ever happy with what I choose. How to fix this?

Are there any comparative studies done between Ashtavakra Gita and Buddhim?

Best way to store options for panels

when is out of tune ok?

What defines a dissertation?

Why "be dealt cards" rather than "be dealing cards"?

Is there a good way to store credentials outside of a password manager?

How was Earth single-handedly capable of creating 3 of the 4 gods of chaos?

Finding all intervals that match predicate in vector

Implement the Thanos sorting algorithm

Star/Wye electrical connection math symbol

Was the picture area of a CRT a parallelogram (instead of a true rectangle)?



'DataFrame' object has no attribute 'sql' [on hold]



2019 Community Moderator ElectionHow do I set/get heap size for Spark (via Python notebook)Spark DataFrame coursesRDD of gziped files to “uncompressed” DataframeDataframe request with groupBySpark SQL Pivot CrossTab functionalityPlot RDD data using a pyspark dataframe from csv filePySpark dataframe repartitionAdding multiple columns to spark dataframeSpark DataFrame Limit Function Takes Too Much Time to ShowHow to store dataframe result into text file?










0












$begingroup$


I have compiled the following code in Databricks written in spark.sql. I'm getting an AttributeError: 'DataFrame' object has no attribute 'sql'



The code is as follows:



purchaseByCustomerPerHour = streamingDataFrame.sql("""SELECT
retail_data.CustomerID
,retail_data.InvoiceDate AS window
,SUM(retail_data.UnitPrice * retail_data.Quantity) AS total_cost
FROM retail_data
GROUP BY retail_data.CustomerID
,retail_data.InvoiceDate
,retail_data.UnitPrice""")


Normally, I would write the first line of code as follows:



purchaseByCustomerPerHour = spark.sql


However, I'm trying out StructuredStreaming with Spark.



Can someone interpret the error message?



Thanks










share|improve this question







New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as off-topic by Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F Mar 22 at 7:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about data science, within the scope defined in the help center." – Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F
If this question can be reworded to fit the rules in the help center, please edit the question.















  • $begingroup$
    I am running spark 2.4
    $endgroup$
    – Carltonp
    Mar 21 at 17:21










  • $begingroup$
    Your question is out of scope of this site. It's better to ask it in stackoverflow.com
    $endgroup$
    – Alireza Zolanvari
    Mar 21 at 17:40















0












$begingroup$


I have compiled the following code in Databricks written in spark.sql. I'm getting an AttributeError: 'DataFrame' object has no attribute 'sql'



The code is as follows:



purchaseByCustomerPerHour = streamingDataFrame.sql("""SELECT
retail_data.CustomerID
,retail_data.InvoiceDate AS window
,SUM(retail_data.UnitPrice * retail_data.Quantity) AS total_cost
FROM retail_data
GROUP BY retail_data.CustomerID
,retail_data.InvoiceDate
,retail_data.UnitPrice""")


Normally, I would write the first line of code as follows:



purchaseByCustomerPerHour = spark.sql


However, I'm trying out StructuredStreaming with Spark.



Can someone interpret the error message?



Thanks










share|improve this question







New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as off-topic by Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F Mar 22 at 7:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about data science, within the scope defined in the help center." – Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F
If this question can be reworded to fit the rules in the help center, please edit the question.















  • $begingroup$
    I am running spark 2.4
    $endgroup$
    – Carltonp
    Mar 21 at 17:21










  • $begingroup$
    Your question is out of scope of this site. It's better to ask it in stackoverflow.com
    $endgroup$
    – Alireza Zolanvari
    Mar 21 at 17:40













0












0








0





$begingroup$


I have compiled the following code in Databricks written in spark.sql. I'm getting an AttributeError: 'DataFrame' object has no attribute 'sql'



The code is as follows:



purchaseByCustomerPerHour = streamingDataFrame.sql("""SELECT
retail_data.CustomerID
,retail_data.InvoiceDate AS window
,SUM(retail_data.UnitPrice * retail_data.Quantity) AS total_cost
FROM retail_data
GROUP BY retail_data.CustomerID
,retail_data.InvoiceDate
,retail_data.UnitPrice""")


Normally, I would write the first line of code as follows:



purchaseByCustomerPerHour = spark.sql


However, I'm trying out StructuredStreaming with Spark.



Can someone interpret the error message?



Thanks










share|improve this question







New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I have compiled the following code in Databricks written in spark.sql. I'm getting an AttributeError: 'DataFrame' object has no attribute 'sql'



The code is as follows:



purchaseByCustomerPerHour = streamingDataFrame.sql("""SELECT
retail_data.CustomerID
,retail_data.InvoiceDate AS window
,SUM(retail_data.UnitPrice * retail_data.Quantity) AS total_cost
FROM retail_data
GROUP BY retail_data.CustomerID
,retail_data.InvoiceDate
,retail_data.UnitPrice""")


Normally, I would write the first line of code as follows:



purchaseByCustomerPerHour = spark.sql


However, I'm trying out StructuredStreaming with Spark.



Can someone interpret the error message?



Thanks







apache-spark pyspark






share|improve this question







New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Mar 21 at 17:19









CarltonpCarltonp

1




1




New contributor




Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Carltonp is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F Mar 22 at 7:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about data science, within the scope defined in the help center." – Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F
If this question can be reworded to fit the rules in the help center, please edit the question.







put on hold as off-topic by Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F Mar 22 at 7:09


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question does not appear to be about data science, within the scope defined in the help center." – Kiritee Gak, Toros91, Siong Thye Goh, tuomastik, Mark.F
If this question can be reworded to fit the rules in the help center, please edit the question.











  • $begingroup$
    I am running spark 2.4
    $endgroup$
    – Carltonp
    Mar 21 at 17:21










  • $begingroup$
    Your question is out of scope of this site. It's better to ask it in stackoverflow.com
    $endgroup$
    – Alireza Zolanvari
    Mar 21 at 17:40
















  • $begingroup$
    I am running spark 2.4
    $endgroup$
    – Carltonp
    Mar 21 at 17:21










  • $begingroup$
    Your question is out of scope of this site. It's better to ask it in stackoverflow.com
    $endgroup$
    – Alireza Zolanvari
    Mar 21 at 17:40















$begingroup$
I am running spark 2.4
$endgroup$
– Carltonp
Mar 21 at 17:21




$begingroup$
I am running spark 2.4
$endgroup$
– Carltonp
Mar 21 at 17:21












$begingroup$
Your question is out of scope of this site. It's better to ask it in stackoverflow.com
$endgroup$
– Alireza Zolanvari
Mar 21 at 17:40




$begingroup$
Your question is out of scope of this site. It's better to ask it in stackoverflow.com
$endgroup$
– Alireza Zolanvari
Mar 21 at 17:40










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Quoting Keynes in a lectureIs differentiated instruction permitted by universities?How to make students learn prerequisitesUnsatisfactory Instructor Evaluations: balancing of expectations of engineering studentsWhat is the difference between a “statistician”, “applied statistician”, and an academic applying advanced stats within their field?Listing in reference section, but not quotingHow to efficiently use time while preparing for a class?Graduate Admissions: Teaching Emphasisstrategies for sharing teaching information with universities I don't personally have contacts withIs there an efficient way to give a large class of students feedback about their assignments?Is it unreasonable to expect students to read the lecture notes before attending the first class?

Rank groups within a grouped sequence of TRUE/FALSE and NAGrouping functions (tapply, by, aggregate) and the *apply familyCharacters counting and subletting specific patternsWhat is the purpose of setting a key in data.table?data.table vs dplyr: can one do something well the other can't or does poorly?how to make a bar plot for a list of dataframes?How to group by unique values in a list in RPandas - Alternative to rank() function that gives unique ordinal ranks for a columnRank within group in for loop in RData transformation: from dyadic to observational data in RGetting map from purrr to work with paste0

Are all passive ability checks floors for active ability checks?Does passive perception supersede active perception?Which skills can be used passively?Active Opposition with Free-Form Professions in Fate5E Trap/Ambush/Stealth Mechanics VS Passive Perception ConfusionInteraction between perception and stealth in obscured conditionsHow does Keen Sight affect Passive Perception?Are all d20 rolls either attacks, saves or ability checks?Can players declare that they are making a specific ability check?Can I see a Hidden creature that is not obscured at all?Can a Stealth check ever be made passively?Is this alternate version of the Observant feat balanced?What is the minimum amount of skill points per HD?