You could use a PowerShell script instead of SSIS for a simple ETL process run on the user's workstation. The PS script below bulk inserts data from a CSV on the user's workstation into a temp table and runs a validation query.
$csvFilePath = "C:\temp\CountryList.csv"
$connectionString = "Data Source=YourServer;Initial Catalog=tempdb;Integrated Security=SSPI"
try {
#load csv into data table for import
$countryList = Get-Content $csvFilePath | ConvertFrom-Csv
$countryListTable = New-Object System.Data.DataTable
[void]$countryListTable.Columns.Add("CountryName")
foreach($country in $countryList) {
$row = $countryListTable.NewRow()
$countryListTable.Rows.Add($row)
$row["CountryName"] = $country.CountryName
}
#create temp table with same schema as data table
$connection = New-Object System.Data.SqlClient.SqlConnection($connectionString)
$command = New-Object System.Data.SqlClient.SqlCommand("CREATE TABLE #CountryList(CountryName nvarchar(100) COLLATE Latin1_General_100_CI_AS);", $connection)
$connection.Open()
$command.ExecuteNonQuery()
#import csv data into temp table
$bcp = New-Object System.Data.SqlClient.SqlBulkCopy($connection)
$bcp.DestinationTableName = "#CountryList"
$bcp.WriteToServer($countryListTable)
#run validation query
$command.CommandText =
@"
SELECT
CountryList.CountryName
,CASE WHEN Countries.CountryName IS NULL THEN 'Invalid country name' ELSE 'Country name is valid' END AS Message
FROM #CountryList AS CountryList
LEFT JOIN WideWorldImporters.Application.Countries ON Countries.CountryName = CountryList.CountryName;
"@
$dataAdapter = New-Object System.Data.SqlClient.SqlDataAdapter($command)
$results = New-Object System.Data.DataTable
$dataAdapter.Fill($results)
# display results
$results | Out-GridView
$connection.Close()
}
catch {
throw
}