Skip to content
Scriptorium

Scriptorium

Ideas through Technologies

  • Home
  • Blogs
  • Thoughts
  • Culture & Media
    • Books
    • Movies
    • Movie Archives
  • AI/Cloud
    • AWS Architect
    • AWS Labs
    • Cloud & ML
  • Library
    • Study Notes
    • Tutorials

[Spark By Example] Spark SQL – TempView

With Spark SQL, you can use the familiar SQL syntax to query the data.

Continue reading “[Spark By Example] Spark SQL – TempView”
Posted byPyongwon LeeNovember 11, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Spark SQL – TempView

[Spark By Example] Aggregation

The following sample code (by Python and C#) shows how to group DataFrame and compute the aggregated values such as Max, Min, or Average.

Continue reading “[Spark By Example] Aggregation”
Posted byPyongwon LeeNovember 11, 2022November 11, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Aggregation

[Spark By Example] Date & Timestamp

Handling date and time is one of most important part of data processing. But due to its complex formats, you need to how to convert types and manipulate date and time.

Continue reading “[Spark By Example] Date & Timestamp”
Posted byPyongwon LeeNovember 10, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Date & Timestamp

[Spark By Example] DataFrame Columns

The following sample code (by Python and C#) shows how to handle columns in the DataFrame. You can check the number of columns, add a new column, rename the existing column, or even remove columns.

Continue reading “[Spark By Example] DataFrame Columns”
Posted byPyongwon LeeNovember 10, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] DataFrame Columns

[Spark By Example] DataFrame Query

The following sample code (by Python and C#) shows how to read query data in the DataFrame. Once you have a DataFrame object, you can query the data using the SQL-like syntax regardless of the origin of data.

Continue reading “[Spark By Example] DataFrame Query”
Posted byPyongwon LeeNovember 9, 2022November 9, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] DataFrame Query

[Spark By Example] Read JSON – Complex Type

The following sample code (by Python and C#) shows how to read JSON file with complex objects.

CSV handles the flat data structure. But with JSON, you can read complex data structure into the DataFrame.

Continue reading “[Spark By Example] Read JSON – Complex Type”
Posted byPyongwon LeeNovember 9, 2022November 9, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Read JSON – Complex Type

[Spark By Example] Read JSON – Array Type

The following sample code (by Python and C#) shows how to read JSON file with array data.

With JSON, it is easy to specify the schema. Therefore, you can directly parse the array data into the DataFrame.

Continue reading “[Spark By Example] Read JSON – Array Type”
Posted byPyongwon LeeNovember 9, 2022November 9, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Read JSON – Array Type

[Spark By Example] Read JSON with Schema

The following sample code (by Python and C#) shows how to read JSON file with schema. With JSON, it is always a good idea to provide the schema for your data.

Continue reading “[Spark By Example] Read JSON with Schema”
Posted byPyongwon LeeNovember 9, 2022Posted inCloud ComputingTags:PySpark, Python, SparkLeave a comment on [Spark By Example] Read JSON with Schema

Posts navigation

Newer posts 1 … 4 5 6 7 8 … 41 Older posts
  • LinkedIn
  • Twitter

Search in this blog

Scriptorium, Blog at WordPress.com.
  • Follow Following
    • Scriptorium
    • Join 65 other followers
    • Already have a WordPress.com account? Log in now.
    • Scriptorium
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar