In this article, we will demonstrate how to import tables from a CSV file, handle null values using transformations, and migrate the cleaned data into 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
When working with CSC data, missing or null values can impact data accuracy. This section explains how to replace null values with predefined defaults or imputed values to ensure data consistency.
To handle null values effectively, we use the COALESCE
function in DuckDB. This function replaces NULL
values with specified defaults:
0
if missing3
if missingUse the following SQL query to clean your data:
SELECT
Ticket_ID,
Customer_ID,
Customer_Name,
Ticket_Category,
Issue_Description,
Ticket_Status,
Priority,
COALESCE(Resolution_Time, 0) AS Resolution_Time,
Agent_ID,
Agent_Name,
COALESCE(Customer_Satisfaction, 3) AS Customer_Satisfaction,
Ticket_Creation_Date,
Ticket_Resolution_Date,
Ticket_Comments,
Region,
City,
Country
FROM {pipeline_name}.sample_csc_data;