Closed yuxh closed 6 years ago
Yes, that’s what in Scala and in Sql means. You’ll have to execute them 1 by 1
On Wed, Sep 5, 2018 at 01:34 yuxh notifications@github.com wrote:
there are many statements in book like this: // in Scala df.select("ORIGIN_COUNTRY_NAME", "DEST_COUNTRY_NAME").distinct().count() -- in SQL SELECT COUNT(DISTINCT(ORIGIN_COUNTRY_NAME, DEST_COUNTRY_NAME)) FROM dfTable I understand "in Scala " means execution in spark-shell. Does "in SQL" mean short hand for spark.sql("xx")? similar question is how can I execute commands in Spark-The-Definitive-Guide/code/xx.sql file?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/databricks/Spark-The-Definitive-Guide/issues/26, or mute the thread https://github.com/notifications/unsubscribe-auth/ABkQB0KkxqmANi4v1ts7e8RVW91C5vgjks5uX4x4gaJpZM4WabcL .
there are many statements in book like this: // in Scala df.select("ORIGIN_COUNTRY_NAME", "DEST_COUNTRY_NAME").distinct().count() -- in SQL SELECT COUNT(DISTINCT(ORIGIN_COUNTRY_NAME, DEST_COUNTRY_NAME)) FROM dfTable I understand "in Scala " means execution in spark-shell. Does "in SQL" mean short hand for spark.sql("xx")? similar question is how can I execute commands in Spark-The-Definitive-Guide/code/xx.sql file?