forked from aaryaa/diagramGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiagram_code.py
32 lines (24 loc) · 1.16 KB
/
diagram_code.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from diagrams import Diagram, Cluster, Node
from diagrams.aws.analytics import Kinesis
from diagrams.onprem.analytics import Spark
from diagrams.onprem.database import MySQL
with Diagram("ETL_Pipeline", show=False,filename="static/gpt_generated_diagram"):
with Cluster("Overview: \n ETL Pipeline for Twitter Data Analysis"):
DataExtraction = Kinesis("Data Extraction Component: \n AWS Kinesis")
DataTransformation = Spark("Data Transformation Component: \n Apache Spark")
DataLoader = MySQL("Data Loading Component: \n SQL Database")
AWSKinesis = Kinesis("AWS Kinesis")
ApacheSpark = Spark("Apache Spark")
SQLDatabase = MySQL("SQL Database")
AWSKinesis >> ApacheSpark
ApacheSpark >> SQLDatabase
with Cluster("Context: \n Real-time analysis of Twitter data"):
Context = Node("Context")
with Cluster("Technology Stack: \n AWS, Spark, SQL, Kinesis"):
TechnologyStack = Node("Technology Stack")
Context >> DataExtraction
Context >> DataTransformation
Context >> DataLoader
DataExtraction >> AWSKinesis
DataTransformation >> ApacheSpark
DataLoader >> SQLDatabase