Created
September 11, 2019 07:18
-
-
Save samueleresca/1d736fea4e221adb48d60bdd1ea90a8c 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()) | |
.Show(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment