๐๐ก๐๐ญ ๐ข๐ฌ ๐๐ญ๐ซ๐ฎ๐๐ญ๐ฎ๐ซ๐๐ ๐๐ญ๐ซ๐๐๐ฆ๐ข๐ง๐ ?
Hi, I am Aatish Raj Having Extensive Experience in Bigdata
๐I Have good knowledge of Hadoop and it's internals.
๐I have good knowledge of ingestion tools like Sqoop
๐I have good knowledge of dataWare Houses like Hive
๐I have Good knowledge of๐ฅ Spark with Scala(Dataframes, Datasets, SparkSql) and it's internals
๐I have good knowlege over AWS(EMR, S3,Glue)
โ๏ธTalks About #Data-Engineering
โ๏ธTalks about SQL
A technology enthusiast and problem-solver, I specialize in Hadoop, MapReduce, Sqoop, Hive, Spark, AWS, SQL, Scala, Datastructures, and Algorithms. I have successfully designed and implemented solutions for diverse projects. My expertise in designing, coding, and troubleshooting allows me to quickly develop solutions and provide effective solutions to challenging problems. With a proven track record of success, I am well-equipped to take on new projects and deliver results
๐๐ก๐๐ญ ๐ข๐ฌ ๐๐ญ๐ซ๐ฎ๐๐ญ๐ฎ๐ซ๐๐ ๐๐ญ๐ซ๐๐๐ฆ๐ข๐ง๐ ?
Think of Structured Streaming as a way to handle data that's constantly arriving, like a river of information. Spark processes this data in small chunks, or "micro-batches," making it feel like it's happening instantly. It's built on top of the Spark SQL engine, so you can use familiar SQL queries to process your data.
๐๐๐ฒ ๐๐จ๐ง๐๐๐ฉ๐ญ๐ฌ ๐๐ฑ๐ฉ๐ฅ๐๐ข๐ง๐๐ ๐ฌ๐ข๐ฆ๐ฉ๐ฅ๐ฒ:
๐๐ง๐ฉ๐ฎ๐ญ ๐๐จ๐ฎ๐ซ๐๐๐ฌ: This is where your data comes from. Common sources include Kafka (a distributed messaging system), file directories (like S3 or HDFS), and network sockets.
๐๐๐๐ก-๐ฌ๐ค๐ง๐ก๐ ๐๐ญ๐๐ข๐ฅ๐ก๐: Reading user activity logs from Kafka topics to track website clicks in real-time.
Code Sample (Python): spark.readStream.format("kafka").option("kafka.bootstrap.servers", "host:port").option("subscribe", "topic_name").load()
๐๐ซ๐๐ง๐ฌ๐๐จ๐ซ๐ฆ๐๐ญ๐ข๐จ๐ง๐ฌ & ๐๐๐ญ๐ข๐จ๐ง๐ฌ: This is how you process and manipulate your streaming data.
๐๐ง๐๐ฃ๐จ๐๐ค๐ง๐ข๐๐ฉ๐๐ค๐ฃ๐จ: Define what operations you want to perform, like filtering, joining, or aggregating data. They are "lazy" and don't execute until you trigger an action.
Real-world Example: Filtering out irrelevant logs or joining user activity data with user profile information.
Code Sample (Python): df.filter("user_id > 100").groupBy("action").count()
๐ผ๐๐ฉ๐๐ค๐ฃ๐จ: Trigger the processing of data and define where the output goes. Actions are essential for writing the results to a sink.
Real-world Example: Writing the processed data to a database or displaying results on a dashboard.
Code Sample (Python): query = df.writeStream.outputMode("append").format("console").start()
๐๐ข๐ง๐ค๐ฌ: This is where you want to store or display your processed data. Options include console, Delta Lake, or various databases.
Real-world Example: Writing processed analytics data to Delta Lake for further analysis or to a console for debugging.
Code Sample (Python): query = df.writeStream.outputMode("append").format("delta").option("path", "/path/to/delta/table").start()
๐๐ฎ๐ญ๐ฉ๐ฎ๐ญ ๐๐จ๐๐๐ฌ: This determines how Spark writes the results to the sink.
๐ผ๐ฅ๐ฅ๐๐ฃ๐ ๐๐ค๐๐: Only new rows added to the result table are written.
๐พ๐ค๐ข๐ฅ๐ก๐๐ฉ๐ ๐๐ค๐๐: The entire result table is written every time.
๐๐ฅ๐๐๐ฉ๐ ๐๐ค๐๐: Only the rows that have been updated since the last trigger are written.
Real-world Example: Append for new user signups, Update for profile updates, Complete for a top 10 list.
Code Sample (Python): query = df.writeStream.outputMode("append")...
๐๐ซ๐ข๐ ๐ ๐๐ซ๐ฌ: These control when Spark processes a new batch of data. Options include fixed intervals or one-time execution.
Real-world Example: Processing data every minute or once an hour.
Code Sample (Python): query = df.writeStream.trigger(processingTime="1 minute")...
๐๐ฏ๐๐ง๐ญ ๐๐ข๐ฆ๐ ๐๐ซ๐จ๐๐๐ฌ๐ฌ๐ข๐ง๐ : Handling data based on when it was generated, not when Spark received it. This is crucial for accurate analysis, especially when dealing with late-arriving data.
Real-world Example: Aggregating user actions by their actual occurrence time to understand user behavior accurately.
Code Sample (Python): withWatermark("event_time", "5 minutes").groupBy(window("event_time", "1 minute")).count()