Created
September 8, 2019 14:12
-
-
Save samueleresca/4d5e629879a2d4318cced785a9336f76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Spark.Sql; | |
namespace blog.apachesparkgettingstarted | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
SparkSession spark = SparkSession | |
.Builder() | |
.AppName("My application") | |
.GetOrCreate(); | |
DataFrame df = spark | |
.Read() | |
.Option("header", true) | |
.Csv("./data/seattle-cultural-space-inventory.csv"); | |
df | |
.Select("Name", "Phone") | |
.Filter(df["Phone"].IsNotNull()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment