<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Christopher Thompson H.</title>
    <description>The latest articles on DEV Community by Christopher Thompson H. (@cthompsonh).</description>
    <link>https://dev.to/cthompsonh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F613426%2Fc30ccd3f-20a8-48cf-a7da-3f9c9bafecb0.png</url>
      <title>DEV Community: Christopher Thompson H.</title>
      <link>https://dev.to/cthompsonh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cthompsonh"/>
    <language>en</language>
    <item>
      <title>How to combat climate change with data in AWS</title>
      <dc:creator>Christopher Thompson H.</dc:creator>
      <pubDate>Mon, 20 Dec 2021 19:43:43 +0000</pubDate>
      <link>https://dev.to/aws-builders/how-to-combat-climate-change-with-data-in-aws-52nf</link>
      <guid>https://dev.to/aws-builders/how-to-combat-climate-change-with-data-in-aws-52nf</guid>
      <description>&lt;p&gt;Hello data Lovers! this blog will talk about some initiatives driven by AWS technologies that allow us to analyze and prevent some of the most significant effects of climate change in the world. Each section has its respective source to learn about the initiatives directly, &lt;strong&gt;and it's only a compilation of what already exists on the web.&lt;/strong&gt; 😄&lt;/p&gt;

&lt;p&gt;Data and its analysis are increasingly crucial for the urgency of measuring, model and monitoring global climate change. Organizations multi-laterals, governments, non-governmental organizations, and companies worldwide are committed to the compilation and generation of databases that support the fight against global warming.&lt;/p&gt;

&lt;p&gt;However, researchers are increasingly using new tools with higher availability and accessibility based on Cloud computing's technology, like analytics advanced resources for accelerating real-time monitoring.&lt;/p&gt;

&lt;h2&gt;
  
  
  Digital information for decision making in Africa
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Digital Earth Africa&lt;/strong&gt; is a program that promotes access to Earth observation data that allows African countries uses Sattelite's information about floods, droughts, soil, and coastal erosion, agriculture, land cover forests, land use, among other services. The users can analyze the critical data in minutes after they become available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjektpkc8nhsn0f6e601o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjektpkc8nhsn0f6e601o.jpg" alt="digital-earth-africa"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to the &lt;a href="https://sustainability.aboutamazon.com/environment/the-cloud/asdi" rel="noopener noreferrer"&gt;AWS initiative Amazon Sustainability Data Initiative&lt;/a&gt; (ASDI), this information has been supported and endorsed by the various entities within this program.&lt;/p&gt;

&lt;p&gt;The success story published by AWS can be found in the following blog:&lt;br&gt;
&lt;a href="https://aws.amazon.com/es/blogs/publicsector/digital-earth-africa-enabling-insights-for-better-decision-making/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/blogs/publicsector/digital-earth-africa-enabling-insights-for-better-decision-making/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Melting of Peruvian glaciers in real-time
&lt;/h2&gt;

&lt;p&gt;Perú represents approximately 68% of the tropical glacier's mass, which has reduced by less than half over the last 40 years. The Instituto Nacional de Ecosistemas de Glaciares y Montañas (Inaigem), administrated by the state, uses machine learning and artificial intelligence tools for analyzing the compiled data in real-time. All of this is in the most vulnerable glacial lakes for calculating the probability of possible avalanches, shortening the answer time, and issuing alerts to prevent accidents and harm to the population.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl07z947jviv26ou9qxkp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl07z947jviv26ou9qxkp.jpg" alt="chacraraju-mountain"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to AWS Technologies, it is possible to collect the information in real-time (with seconds difference) through sensors consolidating data in a central repository and data lake in AWS, generating alerts through messages services for possible avalanches or landslides. &lt;/p&gt;

&lt;p&gt;If you want to find out more, these are the links:&lt;br&gt;
&lt;a href="https://tc.copernicus.org/articles/13/2537/2019/" rel="noopener noreferrer"&gt;https://tc.copernicus.org/articles/13/2537/2019/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.aboutamazon.com/news/aws/tracking-the-disappearing-glaciers-of-peru" rel="noopener noreferrer"&gt;https://www.aboutamazon.com/news/aws/tracking-the-disappearing-glaciers-of-peru&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Shark and sea state monitoring
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kfkvname06rsagv53eq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6kfkvname06rsagv53eq.jpg" alt="shark-monitoring-with-aws"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;95% of the ocean is unexplored, and the lack of data will affect conservation efforts. Non-governmental organization Global Ocarch borns to help scientists deal with the previously unavailable information. Cloud Computing is for storing and sharing data with Sattelite telemetry above the shark movement through the Ocarch Shark Tracker and Ocarch tracker applications in his site. This information allows most of 180 scientists of 90 organizations to progress in 23 different research projects.&lt;/p&gt;

&lt;p&gt;OCEACH uses Amazon Simple Storage Service (Amazon S3) to store its recompiled data. Amazon Relational Database Service (Amazon RDS) for its shared database, Amazon Elastic Compute Cloud (Amazon EC2) for the computing power, and Amazon Route 53 how domain name system.&lt;/p&gt;

&lt;p&gt;The success story published by AWS can be found in the following blog:&lt;br&gt;
&lt;a href="https://aws.amazon.com/es/blogs/publicsector/assessing-oceans-health-monitoring-shark-populations/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/blogs/publicsector/assessing-oceans-health-monitoring-shark-populations/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Securing the future for the Tazmania devil
&lt;/h2&gt;

&lt;p&gt;This marsupial is threatened for changes provoked by humans or devasting fires and for infectious cancers that can cause facial tumors and reduce their number by more than 80%. The Cloud has accelerated the work of Sydney University Experts using data of the Tasmanian genome. Those analyses will use for researchers worldwide, and search helps protect those marsupials and other endangered species.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ch13e8yeeawznciwwx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz5ch13e8yeeawznciwwx.jpg" alt="Demons of Tazmania"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The team's work has accelerated since the start of a proof of concept in AWS. According to the team, it allowed them to speed up the investigation and manage the finances carefully.&lt;/p&gt;

&lt;p&gt;If you want to find out more, these are the links:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.zdnet.com/article/university-of-sydney-using-cloud-to-prevent-the-tasmanian-devil-from-extinction/" rel="noopener noreferrer"&gt;https://www.zdnet.com/article/university-of-sydney-using-cloud-to-prevent-the-tasmanian-devil-from-extinction/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://aws.amazon.com/es/opendata/open-data-sponsorship-program/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/opendata/open-data-sponsorship-program/&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Other interesting cases
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Saildrone
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.saildrone.com/" rel="noopener noreferrer"&gt;Saildrone Website&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/es/solutions/case-studies/saildrone-video-case-study/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/solutions/case-studies/saildrone-video-case-study/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CMIP6 dataset to foster climate innovation and study the impact of future climate conditions
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/es/blogs/publicsector/now-available-cmip6-dataset-foster-climate-innovation-study-impact-future-climate-conditions/" rel="noopener noreferrer"&gt;https://aws.amazon.com/es/blogs/publicsector/now-available-cmip6-dataset-foster-climate-innovation-study-impact-future-climate-conditions/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>datascience</category>
      <category>cloud</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Best practices for AWS Athena</title>
      <dc:creator>Christopher Thompson H.</dc:creator>
      <pubDate>Mon, 04 Oct 2021 05:44:01 +0000</pubDate>
      <link>https://dev.to/aws-builders/best-practices-for-aws-athena-12gb</link>
      <guid>https://dev.to/aws-builders/best-practices-for-aws-athena-12gb</guid>
      <description>&lt;p&gt;In this blog I will mention some of the best practices recommended by AWS for building queries in Athena based on my experience and the following resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; &lt;a href="https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/" rel="noopener noreferrer"&gt;https://aws.amazon.com/blogs/big-data/top-10-performance-tuning-tips-for-amazon-athena/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Joins" rel="noopener noreferrer"&gt;https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Joins&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  General Recommendations
&lt;/h1&gt;




&lt;h2&gt;
  
  
  Always use WHERE on partition field
&lt;/h2&gt;

&lt;p&gt;This mainly in order to speed up time and cost.&lt;br&gt;
For example:&lt;br&gt;
Avoid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table1&lt;/span&gt; &lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="k"&gt;cast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;integer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;cast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'201912'&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nb"&gt;integer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and prefer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table1&lt;/span&gt; &lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;col_particion&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'201911'&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;speedup&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;85&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;savings&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;95&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Avoid using ORDER BY without LIMIT
&lt;/h2&gt;

&lt;p&gt;It is extremely important to understand that the ORDER BY function must be done in a single node, since it is a slow and time-consuming function. Ideally it should be avoided, however, if within the use case you are implementing you must use it, I always recommend placing a LIMIT.&lt;br&gt;
For example:&lt;br&gt;
Avoid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table1&lt;/span&gt; &lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="nb"&gt;date&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and prefer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table1&lt;/span&gt; &lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="nb"&gt;date&lt;/span&gt; &lt;span class="k"&gt;limit&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;speedup&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt;&lt;span class="mi"&gt;98&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;avoid&lt;/span&gt; &lt;span class="s1"&gt;'Query exhausted resources at this scale factor'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Select only the columns to retrieve the final result
&lt;/h2&gt;

&lt;p&gt;This recommendation is very simple. In practical effect it is to avoid the SELECT * FROM.&lt;br&gt;
For example:&lt;br&gt;
Avoid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;tmp_table&lt;/span&gt;
&lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_2&lt;/span&gt;
&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_3&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table_1&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table_2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;tmp_table&lt;/span&gt;
&lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt;
&lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_2&lt;/span&gt;
&lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_3&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;col_1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;col_2&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table_1&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;left&lt;/span&gt; &lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;col_1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;col_3&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;table_2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;col_1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Schedule data aggregation for small files
&lt;/h2&gt;

&lt;p&gt;The numbers speak for themselves:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Query&lt;/th&gt;
&lt;th&gt;Number of files&lt;/th&gt;
&lt;th&gt;Run time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT COUNT(*) FROM lineitem&lt;/td&gt;
&lt;td&gt;5000&lt;/td&gt;
&lt;td&gt;8.4 seg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SELECT COUNT(*) FROM lineitem&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2.31 seg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speedup&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;72% faster&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Prefer the use of regular expressions over 'LIKE'
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Query&lt;/th&gt;
&lt;th&gt;Run time&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT COUNT(*) FROM lineitem WHERE text_column LIKE '%wake%' OR text_column LIKE '%some%' OR text_column LIKE '%express%' OR text_column LIKE '%hello%'&lt;/td&gt;
&lt;td&gt;20.56 seg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SELECT COUNT(*) FROM lineitem WHERE regexp_like(text_column,'...')&lt;/td&gt;
&lt;td&gt;15.87 seg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Speedup&lt;/td&gt;
&lt;td&gt;17% faster&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Note: The expression would be&lt;br&gt;
&lt;br&gt;
 &lt;code&gt;regexp_like(text_column, 'wake|some|express|hello')&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;




&lt;h2&gt;
  
  
  When using group by for multiple fields. order them from highest to lowest cardinality
&lt;/h2&gt;

&lt;p&gt;This will avoid memory errors and reduce the time to deliver results.&lt;br&gt;
For instance:&lt;br&gt;
Avoid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;people&lt;/span&gt; &lt;span class="k"&gt;group&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;column_genre&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;department&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;people&lt;/span&gt; &lt;span class="k"&gt;group&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;department&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;column_genre&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;In case of using Crawlers to automatically obtain the structure of the data stored in S3, respect the data types supported for the source engine. Likewise, do not forget to run the crawler after a data update that may generate changes in the structure, this in order to update the structure in the glue catalog.&lt;/p&gt;

&lt;p&gt;Use &lt;em&gt;MSCK REPAIR&lt;/em&gt; TABLE only if the folders are created with the structure 'field1 =  / field2 =  /.../ fieldN = ' and only after creating the table, since it is' msck repair table 'is expensive operation and it is preferable to use' alter table add partition 'or glue api to add partitions.&lt;/p&gt;

&lt;p&gt;and do you have any good practice that you recommend? Comment it in the comment box.&lt;/p&gt;

&lt;p&gt;I hope this blog is useful for you. Greetings!&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
    <item>
      <title>Importing metadata from the AWS Glue data catalog into Apache Atlas with EMR</title>
      <dc:creator>Christopher Thompson H.</dc:creator>
      <pubDate>Thu, 26 Aug 2021 06:22:52 +0000</pubDate>
      <link>https://dev.to/aws-builders/importing-metadata-from-the-aws-glue-data-catalog-into-apache-atlas-with-emr-4h8k</link>
      <guid>https://dev.to/aws-builders/importing-metadata-from-the-aws-glue-data-catalog-into-apache-atlas-with-emr-4h8k</guid>
      <description>&lt;h2&gt;
  
  
  What is going to be implemented
&lt;/h2&gt;

&lt;p&gt;We will implement Apache Atlas through the AWS EMR service by connecting the Hive catalog directly to the Glue service, being able to dynamically classify your data and see the lineage of your data as it goes through different processes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbsxohqzl3jq6omwzeb5g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbsxohqzl3jq6omwzeb5g.png" alt="architecture of reference"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Presentation of services to use
&lt;/h2&gt;

&lt;p&gt;Amazon EMR is a managed service that simplifies the implementation of big data frameworks like Apache Hadoop and Spark. If you are using Amazon EMR, you can choose from a predefined set of applications or choose your own from the list.&lt;/p&gt;

&lt;p&gt;The Apache Atlas project is a set of core governance services that enables companies to effectively and efficiently meet their compliance requirements with the entire enterprise data ecosystem. Apache Atlas provides metadata governance and management capabilities for organizations to catalog their data assets, classify and control these assets, and provide collaboration capabilities internally. In other words, help teams make the cycle of their own data transparent. For this reason, it is important in some business or architectural solutions to have these mechanisms of transparency and governance of their own data, in order to make the most of the knowledge of their data, through predictions in different ways. For example, market predictions, customer safety sessions, generation of impact campaigns, among many other ways to take advantage of the behavior of your data.&lt;/p&gt;

&lt;p&gt;Of the many features that Apache Atlas offers, the main feature of interest in this article is Apache Hive's data lineage and metadata management. After a successful Atlas setup, use native tools to import tables from Hive, analyze your data, and intuitively present your data lineage to your end users.&lt;/p&gt;




&lt;h2&gt;
  
  
  Implementation Steps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1.- Create glue-settings.json configuration file
&lt;/h3&gt;

&lt;p&gt;The first thing we will need to do is create a .json file with the following structure on our local computer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Classification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"hive-site"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"Properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"hive.metastore.client.factory.class"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2.- Preparation of environment in AWS (Review of default_emr_role and network infrastructure)
&lt;/h3&gt;

&lt;p&gt;This step is important for when we launch an EMR for the first time through the AWS CLI, especially for our command that we will execute in the following steps. The reason for this step is that when you start an EMR cluster you need to assign it a role, however when you first create it, that role is automatically created with the name default_emr_role.&lt;/p&gt;

&lt;p&gt;This is easily solved by launching a test cluster through the AWS Management Console. When you launch the cluster for the first time through the console, it will automatically create the default_emr_role role for you, which you can use with the lifting of our original cluster.&lt;/p&gt;

&lt;p&gt;Then you can go directly to the IAM service and check if the default role is already created.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4g7cezu5xdnl4b1rlim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4g7cezu5xdnl4b1rlim.png" alt="IAM Roles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced tip:&lt;/strong&gt; If you want to implement Apache Atlas in a limited and productive scenario, you must create a new role with the least possible privilege for EMR, which will be the one you will use to execute the following steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't forget to delete the test cluster that you used to create the role.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3.- Prepare parameters to create and run EMR cluster
&lt;/h3&gt;

&lt;p&gt;This step is important for the execution of the following code. The parameters to define are the following:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cluster_Name:&lt;/strong&gt; The name of the cluster you will need&lt;br&gt;
&lt;strong&gt;Instance_Type:&lt;/strong&gt; The type of family that each node will have&lt;br&gt;
&lt;strong&gt;Instance_Vol_Size:&lt;/strong&gt; The size of the EBS that is configured with the EMR&lt;br&gt;
&lt;strong&gt;Key_Name:&lt;/strong&gt; The name of the key pair created for the use and connection of this EMR&lt;br&gt;
&lt;strong&gt;Subnet_id:&lt;/strong&gt; The id of a subnet to use for this EMR&lt;br&gt;
&lt;strong&gt;S3_EMR_LOGDIR:&lt;/strong&gt; EMR machine log location&lt;/p&gt;

&lt;p&gt;In my case, the parameters that I will choose are the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CLUSTER_NAME=EMR-Atlas
INSTANCE_TYPE=m4.large
INSTANCE_VOL_SIZE=80
KEY_NAME=key-0a97d3c96668decaf
SUBNET_ID=subnet-09de17cf9eb1c56d3
S3_EMR_LOGDIR=s3://aws-logs-39483989-us-east-1/elasticmapreduce/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To obtain the subnet, you must go to the Amazon VPC service and obtain the ID of the subnet that you are going to use. You can also do it by command with the AWS CLI. For more information I leave you the following link: &lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4.- Create EMR Cluster with AWS CLI
&lt;/h3&gt;

&lt;p&gt;After having everything configured, the EMR cluster is created through the AWS CLI. It is important to note that these steps could be carried out through the AWS management console, decomposing the command according to the configuration options that are made from the interface. In my case, I find it easier to use the AWS CLI.&lt;/p&gt;

&lt;p&gt;The command with all our previously defined configurations would be the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws emr create-cluster &lt;span class="nt"&gt;--applications&lt;/span&gt; &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Hive &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;HBase &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Hue &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Hadoop &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ZooKeeper &lt;span class="nt"&gt;--release-label&lt;/span&gt; emr-5.33.0 &lt;span class="nt"&gt;--instance-groups&lt;/span&gt;  &lt;span class="nv"&gt;InstanceGroupType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;MASTER,InstanceCount&lt;span class="o"&gt;=&lt;/span&gt;1,InstanceType&lt;span class="o"&gt;=&lt;/span&gt;m4.large &lt;span class="nv"&gt;InstanceGroupType&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;CORE,InstanceCount&lt;span class="o"&gt;=&lt;/span&gt;1,InstanceType&lt;span class="o"&gt;=&lt;/span&gt;m4.large &lt;span class="nt"&gt;--use-default-roles&lt;/span&gt; &lt;span class="nt"&gt;--ebs-root-volume-size&lt;/span&gt; 80 &lt;span class="nt"&gt;--ec2-attributes&lt;/span&gt; &lt;span class="nv"&gt;KeyName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;apache-atlas,SubnetId&lt;span class="o"&gt;=&lt;/span&gt;subnet-0d95c4cdf3119f9ae &lt;span class="nt"&gt;--configurations&lt;/span&gt; file://./glue_settings.json &lt;span class="nt"&gt;--tags&lt;/span&gt; &lt;span class="nv"&gt;Name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;EMR-Atlas &lt;span class="nt"&gt;--name&lt;/span&gt; &lt;span class="s2"&gt;"EMR-Atlas"&lt;/span&gt; &lt;span class="nt"&gt;--steps&lt;/span&gt; &lt;span class="nv"&gt;Type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;CUSTOM_JAR,Jar&lt;span class="o"&gt;=&lt;/span&gt;command-runner.jar,ActionOnFailure&lt;span class="o"&gt;=&lt;/span&gt;TERMINATE_CLUSTER,Args&lt;span class="o"&gt;=&lt;/span&gt;bash,-c,&lt;span class="s1"&gt;'curl https://s3.amazonaws.com/aws-bigdata-blog/artifacts/aws-blog-emr-atlas/apache-atlas-emr.sh -o /tmp/script.sh; chmod +x /tmp/script.sh; /tmp/script.sh'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create an EMR cluster that you can monitor if you want from the AWS management console.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.- Modify import-hive.sh script in EMR cluster
&lt;/h3&gt;

&lt;p&gt;When we have the cluster up and running, we must enter the cluster with any of the various possible forms of connection. In my case I use an SSH connection. If you want more information about the steps I leave you the following link: &lt;a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-connect-master-node.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-connect-master-node.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you are already inside the cluster, you must execute the following commands in order:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo cp&lt;/span&gt; &lt;span class="nt"&gt;-ai&lt;/span&gt; /apache/atlas/bin/import-hive.sh&lt;span class="o"&gt;{&lt;/span&gt;,.org&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;sudo &lt;/span&gt;vim /apache/atlas/bin/import-hive.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This in order to modify the &lt;code&gt;import-hive.sh&lt;/code&gt; file. You could also use another editor that suits you other than vim.&lt;/p&gt;

&lt;p&gt;When you are inside the &lt;code&gt;import-hive.sh&lt;/code&gt; file, you must make the following changes:&lt;/p&gt;

&lt;p&gt;You will have to change this line of the file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ATLASCPPATH&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HIVE_CP&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HADOOP_CP&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;CP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;ATLASCPPATH&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HIVE_CP&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;HADOOP_CP&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:/usr/lib/hive/auxlib/aws-glue-datacatalog-hive2-client.jar"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the objective that Glue catalog to read directly to the base Atlas catalog.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.- Importing the Glue data catalog to Atlas
&lt;/h3&gt;

&lt;p&gt;Run the modified script to import the Glue metadata into Atlas.&lt;/p&gt;

&lt;p&gt;The user is &lt;code&gt;admin&lt;/code&gt; and the password is &lt;code&gt;admin&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/apache/atlas/bin/import-hive.sh


Enter username &lt;span class="k"&gt;for &lt;/span&gt;atlas :- admin
Enter password &lt;span class="k"&gt;for &lt;/span&gt;atlas :-

2021-08-25T13:58:234,43 INFO &lt;span class="o"&gt;[&lt;/span&gt;main] org.apache.atlas.hive.bridge.HiveMetaStoreBridge - Successfully imported 5 tables from database aws_db
Hive Meta Data imported successfully!!!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this way you will have already imported the glue catalog into Atlas.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advanced tip:&lt;/strong&gt; If you want to automate this catalog update you will have to run the &lt;code&gt;import-hive.sh&lt;/code&gt; shell file again.&lt;/p&gt;

&lt;h3&gt;
  
  
  7.- Connection to Atlas
&lt;/h3&gt;

&lt;p&gt;Finally, you must build a tunnel locally from the EMR in order to build an endpoint to connect to the atlas interface. For this, run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;&lt;span class="k"&gt;ssh&lt;/span&gt; -i apache-atlas.pem -vnNT -L &lt;span class="m"&gt;21000&lt;/span&gt;:localhost:21000 hadoop@&lt;span class="err"&gt;{&lt;/span&gt;ip_of_your_cluster&lt;span class="err"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this to connect to the interface you can access the following link:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="http://localhost:21000" rel="noopener noreferrer"&gt;http://localhost:21000&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The login screen will be displayed as shown below: Login with the password &lt;code&gt;admin&lt;/code&gt; and user &lt;code&gt;admin&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5771paum4phna5mkfni.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5771paum4phna5mkfni.png" alt="Apache Atlas login"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Already inside the interface, if you search for hive_table you will find the information of your glue catalog:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p9ob0p7zwjkslwt1t92.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7p9ob0p7zwjkslwt1t92.png" alt="Apache Atlas interfaces"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  References Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://atlas.apache.org/#/" rel="noopener noreferrer"&gt;https://atlas.apache.org/#/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/jp/blogs/news/metadata-classification-lineage-and-discovery-using-apache-atlas-on-amazon-emr/" rel="noopener noreferrer"&gt;https://aws.amazon.com/jp/blogs/news/metadata-classification-lineage-and-discovery-using-apache-atlas-on-amazon-emr/&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-connect-master-node.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-connect-master-node.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html" rel="noopener noreferrer"&gt;https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-what-is-emr.html&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>aws</category>
      <category>architecture</category>
      <category>cloud</category>
      <category>government</category>
    </item>
    <item>
      <title>What is the value of learning to learn in AWS</title>
      <dc:creator>Christopher Thompson H.</dc:creator>
      <pubDate>Wed, 09 Jun 2021 01:07:23 +0000</pubDate>
      <link>https://dev.to/aws-builders/what-is-the-value-of-learning-to-learn-in-aws-1dbm</link>
      <guid>https://dev.to/aws-builders/what-is-the-value-of-learning-to-learn-in-aws-1dbm</guid>
      <description>&lt;p&gt;Human beings learn to modify their skills and abilities through observation, practice or reasoning. This is called &lt;strong&gt;"learning"&lt;/strong&gt;. In simple words, from a young age we learn to acquire knowledge so as not to make the same mistakes twice, or to simply be better people.&lt;/p&gt;

&lt;p&gt;Approaching this concept from the world of work, it is very common at the beginning of our career to leave a university or in the course of it to leave wanting to apply what you have learned over many years of effort. However, when you leave a world of learning what the study of a profession is like, you enter a deeper and more intriguing one, realizing that what you know is only 1% of what you could know, and that in reality everything is more challenging to how they taught it to you.&lt;/p&gt;

&lt;p&gt;Depending on where you arrive, it will be partly how you develop or how you learn to learn. Yes, I said "learn to learn." Your first job will be essential to know how to develop your skills or start your ninja path. However, this is a double-edged sword. Why learning to learn can be a double-edged sword? It is simple. &lt;strong&gt;If you learn the wrong way, then it will be much more difficult for you to adjust to the real world when you leave that job&lt;/strong&gt;. I'm telling you because I was about to fall down that road. That is why I will teach you how to detect it in time and how to take the right path.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step One: Learn to Be Your Own Center&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;One of the hardest things when you're inexperienced, rookie, young Padawan, inexperienced licensed professional, enthusiastic youth, or how you put yourself on your resume, is to question the why of things. This is because if we are arriving as inexperienced we will need to observe others how they solve problems or how they face them (Learn from them).  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk3j36t2dtojsmap16xv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwk3j36t2dtojsmap16xv.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over the years this idea has been mutating due to generational changes that have occurred. It can occur in different situations in the working world, for example: When a leader or boss tells you to start a task, and details the problem, reason, but never tells you how to solve it and only tells you "Solve it for tomorrow." Vualah! This is a clear clue that it will not be a guided path and it will be a path where you will have to figure out how to solve or fulfill that task.&lt;/p&gt;

&lt;p&gt;If you are someone proactive, it will be very useful to ask that same leader how you could solve it or who you should look for to know how to do it. But if you are a not so proactive or shy person, with a hope that they will guide you in your early days, it will be very difficult for you to do that. On the contrary, you will most likely feel disappointed that they did not actually tell you how to solve something, even saving as a resource or answer the fact that they did not teach you how to solve it and that for that reason you have not done it yet. It is important to note that the proactivity of current generations have been changing the reason to be proactive, and older generations increasingly find it more difficult to understand what makes people or their teams proactive.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecfqn6a3ud1hm2o3713z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fecfqn6a3ud1hm2o3713z.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Therefore, you must learn to be your own center by looking around how others work to know your reason for being proactive. If you come to a job for the first time, you will have to understand that even if they have a “culture” or an “attempted culture” actually imposed by whoever created the company, it does not mean that you cannot get out of that circle and be better than that. If you come to conclude that with your analysis, that the culture that the company follows is a passionate and attractive culture to your way of thinking, you will be in the right place. But ... What if you don't like that culture? What if you think that the way of working of your first job does not seem correct to you? Should you accept it and learn that way? You will clearly have to improve it. And if you can't do it or they won't let you, it means you're not in the right place. And don't worry, improving it does not mean that you will have a war. On the contrary, it will improve your workplace even generating good results.&lt;/p&gt;

&lt;p&gt;Some time ago, talking with some guys who left my current job, I realized in reality that they did not leave because of an “opportunity” that came from nowhere or by magic. Rather, they decided to show their profiles as open to receiving opportunities. Who has not done it? When you already want to leave a job, you put on professional networks that you are open to receiving offers. But in reality this has always been a choice. You decide when you want to receive offers or when you want to find out more about them. Outdated companies and boomers don't take the time to understand why they are doing it. They only focus on the superficial, on the "He has not returned our hand" or on the "He lacked being more committed to us." But they never really wonder why he decided to accept the other offer or why he decided to find out more about them. You agree to be part of a process that can get you out of that circle that you don't want to be in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ytzaewl5ybws9ibts65.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9ytzaewl5ybws9ibts65.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That is why (and hopefully pass it well) it is important to know that should not scare you to decide your own path. To decide to be your own center, where you will have to create the trust to decide if the business culture that is imposed on you is the one that really represents you. This is how a real culture is formed.&lt;/p&gt;

&lt;p&gt;And now you will ask yourself: Why is this young man telling me all this? Well, because here comes the next point: What if I like where I am, but I am learning the wrong way? How do I know if I am learning the right way?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Decide how I want to learn&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Something that I can rescue from my current job is that I learned to know how I want to learn. I was saved from a learning obligation because I discovered that I want to be better than I am used to being. The idea of studying the wrong way, going the easy way, studying for a medal, studying or memorizing test questions, or studying to "meet a business goal" didn't suit me. Discovering this was not easy.&lt;/p&gt;

&lt;p&gt;In the beginning I was part of that system. I felt strange because I was actually able to learn that way and generate results. However, I felt that learning the fast way, when speaking with professionals who learned the slow way, the difference was huge. I could pretend that I knew a lot or that even with my medals I felt with the ability to face any question since they trusted me. But actually, they knew more than I did, and in a way, it showed. Therefore, some external professionals helped me understand which path to choose.&lt;/p&gt;

&lt;p&gt;I had the opportunity that during the start-up process, I met very professional people who helped me understand how I should decide how to learn. If it hadn't been for those people, I'd practically still be within the imposed system and maybe I'd still just be someone with medals. They had a study plan guided in the right way and with the right people. In the context that I work in, which is the world of Amazon Web Services, these people were the best people who could tell me how I should learn from AWS. The &lt;a href="https://aws.amazon.com/es/professional-services/" rel="noopener noreferrer"&gt;Amazon Professional Services&lt;/a&gt; team. They were professionals prepared to face any challenge in the cloud, and who would leave any partner company defeated if they made a competition of who was cooler. But in reality, they were normal people who had understood how they should learn, because Amazon as a company has a very interesting culture regarding people's learning. They showed me some secrets regarding how they learned, what was the platform, how they related to their peers, their networks, etc. An almost hidden world for a mere mortal outside of Amazon. Seeing this made me realize that learning the fast path was really only a long-term sentence. Since then, I never wanted to follow that path again and became independent from my knowledge.&lt;/p&gt;

&lt;p&gt;What if they hadn't helped me? What if you don't have someone to help you? Well, I'm sure that understanding that you are the center of your attention, you will still discover how you want to learn. Not so naturally or spontaneously, but anyway you would have come to the same conclusion that everyone must understand which paths exist and which one to choose. In fact, by reading this post you are getting a boost from someone who wants to help you.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Grow&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf0wowakj94dt4xka4aw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuf0wowakj94dt4xka4aw.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you were already partially able to figure out the conclusion of step one and two, I congratulate you. You are already growing. You are already learning. Very few people are able to do it, and very few know how to do it. While there will never be an owner of the truth and I clearly am not, there will always be someone who can guide you to discover your own truth. Don't let others take ownership of your truth, or force you to follow their truth. By reading this post, it is a form of growth.&lt;/p&gt;

&lt;p&gt;And rest assured, taking these steps will not always be easy. I never said it was. You will have to make difficult decisions, or think of optimal strategies to advance to a better place. Sometimes you will feel exhausted, distant, or disappointed. But you should know that in the end, the result is worth it.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Bonus: Where to look for a correct Study Plan&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While I showed you part of my vision for not studying incorrectly, I have not yet told you how to look up your study plan correctly. In this case, I will tell you about my experience to learn about Amazon Web Services, but you can carry out this search or plan with any other topic you want to study.&lt;/p&gt;

&lt;p&gt;First of all, I never recommend studying only the questions of some exam. That alternative is the worst they could recommend, because there is no real learning or understanding of the current context of all the services that involve the AWS cloud. AWS internal teams occupy their own platforms to learn, and this is clearly not a problem for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  My recommendations
&lt;/h3&gt;

&lt;p&gt;This does not mean that you cannot do mock or mock exams, where here comes my first recommendation. &lt;a href="https://www.whizlabs.com/" rel="noopener noreferrer"&gt;Whizlabs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0269ii7drb98mez4snn4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0269ii7drb98mez4snn4.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Whizlabs
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.whizlabs.com/" rel="noopener noreferrer"&gt;Whizlabs&lt;/a&gt; is a platform where its greatest power is based on simulation exams of various subjects. They have exams for almost all cloud providers where each question has its justification and its link to official documentation. For me this site was a great help to start simulating a real exam. It also has courses and labs to test AWS services.&lt;/p&gt;

&lt;p&gt;Another recommendation that I can give you is &lt;a href="https://www.qwiklabs.com/" rel="noopener noreferrer"&gt;QwikLabs&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  QwikLabs
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2mhpea88khohgmj1rvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv2mhpea88khohgmj1rvo.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a site where you can test your skills on administration consoles prepared for the specific laboratory. They are quite useful since it has a global subscription where if you pay for it you will be able to access all the existing laboratories on the platform. Be very careful with doing something that is not in the laboratory instructions, because they can cancel your account.&lt;/p&gt;

&lt;h3&gt;
  
  
  TutorialsDojo
&lt;/h3&gt;

&lt;p&gt;Finally another of the sites that have helped me a lot to learn the right way, is at &lt;a href="https://tutorialsdojo.com/" rel="noopener noreferrer"&gt;TutorialsDojo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frm7l22et9m79t5l8c2f4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frm7l22et9m79t5l8c2f4.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This site is a great place to start running quizzes and practical exams to address most of the existing certifications in cloud providers.&lt;/p&gt;

&lt;p&gt;Other platforms that I recommend are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.udemy.com/" rel="noopener noreferrer"&gt;Udemy&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloudacademy.com/" rel="noopener noreferrer"&gt;CloudAcademy&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Courses I Recommend
&lt;/h3&gt;

&lt;p&gt;I tell you that all over the internet there are a variety of courses that will really show you a correct context of AWS. However, one of my biggest secrets of my knowledge is &lt;a href="https://learn.cantrill.io/" rel="noopener noreferrer"&gt;Adrian's courses&lt;/a&gt;. These have positively impacted me. These courses come with an extreme dedication to improving the content you create every day.&lt;/p&gt;

&lt;p&gt;Each course or sheet is Adrian's own creation with the sole objective of explaining the concepts of the cloud in the best way possible.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faly6mu8h90nv0s5tu9dz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Faly6mu8h90nv0s5tu9dz.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The truth is that I have had other courses in other providers such as Udemy, Cloud Academy, aws.training, etc. But I have never seen such a dedicated and practical course as this. It also has many practical examples that will help you understand the concepts of the cloud.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>AWS Appflow as a Salesforce Migration Method with CDC</title>
      <dc:creator>Christopher Thompson H.</dc:creator>
      <pubDate>Sat, 29 May 2021 06:38:40 +0000</pubDate>
      <link>https://dev.to/aws-builders/aws-appflow-as-a-salesforce-migration-method-with-cdc-part-1-4742</link>
      <guid>https://dev.to/aws-builders/aws-appflow-as-a-salesforce-migration-method-with-cdc-part-1-4742</guid>
      <description>&lt;p&gt;&lt;em&gt;My Background: I am Cloud Engineer | Project Manager | Solution Architect in APN Advanced Consulting Partner | MLOps Engineer | 4x AWS | CSFPC™ | AWS Community Builder | Poke Master | Life apprentice&lt;/em&gt; :D&lt;/p&gt;




&lt;p&gt;For a long time, a business model known as SaaS has been expanding, which allows software to be distributed over the Internet. This model is an approach that came to replace or complement the traditional business model, changing a focus on the product with a focus on the service.&lt;/p&gt;

&lt;p&gt;To get into the context of this post first, we must know &lt;strong&gt;Salesforce&lt;/strong&gt;, which is a service under the SaaS model born a few years ago and it will be the service that we will discuss in this post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf97m3ffulw73cmfwdt9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyf97m3ffulw73cmfwdt9.png" alt="What is Salesforce?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.salesforce.com/" rel="noopener noreferrer"&gt;Salesforce&lt;/a&gt; is a famous CRM in the market, which provides 360º management capabilities of sales, marketing, customer service and all points of contact, in one place. Many clients have used or have migrated their business processes to this service that allows to keep all the flow of commercial or valuable information for the company centralized. &lt;/p&gt;

&lt;p&gt;Along with the growth of the cloud computing concept, these solutions under the SaaS model began to have the need to migrate from their on-premise servers to the cloud. For this reason, the different providers have brought out different services over the years that can help carry out this migration. Among these is &lt;strong&gt;Amazon Appflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://aws.amazon.com/appflow/" rel="noopener noreferrer"&gt;Amazon Appflow&lt;/a&gt;  is a fully managed no-code integration service enabling seamless and secure data flow between Amazon Web Services (AWS) and software-as-a-service (SaaS) applications. It allows you to source data from AWS services and SaaS applications such as Salesforce, and aggregate them in AWS data lakes and data warehouses to draw unique data-driven insights. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcxv8xz7kkxaouhh7arff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcxv8xz7kkxaouhh7arff.png" alt="alt text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This service presents as its main characteristic the possibility of connecting to various data sources that work under the SaaS model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybl984rrs3asshqulzwm.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fybl984rrs3asshqulzwm.jpg" alt="Compatibility"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;New data sources will most likely be added to Appflow support. &lt;/p&gt;

&lt;p&gt;However, the important thing about this post is to tell you how this service works to work with CDC (Change Data Capture), and how it has been my experience being one of the many pioneers who developed real solutions within weeks of the product being released.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Experience with the Release of AWS Appflow
&lt;/h2&gt;

&lt;p&gt;First of all, to protect the integrity of my client who used this service, I am going to mention the client in a generic way so as not to breach any NDA.&lt;/p&gt;

&lt;p&gt;The requested use case was to migrate Salesforce objects to a Data Warehouse, with the goal of reducing storage costs in the CRM. At the beginning of my project, the architecture that we had proposed together with AWS was something like the following diagram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmjqxu6e85vcc2sr109s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmjqxu6e85vcc2sr109s.png" alt="image"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;You may wonder why we migrated directly to the Redshift destination and not to AWS S3 to use Redshift Spectrum. The reason for this is simply because when we started the project, AWS Appflow did not yet have all the functionality to go to AWS S3 with upsert option, which meant that we would have to add some additional processing steps that would generate more work time. &lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem
&lt;/h3&gt;

&lt;p&gt;Thinking innocently, we thought together with the AWS architects, that the service could work according to the customer's expectations. However, the CDC feature was the biggest problem during the project.&lt;/p&gt;

&lt;p&gt;The problem was that when a record was updated, the record was duplicated at the destination (Amazon Redshift) generating duplication when making reports with a tool. Although the timestamp is a field that changes, the records that should be unique, such as the Id field, were duplicated.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpj4ouwp4e7y02gva9h9.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdpj4ouwp4e7y02gva9h9.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;This implementation was during the update of the AWS Appflow, where in October, 2020 an Upsert option was included to data sources such as Salesforce.&lt;/em&gt; &lt;a href="https://docs.aws.amazon.com/appflow/latest/userguide/doc-history.html" rel="noopener noreferrer"&gt;Document history for user guide AWS Appflow&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Solution
&lt;/h2&gt;

&lt;p&gt;The solution to this problem was to work with a Change data capture process generated in a stored procedure in Redshift. However, it could also have been:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do UPSERT processing with a Glue Job&lt;/li&gt;
&lt;li&gt;Send the data instead of the data warehouse to AWS S3 and perform UPSERT processing work with services such as Amazon EMR, managing the Data Lake layers (raw, stage, analytics).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our decision to use a stored procedure was because the nature of the project was to migrate to a Data Warehouse and not go through a Data Lake, since the client did not require this structure yet. In addition, the processing power of our Redshift according to the analyzed metrics, if it allowed to generate this stored procedure with a trigger that was executed with intervals of minutes.&lt;/p&gt;

&lt;p&gt;We also had to change the automatic architecture, where instead of the Appflow jobs being automatically executed by the incremental load of the service. Now the architecture was as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd2g789u3gsf7q0qrz8ug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd2g789u3gsf7q0qrz8ug.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps in architecture
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1.-&lt;/strong&gt; The first thing was to find a way to automate the execution of flows with full load, simulating being a daily load. AWS team we proposed to work with an example of CloudFormation of AppFlow with time-automation. The project is &lt;a href="https://github.com/aws-samples/amazon-appflow/tree/master/appflow-time-automation" rel="noopener noreferrer"&gt;Amazon AppFlow Relative Time Frame Automation Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.-&lt;/strong&gt; The second step is to start a lambda that will search an AWS DynamoDB control table for all the templates in S3 and configuration of the objects, with the aim of creating the jobs in AWS Appflow. All this flow will be managed under an AWS Step Function, having greater control in case of failures.&lt;/p&gt;

&lt;p&gt;The Step Function has the following design:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lve17wx9v6p9qlm08fx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6lve17wx9v6p9qlm08fx.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.-&lt;/strong&gt; The lambda_trigger_appflow is responsible for executing a CloudFormation stack which creates an AWS Appflow Job. This lambda also modifies the DynamoDB control table, to be queried by another Lambda called Status_Job. The aim of this Lambda is validate that jobs are created thanks alstack CloudFormation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4.-&lt;/strong&gt; The stack creates an AWS Appflow job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5.-&lt;/strong&gt; The Appflow Job is created with a Ready to run status.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6.-&lt;/strong&gt; The lambda start_job_appflow is in charge of starting all the jobs configured for this execution, also validating that they are all created correctly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7.-&lt;/strong&gt; After the AWS Appflow jobs have finished, an AWS Glue Job is executed that through boto3 will look for the Redshift credentials to Secret Manager, and this executes through Python code a procedure located in Redshift called &lt;code&gt;consolidated_of_tables&lt;/code&gt;. The sentence executed would be the following: &lt;code&gt;CALL consolidated_of_tables ()&lt;/code&gt;. No parameters are sent to this procedure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8.-&lt;/strong&gt; In the execution of this procedure, what it does is consolidate what is found in a temporary schema, called &lt;code&gt;salesforce_incremental&lt;/code&gt;, where thanks to functions such as GROUP BY, ROW_NUMBER can be compared with the target tables that would be in the final schema called &lt;code&gt;salesforce&lt;/code&gt;. What the procedure does is simply compare the incremental table with the source table, and it anticipates the duplication of records with unique values.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;9.-&lt;/strong&gt; As a final step, after having the data already consolidated in a final schema, a lambda called &lt;code&gt;delete_elements_flows_snapshots&lt;/code&gt; is executed as the last step, which what it does is delete the CloudFormation stacks and the Appflow Jobs already created, with the purpose not to overcome the services quota.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This solution, although it could have some defects related to the current capabilities of AWS Appflow, it is a simple architecture to implement and that can be executed in any proof of concept of clients that want to take their Salesforce objects to a DWH such as AWS Redshift.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>appflow</category>
      <category>cloud</category>
      <category>migration</category>
    </item>
  </channel>
</rss>
