<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Carlos Cruz on Medium]]></title>
        <description><![CDATA[Stories by Carlos Cruz on Medium]]></description>
        <link>https://medium.com/@orlando112000?source=rss-edd527ab8fc2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*NjzqS1TAasrnp_m8QTh_pQ.png</url>
            <title>Stories by Carlos Cruz on Medium</title>
            <link>https://medium.com/@orlando112000?source=rss-edd527ab8fc2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:34:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@orlando112000/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Creating interactive dashboards in AWS]]></title>
            <link>https://medium.com/nicasource/creating-interactive-dashboards-in-aws-39d430f0bda7?source=rss-edd527ab8fc2------2</link>
            <guid isPermaLink="false">https://medium.com/p/39d430f0bda7</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[quicksight]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[Carlos Cruz]]></dc:creator>
            <pubDate>Fri, 30 Sep 2022 23:15:25 GMT</pubDate>
            <atom:updated>2022-09-30T23:15:25.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dWVEN2vQSl6eeYN3Q1-LXg.png" /></figure><p>Decision-making is a crucial activity that happens at every company, level, or industry. In this fast-paced and highly competitive environment, some companies rise above others due to this same ability to make decisions.</p><p>Traditional companies usually base their decisions on gut feelings and incomplete (or even false) information. The previous approach was acceptable (to a certain degree) in an era in which data wasn’t as readily available as it is now.</p><p>Meanwhile, modern companies combine the experience, creativity, and knowledge they have accumulated with relevant data to create or find potential new business opportunities. Data is the oil equivalent to past generations in our current digital economy.</p><p>Companies who learn to integrate data successfully into their business will have a clear advantage over the rest. In this article, we will finish our journey of building a PoC (Proof of Concept) Data Lake.</p><p><a href="https://medium.com/nicasource/getting-started-with-data-lakes-in-aws-10ec55d7d758">Getting started with Data Lakes in AWS</a></p><p>We will use all the data we have acquired from previous articles and create valuable insights using data models with a tool for interactive dashboard creation, QuickSight.</p><h4><a href="https://bit.ly/DataProcessinginAWS-NS23">Data Processing in AWS</a></h4><p>As always, here’s the GitHub repository with the resources and a more beginner-friendly guide:</p><p><a href="https://github.com/carloscruzns/datalakepoc#datalakepoc">https://github.com/carloscruzns/datalakepoc#datalakepoc</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PXeoSJ_Ke17B9D1O" /></figure><h4>Testing Athena</h4><p>In every step of the ETL process, and even before starting, it is worth exploring and understanding the data we are working with. There are many ways to achieve this, but a very convenient one is using Athena to query our data in the different layers of our Data Lake. If you are familiar with SQL, then you know there are many possibilities. Let’s get a sample of data in our diamond layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lv3Hlwm7QRxI4FFq" /></figure><p>Great, we have a good data model that we can start using, but there are a few fields that shouldn’t be there, and we can improve some others’ names. The right way to do it would be to update our code and rerun the ETL process.</p><p>The not-so-right way to do it, but more practical, is to create a view with these easy changes and work with that going forward. I’m not encouraging technical debt, but in urgent cases, changes might be required in a short response time, and this approach provides us with enough flexibility. After all, engineering is managing multiple moving parts to achieve the desired result by keeping technical debt in check.</p><h4>Setting up QuickSight</h4><p>After improving our data model, we can start focusing on generating value with it. As our last stop in this journey, we will set up, design, and publish an interactive dashboard using AWSQuickSight. First, we need to sign up with the standard tier (it offers a 30-day free trial) and select the following:</p><p>Setting up an account:</p><ul><li>Authentication method: Use IAM federated entities &amp; Quicksight’s managed users</li><li>Region: The same as our previous resources</li><li>QuickSight account name: Any</li><li>Notification address: Any</li></ul><p>Setting up S3:</p><ul><li>Make sure the S3 buckets linked to the QuickSight account are selected</li><li>Select the three buckets created for our data lake layers</li></ul><p>QuickSight access to AWS services:</p><ul><li>Check IAM</li><li>Check S3</li><li>Check Amazon Athena</li></ul><p>And with that, we are done with the initial setup for QuickSight. There are a few sample datasets in case you would like to explore what this service can do. In our case, we will use the diamonds we have created from the ETL process and, for that, we do the following:</p><ul><li>Click on new Dataset;</li><li>We pick Athena; we will use this service as our data source;</li><li>Data source name: Athena-primary, and we leave primary as the workgroup;</li><li>We scroll to the bottom, and there is a list of existing data sources. We click on the one we have created;</li><li>We select our diamond Sakila database and the view we created previously. Click on “Edit/Preview Data”.</li></ul><p>If everything is loaded correctly, we should see similar data to the one we have seen with Athena. Set the dataset name ( anyone you consider suitable) and click on “Publish &amp; Visualize”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D9nFODJJ4tyEH6Ut" /></figure><p>We have an empty canvas at our disposal. With this, we can start creating visualizations with our recently added dataset. They might give us valuable insights. The learning curve for QuickSight isn’t daunting at all. So, start exploring the tool and checking what ideas come to your mind.</p><p>When you are done, click on share and export it as a dashboard. You can see analyses as your development environment and dashboards as either your end result or your final product (users get access to this one).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D9NfxF3Ts5JzX5za" /></figure><p>This is an example of a simple dashboard that could be done usingQuickSight. We can answer questions like:</p><ul><li>What is the total amount of revenue?</li><li>How many films were offered?</li><li>Which films generated the most amount of revenue?</li><li>Which rating generated the most amount of revenue?</li><li>And more…</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RQcLhcs-iHNtU0bk" /></figure><h3>Thanks!</h3><p>And that’s all there is to it!</p><p>If you have followed every step and ended with a data model and a strategy to present valuable insights, I would deem the journey a success. Of course, there is much more to consider when implementing a data lake or a data project in a production environment. We must account for partitioning data, data quality, security, processing big data, automating data pipelines, data storytelling, etc. (some of which were mentioned briefly or not at all).</p><p>The objective of this saga of articles was to serve as a starting point for curious people about the world of data analytics since I consider it difficult to find a use case from start to finish. Perhaps you can expand on them in your own articles in the future.</p><p>If you decide to follow this path, I hope to see you around the road, my dear fellows!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39d430f0bda7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nicasource/creating-interactive-dashboards-in-aws-39d430f0bda7">Creating interactive dashboards in AWS</a> was originally published in <a href="https://medium.com/nicasource">NicaSource</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Processing in AWS]]></title>
            <link>https://medium.com/nicasource/data-processing-in-aws-43b0bf294b2e?source=rss-edd527ab8fc2------2</link>
            <guid isPermaLink="false">https://medium.com/p/43b0bf294b2e</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-processing-services]]></category>
            <category><![CDATA[data-lake]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Carlos Cruz]]></dc:creator>
            <pubDate>Thu, 29 Sep 2022 18:40:21 GMT</pubDate>
            <atom:updated>2022-09-29T23:38:34.235Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Data Processing" src="https://cdn-images-1.medium.com/max/1024/1*CBOLULPjXqybISF-qPYOtg.png" /><figcaption>Data Processing</figcaption></figure><p>It&#39;s estimated that more than 94 zettabytes (85,492,501,966 terabytes) of data will be created and consumed by 2022.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/228/1*I3pYXQ2BaC8DkxNQaZ54cQ.gif" /></figure><p>We create data faster than we can process and analyze it. The previous is closely related to the growth in internet users and the ease of internet access with cell phones, IoT, and more. Because of it, a special set of tools oriented to work with big data was developed. Using these tools combined with a Data Lake is a common practice for processing the incredible amount of data created daily.</p><p>Following up with the foundation laid during part I:</p><h4><a href="https://bit.ly/startedwithDataLakes-NS22">Getting started with Data Lakes in AWS</a></h4><p>For this article, we will focus on how to process the specific amount of data in our data source (MySQL Sakila Database) by applying AWS services for this use case.</p><p>As always, here’s the GitHub repository with the resources and a more beginner-friendly guide:</p><p><a href="https://github.com/carloscruzns/datalakepoc#datalakepoc">https://github.com/carloscruzns/datalakepoc#datalakepoc</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NLdfIv4sF1nVyCQR" /></figure><p>Before diving deeper, we need to set up different services to help us process our data. Let’s go over the ones we will focus on in this article:</p><ul><li><strong>Lambda:</strong> it will provide the processing power for Extract, Transform, and Load (ETL) operations.</li><li><strong>Glue Data Catalog:</strong> it will contain our data’s location and schema.</li><li><strong>Secret Manager:</strong> it will store the credentials for our data source in this service.</li><li><strong>Athena:</strong> it allows us to make interactive queries to our data in Amazon S3 using standard SQL.</li></ul><h3>Secret Manager</h3><p>We will start with Secret Manager, a service to store sensitive data. To correctly set up this service, we will save our credentials for our MySQL Database in it. In the end, our secret will look like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*aUrrhfTb_gL7XDJh" /></figure><h3>IAM Role</h3><p>Now that our credentials are securely stored, we need to set up an execution role for Lambda with the necessary permissions. The policies we will attach are the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pT4FKgI3yg4TkWA_" /></figure><p>Needless to say, this role doesn’t follow the principle of least privilege. We must tweak it if we want to follow that principle. Security should be job 0, and there are tools to ensure our Data Lake is secure (for example, AWS Lake Formation). It might be worth exploring this topic in detail in a future article.</p><h3>Glue Data Catalog</h3><p>Once the previous steps have been completed, we should be able to run our scripts to extract and enhance our data. Before that, we need to understand that the result of the extracting actions will be stored in columnar files, more precisely .parquet files. Columnar file types are designed to store data more efficiently when we’re reading huge amounts of it.</p><p>Since we’re working with AWS as our cloud provider, we will use the Glue Data Catalog, an index to the location and the schema of our parquet files that can be used with our ELT jobs. We will set up the databases for this project, one for each layer. The final result will be the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v7IOzkPigAaNLK2j" /></figure><h3>Athena setup.</h3><p>Now, we can use Glue Data Catalog for data stored in the Data Lake. At this point, we only have databases, but that will change soon. We will proceed to set up AWS Athena to use it in the ELT process. In the previous article, we created three buckets for our layers and one for resources. It is time to use this last bucket so we may store Athena’s query results. We will edit the primary workgroup and set a path in our bucket to identify it. (It is possible to create more than one workgroup, so storing the results with different prefixes is optimal) And with that, we are done with Athena for this article.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/0*EOD1fqD4kTcXn4rE" /></figure><h3>AWS Data Wrangler</h3><p>In this case, our data source doesn’t require using big data technology, like Spark, to be processed. We will use an open-source data manipulation library. And if you have experience in the area, you already know what I’m talking about. We are going to apply Pandas for Python. In addition, we will take advantage of the features of another library developed by AWS themselves, <a href="https://github.com/awslabs/aws-data-wrangler">AWS Data Wrangler</a>. It will help us to integrate all the data-related services practically and conveniently. The Data Wrangler is already provided as an option when using layers in lambda functions, but we will take a careful look at this in a second.</p><h3>Processing Coal Layer</h3><p>With all the prep work done, let’s start building our ELT process. First, we must create a new lambda function with Python 3.8 and select the previously created role. Make sure to set a name that conveys the layer. The data source we are working with AWS Lambda functions comes with a list of pre-installed packages that we can use. AWS Data Wrangler is not included and must be added via Lambda Layers.</p><p>In summary, our new lambda function must have the following settings:</p><ul><li>Python 3.8</li><li>Previously created role</li><li>AWS Layers — Lambda layer: AWSDataWrangler-Python38</li><li>Basic setting: 128 MB Memory</li><li>Basic setting: 512 MB Storage</li><li>Basic setting: 5 min timeout</li></ul><p>We will copy the code from the GitHub repository for the coal layer and paste it in our new lambda function. All that’s left is to change the S3 bucket’s names for your own and set the previously created secret id. We will go through a few key points in the code.</p><pre>con = wr.mysql.connect(secret_id=’data-lake/sakila-mysql-secret’) #Example</pre><pre><em>#### EXTRACTING PAYMENT #####</em><br>df_payment  = wr.mysql.read_sql_table(<br>    table=&quot;payment&quot;,<br>    schema=&quot;sakila&quot;,<br>    con=con<br>)</pre><p>We will pass our connection to the read_sql_table method, along with the target table and schema. It will return a Pandas data frame of all the data in our target so we may explore and modify it as suitable. Since we are focusing on the extraction process, there is no need to alter it.</p><pre>wr.s3.to_parquet(<br>    df=df_payment,<br>    path=s3_path_payment,<br>    dataset=True,<br>    database=&#39;sakila_coal&#39;, <br>    table=&#39;payment&#39;  <br>)</pre><p>The final step for the extraction of this table is to specify our database in our Glue Data Catalog, set our new table name, and fill in the rest of the parameters. The previous will create a new table schema if one doesn’t exist. As a result, we will have saved the data from the MySQL database to the data lake and created a schema for it in the process. Thanks to AWS Data Wrangler, the process was simple and painless. We will repeat these steps for the rest of the tables we would like to extract. When we run our new lambda function manually, we should see the files loaded in our S3 coal layer bucket.</p><p>In this project, we will have only one lambda function with the task of extracting all the required tables. Depending on the extraction process’s complexity or the data amount, it might be necessary to set one separate lambda for each table. Creating separate lambdas will allow us to execute them in parallel or make our custom order with services like step functions. If the volume of data increases drastically, we might need to start looking for alternative services like EMR, Glue, MWAA (Amazon Managed Workflows for Apache Airflow), etc.</p><h3>Processing Melting Layer</h3><p>We have our raw data in the coal layer, waiting to be cleansed and improved. We will create a new lambda function with the same settings as the previous one and paste its corresponding code from the GitHub repository. Make sure to update the S3 bucket’s name and if you have changed any names for the data catalog, update those as well.</p><p>We will focus on enhancing the table film from our data source in this function. The objective is to de-normalize the table film, the film category, and the category. The expected result is a data frame with the information of our films and a field with the value of the category.</p><pre><em>#### LOADING DATAFRAMES #####</em><br>df_film = wr.athena.read_sql_table(table=&quot;film&quot;, database=&quot;sakila_coal&quot;) <br>df_film_category = wr.athena.read_sql_table(table=&quot;film_category&quot;, database=&quot;sakila_coal&quot;)<br>df_category = wr.athena.read_sql_table(table=&quot;category&quot;, database=&quot;sakila_coal&quot;)</pre><p>Thanks to the work we did with Glue Data Catalog, we can just specify our table and database and using Athena, we can get a data frame with the requested information. We have to repeat this process for our target tables.</p><pre><em>#### MERGING DATAFRAMES #####</em><br>df_film = pd.merge(df_film, df_film_category, on=’film_id’)<br>df_film = pd.merge(df_film, df_category, on=’category_id’)</pre><p>Now we can proceed to use Pandas with the merge method to get a single data frame with our film information and the category value.</p><pre>wr.s3.to_parquet(<br>    df=df_film,<br>    path=s3_path_film_category,<br>    dataset=True,<br>    database=&#39;sakila_pressure&#39;,<br>    table=&#39;film&#39;  <br>)</pre><p>The last step is the same as in the coal layer lambda. With the transformation completed, we can proceed to save our data frame in the pressure layer. We should be able to see the result there.</p><h3>Processing Diamond Layer</h3><p>We finally have our data clean and with some added information. In this final step, we will add fields from other sources to enhance it further, so we get a more complete dataset.</p><pre><em>#### MERGING DATAFRAMES #####</em><br>df_film = pd.merge(df_film, df_inventory, on=&#39;film_id&#39;)<br>df_film = pd.merge(df_film, df_rental, on=&#39;inventory_id&#39;)<br>df_film = pd.merge(df_film, df_payment, on=&#39;rental_id&#39;)<br><br>wr.s3.to_parquet(<br>    df=df_film,<br>    path=s3_path_film_sales,<br>    dataset=True,<br>    database=&#39;sakila_diamond&#39;,<br>    table=&#39;film_sales&#39;  <br>)</pre><p>We proceed to save it like in the previous steps and store it in the diamond layer. And with that, we will have a data model to help us create some insights.</p><h3>Final Thoughts</h3><p>If you have been following these steps, you have already realized that we have managed to set up an ELT process for our data. We have accomplished this thanks to all our prep work in different AWS Services. We can now safely store our credentials for different data sources with Secret Manager. We also have a role for lambda functions for different data processing steps. Athena and Glue allow us to read our stored columnar files easily, and using AWS Data Wrangler, we can tie everything together. Improvements can be made, like applying less privilege to our lambda roles, automating the execution of the ELT process, etc. But the objective of this article was to focus on how to take advantage of current AWS services to do an ELT tailored for this use case. I hope this goal has been achieved, and I will see you in the next article, my dear fellows.</p><h3>Bibliography</h3><ul><li>Learn more cool stats about data here: <a href="https://financesonline.com/how-much-data-is-created-every-day/">53 Important Statistics About How Much Data Is Created Every Day — Financesonline.com</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43b0bf294b2e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nicasource/data-processing-in-aws-43b0bf294b2e">Data Processing in AWS</a> was originally published in <a href="https://medium.com/nicasource">NicaSource</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with Data Lakes in AWS]]></title>
            <link>https://medium.com/nicasource/getting-started-with-data-lakes-in-aws-10ec55d7d758?source=rss-edd527ab8fc2------2</link>
            <guid isPermaLink="false">https://medium.com/p/10ec55d7d758</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-lake]]></category>
            <dc:creator><![CDATA[Carlos Cruz]]></dc:creator>
            <pubDate>Wed, 28 Sep 2022 12:52:19 GMT</pubDate>
            <atom:updated>2022-09-28T17:32:59.926Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VgIxgN81SLuRQ6JAw2qsKw.png" /><figcaption>Data Lake</figcaption></figure><p>During this new digital era, in an attempt to retain and create lasting value in their customer shares, businesses are racing each other to integrate technology among their products and services. Every company hopes digital transformation will provide some advantage over its competitors. Since businesses aim to achieve a significant competitive advantage in a highly competitive market, they must know their customers and understand how they interact with their offerings. Yet, understanding who their clients are and their needs is a complex process.</p><p>In the process of understanding your client, you might need to do data research, architectural design, extraction, transformation, and analysis. For all of the previously mentioned to happen and produce valuable results, it requires a combination of distinct data sources (like relational databases, non-relational databases, API, data warehouses, etc.). Sometimes, structured data might not be sufficient, making semi-structured and unstructured data part of the equation that needs to be included while designing a feasible solution.</p><p>Is it even possible to catch up with all the present demands in an elegant, scalable, and cost-effective way? The answer is a big yes, and it is called a data lake. In this saga of articles, we will build a Proof of Concept (PoC) of a data lake that allows you to understand how it works and the basic design principles that will help you achieve a company’s goal.</p><p>In the following GitHub repository, you will find the required resources and a more beginner-friendly guide on how to set up everything: <a href="https://github.com/carloscruzns/datalakepoc#datalakepoc">https://github.com/carloscruzns/datalakepoc#datalakepoc</a>.</p><h3>Key Concepts</h3><p>Before we start designing our diagrams, we first need to understand some essential concepts.</p><h3>What is a Data Lake?</h3><p>According to AWS, <strong>“a data lake is a centralized repository that allows you to store all your structured and unstructured data at any scale. </strong>You can store your data as-is, without having to first structure the data, and run different types of analytics — from dashboards and visualizations to big data processing, real-time analytics, and machine learning to guide better decisions.”</p><p>Slightly contradictory to AWS’ definition, Databrick affirms that “<strong>a data lake is a central location that holds a large amount of data in its native, raw format.</strong> Compared to a hierarchical data warehouse, which stores data in files or folders, a data lake uses a flat architecture and object storage to store the data.‍”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*L-5UnfexLjy_lHmM" /></figure><p>I tend to disagree with the latter definition because something as small as a few excel files with invaluable information to a company can start a data lake. And don’t get me wrong, sometimes big tech companies start data lakes with petabytes of data that their companies generate daily. But, a petabyte is not the minimum requirement to begin a data lake.</p><p>It is undeniable that data lakes and big data go hand in hand. Luckily, cloud computing allows us to design solutions that work in both scenarios — a lot of data vs. little data — without financially compromising a company in the process. At the end of the day, the total amount invested in setting up the project presented throughout this saga should be less than a dollar if done correctly.</p><h3>Data Lake Layers</h3><p>To manage any amount of data from different sources and types, data lakes must have a flexible and scalable architecture. A key component of this type of architecture is the data lake layer, which isolates information based on its level of quality and value. This characteristic gives the convenience of creating the necessary amount of layers based on a project’s requirements.</p><p>There are different theories about the ideal amount of layers, but the standard and essential ones are the following:</p><ul><li><strong>Raw data layer:</strong> In this layer, we focus on ingesting data as-is from our data sources as efficiently as possible. This data may originate from an API, a Data Warehouse, Database, IoT, etc. We must ensure it maintains its original structure and keep the original file format (if possible). It is also known as the Ingestion layer.</li><li><strong>Curation data layer: </strong>The data is denormalized, cleansed, and derived at this stage. Our objective is to make it standard and uniform. It is also known as the Distillation layer.</li><li><strong>Application data layer:</strong> Here, we implement business logic and analytical applications to consume the data. The goal is to generate value by creating insights and useful data models. It is also known as the Trusted layer.</li></ul><p>Some projects might need a different number of layers for their implementation, but this proposal should be enough for our data source. Sometimes it is recommended to rename layers so it gets easier to understand them. For this exercise, we will be calling them coal, pressure, and diamond layers. I’m aware diamonds don’t come from coal, but it’s a cool visual metaphor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/0*0GSHsOGAcY4T_3dJ" /><figcaption>Data Lake Layers</figcaption></figure><h3>Data Lake — Architecture</h3><p>We now have the required knowledge to start working on our PoC. For this trial, we will use AWS as our cloud provider, and the following services will be required:</p><ul><li><strong>RDS:</strong> our data source will be a MySQL database using a Sakila DB sample.</li><li><strong>Lambda:</strong> it will provide the processing power for ELT operations.</li><li><strong>S3:</strong> It will be the default service for storing files.</li><li><strong>Glue Data Catalog:</strong> it will contain our data’s location and schema.</li><li><strong>Secret Manager:</strong> it will store the credentials for our data source in this service.</li><li><strong>Athena:</strong> it allows us to make interactive queries to our data in Amazon S3 using standard SQL.</li><li><strong>QuickSight:</strong> this will allow us to access the data models after they are created. Additionally, we will be able to create interactive dashboards and obtain useful and valuable insights.</li></ul><p>We will take advantage of AWS Free Tier since it will give us enough leeway to keep our costs at zero or as close as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tU0DcA6wBvXUtDqK" /><figcaption>Project Architecture</figcaption></figure><p><strong>Finance Pro Tip:</strong> If this is a personal project, make sure you delete everything after you’re done.</p><h3>Data Lake Sources</h3><p>Our first step will be to set up our data source. For simplicity, we will set up a MySQL database with the RDS service. The data will be extracted from Sakila, a well-known sample database. This database simulates a movie rental business with information about films, actors, stores, rentals, inventory, etc. It provides us with enough tables and data to obtain a few insights.</p><p>Once the database is up and running, we should connect to it and run the scripts. Make sure to use the ones in the <a href="https://github.com/carloscruzns/datalakepoc#datalakepoc">GitHub repo</a>. This project assumes that we rely on a specific schema and a specific amount of data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/0*VyzzlBs8e7G0blCc" /></figure><h3>S3 Data Lake Layers</h3><p>Now that our data source is set up, we must prepare our layers to store it. We will create a unique bucket for each layer, giving us enough flexibility to tailor the bucket settings (access, versioning, etc.) according to their specific requirements. We also need a separate bucket for resources and miscellaneous things that other services will use. In this project, we will keep the default settings as they are and will have the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Pf1G0EbBZCVeDkOu" /></figure><h3>Final Thoughts</h3><p>Let’s take a look at our progress so far. We learned a few key concepts when designing and implementing a Data Lake. We also defined an architecture that will work for our sample database in RDS, Sakila. And last but not least, we created the layers so we can isolate and store our data. Once everything is successfully completed, we will have the pillars to continue making our fun-sized data lake. The next step is to process this information and create data models to get useful insights out of them.</p><p>See you next article, my dear fellows!</p><h3>Bibliography</h3><ul><li><a href="https://aws.amazon.com/big-data/datalakes-and-analytics/what-is-a-data-lake/">What is a data lake?</a></li><li><a href="https://databricks.com/discover/data-lakes/introduction">Introduction to Data Lakes — Databricks</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10ec55d7d758" width="1" height="1" alt=""><hr><p><a href="https://medium.com/nicasource/getting-started-with-data-lakes-in-aws-10ec55d7d758">Getting started with Data Lakes in AWS</a> was originally published in <a href="https://medium.com/nicasource">NicaSource</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>