GAUTAMI NADKARNI: Hey, Lorin.
Let's go.
I thought we were going to go out for ice cream.
LORIN PRICE: Oh, sorry.
I'm trying to cleanse my data, and it's taking
so much longer than I thought.
And I'm trying to learn Python, and it's just not going well.
GAUTAMI NADKARNI: Well, why?
Google has a managed service for this called Dataprep.
Let me show you.
[MUSIC PLAYING]
Let's get right into the Dataprep tool.
If you're using the Dataprep for the first time,
accept approvals and give it couple of seconds to load.
We can start by creating a flow.
Give it a name and description, and click Create.
You have the option of importing data
either from your local machine, Google Cloud
Storage, or BigQuery.
For this demo, we are going to use Cloud Storage bucket.
I have preloaded a few ice cream sales data sets
into Cloud Storage.
This is the data set I will use for the Dataprep flow.
Click on the data set you want to begin the transformation
with and click on Edit Recipe.
A recipe contains a sequence of steps
that transforms the selected data set into a new data set.
The Wrangle language is used to create recipes.
LORIN PRICE: Uh-oh.
Wrangle language?
Am I still going to have to learn another programming
language?
GAUTAMI NADKARNI: Actually, no.
Wrangle language is a lot like formulas
you see in Google Sheets.
And you don't have to write it on your own.
A lot of it is auto-generated for you.
LORIN PRICE: Phew.
OK, good.
Let's keep going.
GAUTAMI NADKARNI: For this demo, we
will build tasks performed by data analysts
regularly like cleansing, structuring, and enriching.
As you can see, this is the basic view
of how data looks across different columns and rows.
After looking at data, you might see some mismatched values
in red for one of the columns.
Upon clicking it, you might realize that something
was wrong with the data--
in this case, the at symbol in the number field.
The tool also gives you some auto suggestions
for this column to choose from.
I'm going to fix this column by using a value given to me
by the business analyst for a typical serial number.
Split by delimiter allows you to separate
values in the same column by a delimiter-- in this case,
the forward slash.
I'm going to rename these columns now
for better understanding.
We can also easily join multiple data sets in just a few clicks.
Let's join two data sets with one
of the existing data set that we have loaded in the flow.
Type ID is automatically detected as the join key,
and you can choose which column you
want to display for both the data
sets post the join function.
To hide a column, simply right click on the column
and hide it.
Similarly, I'm going to be joining
one more data set using flavor ID to further enrich my data.
Changing data types is super simple as well.
Let's remove the percentage symbol from the profit margin
percentage column and convert it into [? integer ?] data type.
Lastly, let's apply some custom logic
to create a new data column.
The CASE function allows you to perform
multiple conditional tests on a set of expressions
with a statement.
Here, I'm going to define a range of profits and demands
from low, medium, and high based on the ranges of the value they
might fall in.
After these steps, my pipeline is now ready to run.
I'll select a couple options for how
I want my results to be stored.
I can also choose if I want the job to run manually
or scheduled.
And voila, we can run the job.
LORIN PRICE: Wow, this is really cool, and easy.
Once I create the recipes, I can run the jobs anytime.
And I don't even need to learn Python.
GAUTAMI NADKARNI: Absolutely.
Can we now eat our ice creams?
LORIN PRICE: Don't forget to subscribe for more great Google
Cloud Platform content.
GAUTAMI NADKARNI: Thanks for watching.
[MUSIC PLAYING]