Reader small image

You're reading from  Data Ingestion with Python Cookbook

Product typeBook
Published inMay 2023
PublisherPackt
ISBN-139781837632602
Edition1st Edition
Right arrow
Author (1)
Gláucia Esppenchutz
Gláucia Esppenchutz
author image
Gláucia Esppenchutz

Gláucia Esppenchutz is a data engineer with expertise in managing data pipelines and vast amounts of data using cloud and on-premises technologies. She worked in companies such as Globo, BMW Group, and Cloudera. Currently, she works at AiFi, specializing in the field of data operations for autonomous systems. She comes from the biomedical field and shifted her career ten years ago to chase the dream of working closely with technology and data. She is in constant contact with the open source community, mentoring people and helping to manage projects, and has collaborated with the Apache, PyLadies group, FreeCodeCamp, Udacity, and MentorColor communities.
Read more about Gláucia Esppenchutz

Right arrow

Data Discovery – Understanding Our Data before Ingesting It

As you may already have noticed, data ingestion is not just retrieving data from a source and inserting it in another place. It involves understanding some business concepts, secure access to the data, and how to store it, and now it is essential to discover our data.

Data discovery is the process of understanding our data’s patterns and behaviors, ensuring the whole data pipeline will be successful. In this process, we will understand how our data is modeled and used, so we can set up and plan our ingestion using the best fit.

In this chapter, you will learn about the following:

  • Documenting the data discovery process
  • Configuring OpenMetadata
  • Connecting OpenMetadata to our database

Technical requirements

You can also find the code from this chapter in its GitHub repository here: https://github.com/PacktPublishing/Data-Ingestion-with-Python-Cookbook.

Documenting the data discovery process

In recent years, manual data discovery has been rapidly deprecated, giving rise to machine learning and other automated solutions, bringing fast insights into data in storage or online spreadsheets, such as Google Sheets.

Nevertheless, many small companies are just starting out their businesses or data areas, so implementing a paid or cost-related solution might not be a good idea right away. As data professionals, we also need to be malleable when applying the first solution to a problem – there will always be space to improve it later.

Getting ready

This recipe will cover the steps to start the data discovery process effectively. Even though, here, the process is more related to the manual discovery steps, you will see it also applies to the automated ones.

Let’s start by downloading the datasets.

For this recipe, we are going to use the The evolution of genes in viruses and bacteria dataset (https://www.kaggle.com...

Configuring OpenMetadata

OpenMetadata is an open source tool used for metadata management, allowing the process of data discovery and governance. You can find more about it here: https://open-metadata.org/.

By performing a few steps, it is possible to create a local or production instance using Docker or Kubernetes. OpenMetadata can connect to multiple resources, such as MySQL, Redis, Redshift, BigQuery, and others, to bring the information needed to build a data catalog.

Getting ready

Before starting our configuration, we must install OpenMetadata and ensure the Docker containers are running correctly. Let us see how it is done:

Note

At the time this book was written, the application was in the 0.12 version and with some documentation and installation improvements. This means the best approach to installing it may change over time. Please refer to the official documentation for it here: https://docs.open-metadata.org/quick-start/local-deployment.

  1. Let’...

Connecting OpenMetadata to our database

Now that we have configured our Data Discovery tool, let’s create a sample connection to our local database instance. Let’s try to use PostgreSQL to do an easy integration and practice another database usage.

Getting ready

First, ensure our application runs appropriately by accessing the http://localhost:8585/my-data address.

Note

Inside OpenMetadata, the user must have the Data Steward or Administration role to create connections. You can switch to the admin user using the previous credentials we saw.

You can check the Docker status here:

Figure 3.16 – Active containers are shown in the Docker desktop application

Figure 3.16 – Active containers are shown in the Docker desktop application

Use PostgreSQL for testing. Since we already have a Google project ready, let us create a SQL instance using the PostgreSQL engine.

As we kept the queries to create the database and tables in Chapter 2, we can build it again in Postgres. The queries can also be found...

Further reading

Other tools

If you are interested in learning more about other data discovery tools available on the market, here are some:

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Data Ingestion with Python Cookbook
Published in: May 2023Publisher: PacktISBN-13: 9781837632602
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Gláucia Esppenchutz

Gláucia Esppenchutz is a data engineer with expertise in managing data pipelines and vast amounts of data using cloud and on-premises technologies. She worked in companies such as Globo, BMW Group, and Cloudera. Currently, she works at AiFi, specializing in the field of data operations for autonomous systems. She comes from the biomedical field and shifted her career ten years ago to chase the dream of working closely with technology and data. She is in constant contact with the open source community, mentoring people and helping to manage projects, and has collaborated with the Apache, PyLadies group, FreeCodeCamp, Udacity, and MentorColor communities.
Read more about Gláucia Esppenchutz