In this article, we will demonstrate how to import tables from a CSV file, perform data type conversions using transformations, and migrate the cleaned data to the destination database using Bold Data Hub. Follow the step-by-step process below.
Sample Data Source:
Learn about Pipeline Creation
Learn more about transformation here
Ensuring data fields have the correct format is crucial for data integrity and analysis. This section covers converting key fields such as dates, amounts, and customer ratings into appropriate data types.
To standardize data formats, we apply the following transformations:
DATE
format.DECIMAL(10,2)
.INTEGER
.Use the following query to clean and standardize your dataset:
SELECT
Customer_ID,
Customer_Name,
Age::INTEGER AS Age,
Gender,
Income_Level,
Customer_Segment,
Loyalty_Program_Status,
Reward_Points::INTEGER AS Reward_Points,
Last_Purchase_Date::DATE AS Last_Purchase_Date,
Total_Spend::DECIMAL(10,2) AS Total_Spend,
Account_Status,
Subscription_Type,
Email,
Phone,
Region,
City,
Country
FROM {pipeline_name}.customers;