<?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 Aminat Lawal on Medium]]></title>
        <description><![CDATA[Stories by Aminat Lawal on Medium]]></description>
        <link>https://medium.com/@ameenahlawal21?source=rss-5b60119115ed------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*g1S0ioMWM_ctvc9Be6i53Q.jpeg</url>
            <title>Stories by Aminat Lawal on Medium</title>
            <link>https://medium.com/@ameenahlawal21?source=rss-5b60119115ed------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:11:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ameenahlawal21/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[APIs for Data Engineers (Part 2) - Interacting with APIs: The Requests Library and the…]]></title>
            <link>https://blog.dataengineerthings.org/apis-for-data-engineers-part-2-interacting-with-apis-the-requests-library-and-an-api-request-c283775beadd?source=rss-5b60119115ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/c283775beadd</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[requests-library]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Aminat Lawal]]></dc:creator>
            <pubDate>Sun, 29 Sep 2024 15:25:49 GMT</pubDate>
            <atom:updated>2024-10-05T12:04:34.253Z</atom:updated>
            <content:encoded><![CDATA[<h3>APIs for Data Engineers (Part 2) - Interacting with APIs: The Requests Library and the Structure of an API Request</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*gLKZ3L31PhTCJdOWOJNF2w.png" /><figcaption>Installing the requests library</figcaption></figure><p>In <a href="https://medium.com/data-engineer-things/getting-started-with-apis-for-data-engineer-1348f76071e2">part one</a>, we explored the fundamentals of APIs, including HTTP methods, endpoints, requests, and responses. Now, let’s delve deeper into how you interact with APIs by crafting API requests.</p><p>To illustrate the concepts in this article, we will be using two APIs: the Openweather API and A<a href="https://allsportsapi.com/">ll Sports API. </a>Specifically, we will work with the <a href="https://openweathermap.org/current#data">current weather</a> endpoint and the <a href="https://www.api-football.com/">football API league</a> endpoints.</p><p>To help you follow along, I’ve also created a <a href="https://github.com/Ameenah21/Getting-Started-with-APIs-for-Data-Engineers/tree/main">Jupyter Notebook</a> that provides a detailed walkthrough with code examples and explanations. You can download the notebook and run the code yourself to deepen your understanding.</p><h4>The Requests Library</h4><p>There are different ways of interacting with APIs, you can use command line tools like `<a href="https://curl.se/">curl</a>. There are also different frameworks supported by different languages to use APIs. In python, <a href="https://requests.readthedocs.io/en/latest/">requests</a> library is the most popular libraries for making HTTP requests. Its simplicity and flexibility make it a go-to choice for data engineers and developers when working with web services.</p><p>Let’s start with a basic example using the OpenWeather API to retrieve current weather data:</p><pre>import requests<br>def get_weather(city):<br>    base_url = &quot;https://api.openweathermap.org/data/2.5/weather&quot;<br>    api_key = &quot;YOUR_API_KEY&quot;  # Replace with your actual API key<br>    <br>    # Parameters for the API request<br>    params = {<br>        &quot;q&quot;: city,<br>        &quot;units&quot;: &quot;metric&quot;,<br>        &quot;appid&quot;: api_key<br>    }<br>    <br>    response = requests.get(base_url, params=params)<br>    <br>    if response.status_code == 200:<br>        data = response.json()<br>        return f&quot;Current weather in {city}: {data[&#39;weather&#39;][0][&#39;description&#39;]}, Temperature: {data[&#39;main&#39;][&#39;temp&#39;]}°C&quot;<br>    else:<br>        return f&quot;Error retrieving data: {response.status_code}&quot;<br># Example usage<br>print(get_weather(&quot;London&quot;))</pre><p>Now, let’s look at an example using the football sports API to retrieve league information:</p><pre>import requests<br>import pandas as pd<br>pd.set_option(&#39;display.max_colwidth&#39;, None)def get_league_info(league_id, season):<br>    base_url = &quot;https://v3.football.api-sports.io/leagues&quot;  #&quot;https://api-football-v1.p.rapidapi.com/v3/leagues&quot;<br>    api_key = API_KEY # Replace with your actual API key<br>    <br>    # Headers for the API request<br>    headers = {<br>        &quot;X-RapidAPI-Key&quot;: api_key,<br>        &quot;X-RapidAPI-Host&quot;: &quot;api-football-v1.p.rapidapi.com&quot;<br>    }<br>    <br>    # Parameters for the API request<br>    params = {<br>        &quot;id&quot;: league_id,<br>        &quot;season&quot;: season<br>    }<br>    <br>    response = requests.get(base_url, headers=headers, params=params)<br>    <br>    if response.status_code == 200:<br>        data = response.json()<br>        league=pd.DataFrame.from_dict(data[&#39;response&#39;])<br>        return league<br>    else:<br>        print(api_key)<br>        return league, f&quot;Error retrieving data: {response.status_code}&quot;<br># Example usage, to return league information for UEFA for the 2024 season<br>print(get_league_info(2, 2024)) #league_id = 2, season=2024</pre><p>Let us examine the feature of our requests more closely.</p><p>Understanding the structure of an API request is fundamental when working with APIs. Every interaction with an API revolves around constructing and sending an HTTP request. The key components of an API request include:</p><ul><li>HTTP Method</li><li>URL (Uniform Resource Locator)</li><li>Authentication</li><li>Headers</li><li>Query Parameters</li><li>Request Body</li></ul><p>Let’s break these down:</p><p><strong>1. HTTP Method:</strong> The HTTP method defines the action to be performed on the API resource. Common methods include GET, POST, PUT, and DELETE. In our examples, we primarily use the GET method to retrieve data.</p><p><strong>2. URL (Uniform Resource Locator):</strong> This specifies the exact location of the resource you want to interact with. It essentially tells the API where to deliver your request. The URL typically consists of two parts:</p><ul><li><strong>Base URL:</strong> The base URL of the API server, which remains constant for most requests.</li><li><strong>Path:</strong> The specific path to the resource within the API. This path can sometimes include parameters that further refine your request (we’ll cover this later).For instance, in https://api.example.com/users/123, the base URL is https://api.example.com, and the path is /users/123, indicating you want to interact with the user resource with ID 123.</li></ul><p><strong>Example:</strong></p><p>Consider the API that provides weather data. To retrieve the current weather conditions for London, UK, you might construct a GET request like this:</p><pre>response = requests.get(&quot;http://api.openweathermap.org/data/2.5/weather?q=London,uk&amp;appid=your_openweathermap_api_key&quot;)<br>print(response.text)</pre><p>- OpenWeather API: `<a href="https://api.openweathermap.org/data/2.5/weather%60">https://api.openweathermap.org/data/2.5/weather`</a><br>- Football API: `<a href="https://api-football-v1.p.rapidapi.com/v3/leagues%60">https://api-football-v1.p.rapidapi.com/v3/leagues`</a></p><p><strong>3. Authentication:</strong> Most APIs require some form of authentication, which typically involves signing up on their platform to obtain credentials. Authentication methods can vary between APIs:</p><ul><li><strong>Authentication with OpenWeatherMap API</strong>: Uses an API key passed as a query parameter (`appid`).</li></ul><pre>response = requests.get(&quot;http://api.openweathermap.org/data/2.5/weather?q=London,uk&amp;appid=your_openweathermap_api_key&quot;)<br>print(response.text)</pre><pre>#passing in parameters as variables<br>url = f&quot;https://api.openweathermap.org/data/2.5/weather&quot;<br>params = {<br> &quot;q&quot;: city,<br> &quot;units&quot;: &quot;metric&quot;,<br> &quot;appid&quot;: api_key # API key as a query parameter<br> }<br>response = requests.get(url, params=params)<br>data = response.json()</pre><p>What’s happening?</p><ul><li>We’re making a GET request to the OpenWeatherMap API to get the weather in London.</li><li>The appid parameter is where we include our API key, which tells the API that we’re allowed to access this data.</li></ul><p><strong>Authentication with Football Data API: </strong>This one handles things a bit differently — it wants your API key to be passed in the headers.</p><pre>response = requests.get(&quot;https://v3.football.api-sports.io/leagues&quot;, headers={<br>    &#39;x-rapidapi-key&#39;: &#39;your_football_api_key&#39;,<br>    &#39;x-rapidapi-host&#39;: &#39;v3.football.api-sports.io&#39;<br>})<br>print(response.text)</pre><p><strong>Key difference:</strong></p><ul><li>Here, we pass the API key in the headers, not the URL. The header x-rapidapi-key carries your credentials, and the API checks this before giving you the data.</li></ul><p><strong>4. Headers: </strong>Headers provide additional information about the request. They are key-value pairs included in the request to convey metadata. Common headers include:</p><ul><li>Content-Type: Specifies the format of the data you’re sending in the request body</li><li>User-Agent: Identifies the client making the request</li><li>Authorization: Often used for passing API keys or tokens (as in our Football API example)</li></ul><p><strong>5. Query Parameters:</strong> Query parameters are a way customize what data you want to get back after making a GET request to an API. They are appended after a question mark ?and separated by ampersands &amp;. These parameters allow you to filter or modify the request to retrieve specific data.</p><p><strong>Example 1: Query Parameters for Filtering:</strong></p><p>Consider the weather API again, The default temperature is Farenheits. Let’s say you want the weather in Lagos, Nigeria, but you also want the temperature in Celsius. You’d use query parameters to ask for exactly that.</p><pre>params = {<br> &quot;q&quot;: &#39;Lagos&#39;,<br> &quot;units&quot;: &quot;metric&quot;,#putting the units as metric returns the temperature in celsius<br> &quot;appid&quot;: WAPI # API key as a query parameter<br> }<br>url = f&quot;https://api.openweathermap.org/data/2.5/weather&quot;#?q={city}&amp;appid={WAPI}&amp;units={units}&quot;<br>response = requests.get(url, params=params)<br>data = response.json()<br>print(f&quot;Temperature in {data[&#39;name&#39;]}: {data[&#39;main&#39;][&#39;temp&#39;]}°C&quot;)<br>#other parameters include language to specify the output in a supported language, mode to specify output format such as json,xml etc</pre><p><strong>What’s happening?</strong></p><ul><li>The q parameter tells the API we’re interested in London.</li><li>The units parameter requests that temperatures be returned in Celsius.</li><li>And, of course, the appid parameter is your key to access the data.</li></ul><p><strong>Example 2: Geographical Parameters</strong></p><p>You can also request data based on coordinates — like if you wanted the weather at a specific location.</p><pre>response = requests.get(&quot;http://api.openweathermap.org/data/2.5/weather?lat=6.4550575&amp;lon=3.3941795&amp;appid=your_openweathermap_api_key&quot;)<br>print(response.text)</pre><p><strong>What’s happening?</strong></p><ul><li>The lat (latitude) and lon (longitude) parameters target a specific spot on the map.</li><li>You’re asking the API, “What’s the weather like right here?”</li></ul><p><strong>6. Request Body:</strong> The request body contains data sent to the server. It is mainly used with POST, PUT, and PATCH methods. The format of the body is usually JSON, XML, or form data. In our GET request examples, we didn’t need to use a request body.</p><p><strong>Example: Using a PUT Request with a Request Body</strong></p><p>Imagine we have an API endpoint that allows you to update user profile information such as name, email, and phone number. This is where a PUT request comes in handy, as it’s typically used to update existing resources.</p><p>Here’s how you might structure this request:</p><pre>import requests# The URL for the API endpoint that updates user profiles<br>url = &quot;https://api.example.com/users/123&quot;# The updated data you want to send in the request body<br>updated_user_info = {<br>    &quot;name&quot;: &quot;John Doe&quot;,<br>    &quot;email&quot;: &quot;johndoe@example.com&quot;,<br>    &quot;phone&quot;: &quot;123-456-7890&quot;<br>}<br># Headers that might include the API key and content type<br>headers = {<br>    &quot;Authorization&quot;: &quot;Bearer your_api_key_here&quot;,<br>    &quot;Content-Type&quot;: &quot;application/json&quot;<br>}<br># Sending the PUT request with the updated user info in the request body<br>response = requests.put(url, json=updated_user_info, headers=headers)# Checking if the request was successful<br>if response.status_code == 200:<br>    print(&quot;User profile updated successfully!&quot;)<br>    print(response.json())  # Print the updated profile details<br>else:<br>    print(f&quot;Failed to update profile. Status code: {response.status_code}&quot;)<br>    print(response.text)</pre><p><strong>What’s happening?</strong></p><ul><li>URL: The URL points to the specific user we want to update (https://api.example.com/users/123). Here, 123 is the user ID.</li><li>Request Body:We include the updated information (name, email, and phone) in the request body as a JSON object. This is where the PUT method shines—it’s designed to send a complete representation of the resource you want to update.</li><li>Headers:The Authorization header passes the API key as a bearer token, which is a common authentication method. The Content-Type header specifies that the data being sent is in JSON format.</li><li>Request:The requests.put method sends the PUT request to the API, with the updated user information included in the body.</li><li>Response:We check the status code to see if the update was successful (200 OK). If successful, the API should return the updated profile information, which we print out.</li></ul><p><strong>7. Documentation:</strong> While not a part of the request itself, API documentation is crucial for understanding how to structure your requests correctly. The documentation is the single most important source of information about an API. It provides details on:</p><p>- Available endpoints and their purposes<br>- Required and optional parameters<br>- Authentication methods<br>- Response formats<br>- Error codes and their meanings<br>- Rate limits and usage restrictions</p><p>Always consult the API documentation before working with a new API. For example:</p><ul><li>The OpenWeather API documentation tells us to include the API key as a query parameter named appid.</li><li>The Football API documentation (via RapidAPI) instructs us to include the API key in the headers as x-RapidAPI-Key.</li></ul><p>These specifics can only be known by referring to each API’s documentation, highlighting its importance in correctly structuring your API requests.</p><h4>Conclusion</h4><p>In this part of the series, we built on the foundational knowledge of APIs in the first part to making our first APIs requests. We examined the structure of API requests and made our first requests using the python requests library. We’ve covered a lot from basic authentication and parameter handling to more advanced topics like parsing JSON responses and structuring API requests effectively.</p><p>We looked at key components of API requests, including authentication, parameters and parsing responses, all crucial for building scalable, professional-grade applications. The accompanying Jupyter notebook includes all the examples we’ve discussed, along with additional explanations and additional exercises.</p><p>APIs are powerful tools, and mastering them will significantly enhance your capabilities as a data engineer. Don’t hesitate to explore new APIs, try different libraries, and push the boundaries of what you can do with API-sourced data.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c283775beadd" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/apis-for-data-engineers-part-2-interacting-with-apis-the-requests-library-and-an-api-request-c283775beadd">APIs for Data Engineers (Part 2) - Interacting with APIs: The Requests Library and the…</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</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 APIs for Data Engineers]]></title>
            <link>https://blog.dataengineerthings.org/getting-started-with-apis-for-data-engineer-1348f76071e2?source=rss-5b60119115ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/1348f76071e2</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Aminat Lawal]]></dc:creator>
            <pubDate>Fri, 26 Jul 2024 16:24:40 GMT</pubDate>
            <atom:updated>2024-08-02T10:46:59.378Z</atom:updated>
            <content:encoded><![CDATA[<h3>Getting Started with APIs for Data Engineers (Part 1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0kaV5KK-YRsvxXOn8v3Rjg.png" /><figcaption>Using Python’s requests library to interact with the GitHub API. This code retrieves information about a user from GitHub using their username.</figcaption></figure><p>If you’ve spent any time in software development, you’ve undoubtedly heard of APIs. In data engineering, it might take a while longer, but APIs will become essential tools in your belt.</p><h4>So what are APIs and what do they do?</h4><p>API stands for Application Programming Interface. They are a set of protocols and tools that allow different software applications to communicate with each other. In simpler terms, it’s a middleman that enables different software applications to talk to each other. APIs provide a standardized way to send or receive data.</p><p>This concept is fundamental in software engineering because it allows applications to exchange data and functionalities. Developers can leverage services provided by other systems, even if they were built with different tools. Think of APIs as universal translators, allowing applications built in different languages to communicate seamlessly. REST, SOAP, and GraphQL are some of the most common API formats.</p><blockquote>Another way to visualize an API is as an exposed door (endpoint) of an application (web, mobile, etc.). You interact with this door by sending HTTP requests, and the application responds accordingly.</blockquote><h4>Data Engineers and APIs</h4><p>One of the core tasks of data engineers is extracting and integrating data from various sources. APIs are game-changers in this aspect, enabling them to access a vast amount of data. Public and private APIs provide valuable data that can enrich analysis and data pipelines. Data engineers essentially need to find data wherever it resides, and often, that data sits behind API endpoints. Data engineer also build APIs to expose data for others to use.</p><p><strong>Common Use Cases for Data Engineers with APIs</strong></p><ul><li>Retrieving data from external sources (weather data, social media data, financial data)</li><li>Integrating with cloud storage services (AWS S3, Google Cloud Storage)</li><li>Interacting with databases (using database APIs)</li><li>Extracting data from web applications (web scraping APIs)</li></ul><p>For data engineers, APIs are crucial for several reasons:</p><ul><li>Data Integration: APIs enable the integration of data from various sources, such as databases, third-party services, and cloud platforms.</li><li>Automation: APIs allow for the automation of data workflows, reducing manual effort and minimizing errors.</li><li>Scalability: With APIs, data engineers can build scalable systems that can handle large volumes of data and complex transformations.</li><li>Real-time Data Access: APIs provide real-time access to data, which is essential for applications that require up-to-date information.</li></ul><h4>Concepts in APIs</h4><p>To work with APIs, there are some fundamental concepts we have to understand, some of which include the following:</p><p><strong>HTTP protocol Methods:</strong> Most of the APIs on the web communicate using the HTTP protocol. HTTP (Hypertext Transfer Protocol) is the foundation of data communication on the World Wide Web. It’s a protocol that defines how messages are formatted and transmitted between web browsers and servers. APIs often use HTTP methods to perform various operations. The most common ones used for making requests to endpoints include:</p><ul><li><strong>GET:</strong> This method retrieves data from the server. It is used to request data from a specified resource without making any modifications.</li></ul><pre>response = requests.get(&#39;https://api.example.com/data&#39;)</pre><ul><li><strong>POST:</strong> This method sends data to the server, typically to create a new resource. It often includes a request body containing the data to be created.</li></ul><pre>url = &#39;https://api.example.com/data&#39;<br>data = {&#39;key&#39;: &#39;value&#39;}<br>response = requests.post(url, json=data)</pre><ul><li><strong>PUT:</strong> This method updates an existing resource with new data. It is used to send data to the server to update a resource, usually specified by an identifier.</li></ul><pre>url = &#39;https://api.example.com/data/1&#39;<br>data = {&#39;key&#39;: &#39;new_value&#39;}<br>response = requests.put(url, json=data)</pre><ul><li><strong>DELETE:</strong> This method removes a resource from the server.</li></ul><pre>response = requests.delete(&#39;https://api.example.com/data/1&#39;)<br></pre><ul><li><strong>PATCH</strong>: Apply partial modifications to a resource. Unlike PUT, which updates the entire resource, PATCH only updates the specified fields.</li></ul><pre>url = &#39;https://api.example.com/data/1&#39;<br>data = {&#39;key&#39;: &#39;new_partial_value&#39;}<br>response = requests.patch(url, json=data)</pre><p><strong>Endpoints:</strong> Endpoints are specific URLs on an API server that act as entry points for interaction. They provide access to different resources or services offered by the API. Each endpoint has a unique URL defining where to direct your API requests. Endpoints typically represent functionalities or specific data sets within the API. For instance, an endpoint might provide access to all user data within a social media API.</p><p>Example</p><pre>- GET https://api.example.com/users might fetch a list of users.<br>- POST https://api.example.com/users might create a new user.</pre><p><strong>Request and Response:</strong> APIs interact using a client-server model. When you (the client) interact with an API, you initiate a conversation by sending a request.</p><ul><li>Request: This request typically includes an HTTP method, a URL, headers, and possibly a body (for methods like POST and PUT).</li><li>Response: The server then processes the request and sends a response back to the client with data, status codes, and headers. The response usually contains the requested data in a format like JSON or XML.</li></ul><p><strong>Headers</strong>: Headers are key-value pairs sent with API requests and responses. They provide essential information about the request or response, such as content type, authentication credentials, and more.</p><p>Common Headers:</p><ul><li>Authorization: Contains credentials for authentication.</li><li>Content-Type: Indicates the media type of the resource (e.g., application/json).</li></ul><p><strong>Status Codes:</strong> HTTP status codes indicate the result of the API request. Understanding these codes helps in handling responses appropriately.</p><ul><li>2xx: Success (e.g., 200 OK, 201 Created).</li><li>4xx: Client errors (e.g., 400 Bad Request, 404 Not Found).</li><li>5xx: Server errors (e.g., 500 Internal Server Error).</li></ul><p><strong>Authentication and Authorization:</strong> APIs often require authentication and authorization to ensure secure access. Common methods include:</p><ul><li>API Keys: Simple tokens that identify the client making the request.</li><li>OAuth: A more complex method allowing users to grant third-party access to their resources without sharing credentials.</li><li>JWT (JSON Web Tokens): Encoded tokens that securely transmit information between parties.</li></ul><p><strong>Rate Limiting:</strong> APIs typically enforce rate limits to control the number of requests a client can make within a specific time frame. Exceeding the limit usually results in a 429 <em>Too Many Requests </em>response.</p><p><strong>Pagination:</strong> When dealing with large datasets, APIs often implement pagination to split the data into manageable chunks. Clients can navigate through these chunks using parameters like page and limit.</p><pre>GET https://api.example.com/users?page=2&amp;limit=50</pre><p><strong>Error Handling:</strong> Effective error handling is crucial for robust API integration. API responses include error messages and status codes that help diagnose issues. Implementing retry logic, backoff strategies, and logging can improve reliability.</p><p><strong>Data Formats:</strong> APIs commonly use specific formats for data interchange:</p><ul><li>JSON (JavaScript Object Notation): Lightweight, easy to read and parse.</li><li>XML (eXtensible Markup Language): More verbose, used in older APIs.</li><li>Others: CSV, YAML, etc., depending on the API.</li></ul><p><strong>Versioning:</strong> API versioning allows changes to be made to an API without disrupting existing clients. Versions can be specified in the URL, headers, or request parameters.</p><ul><li>Example:</li></ul><p>https://api.example.com/v1/users vs. <a href="https://api.example.com/v2/users">https://api.example.com/v2/users</a></p><p><strong>Documentation</strong>: The most effective way to understand how to interact with an API is through its documentation. All APIs are often accompanied by comprehensive documentation that provides extensive information on how to interact with the API. This documentation is vital for understanding the various aspects of the API, including the specific paths on the API server where different resources or services are available, the structure and format of the data you need to send in requests and the format of the data you will receive in responses, the required methods for securely accessing the API such as API keys, OAuth, or JWT, the possible errors you might encounter and how to handle them, and practical examples and use cases demonstrating how to use the API effectively.</p><p><strong>Conclusion</strong><br>As we’ve explored, APIs are fundamental tools in a data engineer’s toolkit. They provide a standardized way to access and integrate data from various sources, enabling powerful data pipelines and analytics workflows. Let’s recap the key takeaways:</p><ul><li>APIs allow different software applications to communicate, acting as universal translators for data exchange.</li><li>For data engineers, APIs are crucial for data integration, automation, scalability, and real-time data access.</li><li>Understanding HTTP methods, endpoints, request-response cycles, and authentication is essential for working with APIs effectively.</li><li>Concepts like rate limiting, pagination, and error handling are important for building robust API integrations.</li></ul><p>As a data engineer, mastering APIs will open up new possibilities for data extraction, transformation, and loading (ETL) processes.</p><p>In the next part of this series, we’ll dive deeper into practical implementation, exploring the requests library and the structure of API requests in Python. This will equip you with the tools to start integrating APIs into your data workflows effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1348f76071e2" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/getting-started-with-apis-for-data-engineer-1348f76071e2">Getting Started with APIs for Data Engineers</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Navigating the Data Engineering Tooling landscape: Staying Focused on What Matters]]></title>
            <link>https://blog.dataengineerthings.org/navigating-the-data-engineering-tooling-landscape-staying-focused-on-what-matters-d2855963cebb?source=rss-5b60119115ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2855963cebb</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[career-development]]></category>
            <category><![CDATA[learning-and-development]]></category>
            <dc:creator><![CDATA[Aminat Lawal]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 07:28:47 GMT</pubDate>
            <atom:updated>2023-11-06T17:38:23.191Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5XrEOMW9kH2sslJe" /><figcaption>Photo by <a href="https://unsplash.com/@sloppyperfectionist?utm_source=medium&amp;utm_medium=referral">Hans-Peter Gauster</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>“Data engineering nowadays suffers from an embarrassment of riches. We have no shortage of technologies to solve various types of data problems.</blockquote><blockquote><em>– From “</em><a href="https://www.oreilly.com/library/view/fundamentals-of-data/9781098108298/"><em>Fundamentals of Data Engineering</em></a><em>”</em></blockquote><p>For those new to data engineering, one of the most common questions is which tools to learn. Which programming language should you focus on? Which cloud platform warrants your attention?</p><p>The sheer multitude of data engineering tools can be overwhelming, making it easy to lose focus and get caught up in the complexity of the choices.</p><p>In this article, we’ll explore how to navigate this ever-evolving landscape, find equilibrium and establish a robust foundation.</p><h4>The Importance of a Plan</h4><p>Last year, I was eager to dive into learning <a href="https://docs.getdbt.com/docs/introduction">dbt (data build tool)</a>. It had always been a part of my long-term plan, and there are no shortage of resources to get started, but the timing wasn’t right. To keep myself focused and structured I was following a learning plan that prioritized tools based on their relevance to my career goals and ongoing projects.</p><blockquote>My motivation for devising this plan was a result of a previous end-of-year review. During that review, I had a sense of being scattered and lacked confidence in the tools I had acquired. It was clear that I needed to steer clear of the haphazard approach that had left me feeling disorganized and unfocused. This was not the first time I had felt like jumping on a technology.</blockquote><p>My solution was simple: I made a list of the technologies I needed to learn, and I designated specific time periods for each. Rather than hastily jumping into a new technology, I implemented a system. This system hinged on three pivotal questions I to ask myself each time I felt the urge to dive headfirst into something new:</p><ol><li>How important is it that I learn this now?</li><li>Is it relevant to my ongoing projects, or is there an opportunity to apply it to my current work?</li><li>Are there more pressing matters that should take precedence?</li></ol><p>When it came to dbt, it met the criteria of question one, but fell short on both questions two and three. It wasn’t directly applicable to my ongoing work, and more pressing priorities took precedence.</p><p>At that time though, it felt very important that I learn dbt. It seemed like everyone in the data engineering community was adopting it, and companies were incorporating it into their workflows. <a href="https://en.wikipedia.org/wiki/Fear_of_missing_out">FOMO (Fear of Missing Out)</a> was hard to resist, but I reminded myself of the importance of sticking to my plan.</p><p>But still I couldn&#39;t resist the pull. So I made a compromise. I decided to take a course on dbt and delve into its documentation and core concepts. During this time, I realized that many of the concepts upon which dbt was built were familiar to me:</p><ul><li>Data Modeling: ✔</li><li>Configuration with YAML: ✔</li><li>Data Transformation: ✔</li><li>SQL: ✔</li><li>Version control: ✔</li></ul><p>Despite never having worked with dbt, I could see that it was grounded in concepts I understood well. If I ever needed to implement a solution with dbt before I had an opportunity to dive into it properly, I was confident that I could adapt and integrate it into my existing skill set while sticking to my initial plan.</p><p>As the year progressed, my commitment to this approach paid off. I encountered numerous technologies I was unfamiliar with, but the solid foundation in data engineering concepts made the learning curve smoother. What stood out to me was the realization that, although the data engineering tool landscape is vast and ever-growing, many core implementation principles remain consistent.</p><h4>So, how do you keep up and stay on top of your game in a field as dynamic as this?</h4><h4><strong>You Master the Fundamentals and Core Concepts</strong></h4><p><strong><em>Fundamentals will save you. </em></strong>The significance of mastering the fundamentals cannot be overstated. This involves gaining a deep understanding of data engineering as a discipline, why various aspects matter, the overall data engineering lifecycle, and where each piece fits into the larger puzzle. Visualize the data engineering lifecycle in your mind, comprehend the basics of storage, computation, orchestration and more. These principles are the backbone of data engineering and provide a solid grounding that allows you to adapt to different tools as needed.</p><p>When approaching a new technology, consider it as fitting into this framework. Ask yourself why it matters and what problems it aims to solve. This is why the <a href="https://www.oreilly.com/library/view/fundamentals-of-data/9781098108298/">Fundamentals of Data engineering</a> always works, it teaches you what matters without placing emphasis on technologies. Across various tools, a common thread exists — the overarching problems they address, whether related to data storage, computation, orchestration, data modeling etc.</p><p>Take, for instance, cloud computing. To work on a cloud platform as data engineer, you would want to know how it enables the different kinds of storage, what offers of compute it has, identity and access management etc. Irrespective of the specific cloud platform, the fundamental reasons behind its existence and what it enables remain largely consistent.</p><p>There is a reason why Python and SQL are consistently recommended. It’s not just about writing elegant code; it’s because these languages underpin the implementation of solutions across a wide array of tools. Python and SQL serve as the lingua franca in the data engineering world, allowing you to effectively navigate various technologies.</p><p>The focus, then, should shift towards understanding how a tool implements these principles. In the ever-evolving landscape of data engineering, it’s the implementation that truly matters.</p><ul><li><strong>Stick to a Plan:</strong> Having a structured plan for skill development is crucial. It helps you stay focused and avoid the temptation of constantly chasing the latest tools. Your plan should be aligned with your career goals and tailored to what you need at a given point in time.</li><li><strong>Learn to Ask for Help:</strong> You’re not alone on your journey. Numerous resources are available to assist you in navigating the landscape of tools. Join relevant Slack channels, online communities, and forums to seek assistance and glean insights from experienced professionals. Many tools have dedicated community spaces on platforms like Slack and Discord where you can pose questions to maintainers and fellow users. Collaboration and knowledge-sharing are invaluable. There is no shortage of resources communities and events to help, you will be fine.</li><li><strong>Separate Work from Tools:</strong> Don’t tie your work too closely to specific tools. Instead, focus on the problems you need to solve and the desired outcomes. Once you understand the problems and objectives, you can select the best tools for the job.</li><li><strong>Develop effective Learning Strategies:</strong> Develop effective learning strategies. Be mindful of how you learn best, whether it’s through online courses, documentation, hands-on practice, or a combination of these. Effective learning habits can help you adapt to new tools more efficiently.</li><li><strong>Embrace Lifelong Learning:</strong> The data engineering field is dynamic and continually evolving. Embrace a mindset of lifelong learning, and be open to adapting as new technologies and methods emerge. At first, you learn enough to get a job, then you keep learning to do the job and excel in your role. Stay curious and keep exploring new concepts.</li></ul><h3>Conclusion</h3><p>In conclusion, while it may seem like there’s a never-ending stream of tools in data engineering, the key to success is mastering the fundamentals, staying adaptable and open to continuous learning.</p><p>The goal is not to be someone who simply employs a specific technology; rather, it is to be a highly adaptable professional, capable of harnessing the most suitable technology to address the specific challenges at hand, to ensure the best possible outcomes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2855963cebb" width="1" height="1" alt=""><hr><p><a href="https://blog.dataengineerthings.org/navigating-the-data-engineering-tooling-landscape-staying-focused-on-what-matters-d2855963cebb">Navigating the Data Engineering Tooling landscape: Staying Focused on What Matters</a> was originally published in <a href="https://blog.dataengineerthings.org/">Data Engineer Things</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Distributed Systems and Technologies]]></title>
            <link>https://medium.com/@ameenahlawal21/distributed-systems-and-technologies-843fb25ccb9a?source=rss-5b60119115ed------2</link>
            <guid isPermaLink="false">https://medium.com/p/843fb25ccb9a</guid>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[distributed-systems]]></category>
            <category><![CDATA[distributed-technology]]></category>
            <category><![CDATA[distributed-computing]]></category>
            <dc:creator><![CDATA[Aminat Lawal]]></dc:creator>
            <pubDate>Thu, 24 Aug 2023 10:05:30 GMT</pubDate>
            <atom:updated>2023-08-24T10:05:30.685Z</atom:updated>
            <content:encoded><![CDATA[<p>A Distributed system is a group of independent computers (called nodes) working together to achieve a collective goal. This goal could be a task or providing a service. They work together as a unit in such a way that they must appear as a single system to the user. They communicate and work together by distributing state, information and resources amongst themselves in a highly coordinated manner. These nodes can be located together or spread across different geographical locations.</p><p>Examples of distributed systems include distributed computing, distributed storage, distributed databases etc.</p><blockquote>The biggest example of a distributed system is the internet. The internet is powered by thousands of computers all over the world, receiving and processing millions of requests every second.</blockquote><h4>Why would we want to build distributed Systems?</h4><p>Distributed systems exist for many reasons, some of which include:</p><p><strong>Scaling</strong>: Scalability is the term used to describe a system’s ability to cope with increased load. <br>This is one of the most important reasons for the existence of distributed systems, some workloads are just too big for a single computer. There are two ways systems can deal with increasing workload: vertically (scaling up)and horizontally(scaling out).</p><p>Vertical scaling involves upgrading a computer’s hardware with more powerful processors, increased CPU, and RAM. However, this approach has its limitations, and there is a cap on how much a single computer can scale. Eventually, the system encounters a hard ceiling beyond which further vertical scaling becomes impractical or impossible. This is also expensive as this implies continuous investment in hardware.</p><p>Horizontally scaling on the other hand means continuously adding more computers/nodes as workloads increase.</p><p>Here’s where distributed systems come into play. By adopting a horizontal scaling strategy, we can expand the system’s capacity by adding more machines or nodes to the network. Each node contributes its processing power, memory, and resources to the overall workload, collectively enabling the system to scale beyond what a single machine could achieve.</p><p><strong>Fault tolerance/High availability</strong>: All or part of systems fail eventually. The ability of a system to carry on operating in the event of a failure is called fault tolerance. Let us imagine we have our entire infrastructure on a single system in a system and then the system fails. This means that the entire service goes down. This one system becomes a single point of failure. Distributed systems by nature are designed to be fault tolerant, when systems go down as they inherently will, the failure of a single system or part of the system does not imply total outage of the service. Distributed systems use concepts like redundancy, replication to ensure fault tolerance. Redundancy involves having backup nodes that can take over the tasks of failed nodes, while replication ensures that data is stored on multiple nodes, ensuring its availability even if one node fails. They ensure that if one node fails, another can seamlessly take over the task without causing service disruption. This is important for services that need to be available continuously, such as online streaming platforms like Netflix or Public Cloud platforms. Users expect uninterrupted access to such services, and the fault tolerance of distributed systems ensures that disruptions are minimised and service downtime is avoided.</p><p><strong>Performance and Latency:</strong>Latency refers to the time delay between initiating a request and receiving a response. It represents the time taken for data to travel from the sender to the receiver and encompasses various factors such as network communication, processing time, and queuing time. By distributing tasks across different nodes in different geographical locations, distributed systems lead to higher performance, efficient processing, and reduced latency.</p><h4>Cloud Computing and Distributed Systems</h4><p>Cloud computing is the delivery of IT resources over the internet on demand. These resources include data storage, servers, databases, networking, and software. The public cloud (AWS, Google Cloud , Azure, etc) are distributed. They provide a vast array of services and resources that operate across multiple geographically distributed data centres.</p><p>By leveraging the distributed nature of the public cloud, people can deploy distributed technologies without having to buy the infrastructure.</p><p>In traditional on-premises setups, deploying and managing distributed systems can be complex, time-consuming, and costly due to the need to purchase, configure, and maintain hardware, networking equipment, and data centres. You can rent the infrastructure or use the providers managed services for the technologies.</p><h4>Distributed Technologies</h4><p>Distributed technologies refer to a set of tools, frameworks, and software components that enable the development, deployment, and management of distributed systems. These technologies facilitate the coordination and communication between multiple nodes or components within a network, allowing them to work together to achieve a common goal. Distributed technologies play a crucial role in building scalable, fault-tolerant, and high-performance distributed systems. Some common examples of distributed technologies include:</p><ul><li><strong>Message Queue Systems:</strong> Message queue systems facilitate asynchronous communication between distributed components, decoupling the sender and receiver of messages. Examples include Apache Kafka, RabbitMQ, and Amazon Simple Queue Service (SQS).</li><li><strong>Distributed Databases:</strong> Distributed databases store data across multiple nodes and locations, providing high availability, scalability, and fault tolerance. Examples include Apache Cassandra, Amazon DynamoDB, and Google Cloud Spanner.</li><li><strong>Distributed File Systems:</strong> Distributed file systems enable data storage across multiple servers and allow clients to access data as if it were on a single file system. Examples include Hadoop Distributed File System (HDFS) and Google File System (GFS).</li><li><strong>MapReduce Frameworks:</strong> MapReduce frameworks allow distributed processing of large datasets across multiple nodes. Examples include Apache Hadoop MapReduce and Google Cloud Dataflow.</li><li><strong>Microservices Architectures:</strong> Microservices architectural style decomposes applications into small, independent services that communicate through APIs, enabling easy scaling and independent deployment of each service.</li><li><strong>Containerization Technologies:</strong> Containerization enables the packaging of applications and their dependencies into lightweight, portable containers, making it easier to deploy and manage distributed applications. Examples include Docker and Kubernetes.</li><li><strong>Service Meshes:</strong> Service meshes provide a dedicated infrastructure layer for managing service-to-service communication within a distributed application. Examples include Istio and Linkerd.</li><li><strong>Distributed Computing Frameworks:</strong> Distributed computing frameworks facilitate the execution of distributed algorithms and parallel processing across multiple nodes. Examples include Apache Spark and Apache Flink.</li><li><strong>Consensus Algorithms:</strong> Consensus algorithms help achieve agreement among distributed nodes in the presence of failures. Examples include Paxos and Raft.</li><li><strong>Load Balancers:</strong> Load balancers distribute incoming network traffic across multiple servers, ensuring even resource utilization and preventing individual nodes from being overloaded</li><li><strong>Content Delivery Networks (CDNs):</strong> CDNs cache and deliver content from multiple distributed servers located in different geographical regions, reducing latency and improving the performance of web applications.</li></ul><p>However, like all technologies, distributed systems are not without downsides, some of which include high level of complexity, difficulty in debugging and troubleshoting, network dependency and so on. They require careful planning, effective design, and proper use of distributed technologies and best practices.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=843fb25ccb9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>