How to Avoid an Error File that is Empty in SSIS Package - Handling Empty Files in SSIS Package

 How to Avoid an Error File that is Empty in SSIS Package - Handling Empty Files in SSIS Package

In this video tutorial, I am going to show you that how you can check if the source file is empty and you can move to some folder and load the files which have the data.

We will use script task and constraints to handle this logic. At the end of Package we move the files to achieve folder after loading them.


C# code used in Scrip Task

Dts.Variables["IsEmpty"].Value = 0;


if (new FileInfo(Dts.Variables["FilePath"].Value.ToString()).Length == 0)

            {

                Dts.Variables["IsEmpty"].Value = 1;

            }



Constraints

@[User::IsEmpty]==1 -- file is empty

@[User::IsEmpty]==0 file is not empty




How to Import Data from MySQL Table to SQL Server Table by using Import Wizard - MySQL To SQL Import

How to Import Data from MySQL Table to SQL Server Table by using Import Wizard. In this video you are going to learn how you can import data from Mysql table to SQL server 2019 by using import export wizard. You will be using ADO.Net drive on MySQL Source and then write query to get the data from MySQL table and map to SQL Server table.

To read the data from MySQL Table, you need a user and have to provide read permission to user that you will use in Import Wizard.


Script to create user in mysql and provide permissions

create user 'tb'@'localhost' identified by 'dba123'; grant all on techbrothersit.* to 'tb'@'localhost'; flush privileges; show grants for 'tb'@'localhost';



How to Create CSV File from MySQL Table in SSIS Package step by step - SSIS Tutorial 2021

How to Create CSV File from MySQL Table in SSIS Package. In this video how you can export data from MySQL Table to CSV File in SSIS Package you will learn

  1. How to download and Install ODBC Drive for connection manager in SSIS Package for MySQL
  2. How to create ODBC connection for MySQL in SSIS Package
  3. How to provide permission to user on MySQL Database for read/write
  4. How to create and use Parameters in SSIS Package and use in expressions to build Connection String dynamically
  5. How to use Data Flow Task to read from MySQL table and create CSV File in SSIS Package.

Connection String for ODBC Connection Manager
DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=techbrothersit;UID=tb;Password=dba123


Download Links
https://dev.mysql.com/downloads/connector/odbc/

https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0


Expression for Connection Manager
"DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=tb;UID="+ @[$Package::UserName] +";Password="+ @[$Package::Password]

How to load MySQL Table data to csv file in SSIS Package step by step


How to Load CSV File to MySQL Table in SSIS Package Step by Step -SSIS Tutorial 2021

How to Load CSV File to MySQL Table in SSIS Package Step by Step - How to Load Text File to MySQL Table in SSIS Package. In this video, you will learn

  1. How to download and Install ODBC Drive for ODBC connection manager for MySQL in SSIS Package.
  2. How to create UserName andPassword Parameters to use in MySQL Connection Manager in SSIS Package.
  3. How to create and provide permission to MySQL User for Loading data from CSV or Text File to MySQL Table.
  4. Create SSIS Package step by step to load data from CSV File to MySQL Table.

--Connection String for ODBC Connection Manager
DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=techbrothersit;UID=tb;Password=dba123


--Download Links
https://dev.mysql.com/downloads/connector/odbc/

https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0


Expression for Connection Manager

"DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=tb;UID="+ @[User::UserName] +";Password="+ @[User::Password]

How to Load data from text file to MySQL table in SSIS Package




How to Load Data From SQL Server to MySQL in SSIS Package Step by Step - SSIS Tutorial 2021.

In this video you are going to learn how you will be loading data to MySQL table from SQL Server in SSIS Package. Video shows how to download and Install ODBC drive for SSIS Package to Load data to MySQL, how to setup user permission on MySQL so you can use that user in SSIS Package to write to MySQL and How to configure ODBC Connection Manager for MySQL.


1) Download ODBC Drive for MySQL that we will use in ODBC Connection Manager in SSIS Package https://dev.mysql.com/downloads/connector/odbc/

2) In case you find error when installing above for Redistribution x86 https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0


3) Sample Connection String for ODBC Connection Manager in SSIS Package

DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=tb;UID=tb;Password=dba123

4 )Expressions for ODBC Connection Manager in SSIS Package. Make sure you have created two variables UserName and Password to use in connection String.

"DRIVER={MySQL ODBC 8.0 ANSI Driver};SERVER=localhost;DATABASE=tb;UID="+ @[User::UserName] +";Password="+ @[User::Password]


How to load data from SQL Server Table to MySQL Table in SSIS Package



How to Deploy SSRS Report to Report Server Step by Step - Creating and Deploying Your First Report

How to deploy SSRS Report to Report Server step by step. Creating and Deploying Your First Report. In this video, I will walk you through creating your first SSRS report and deploying to Report Server by using Visual studio.

How to Deploy SSRS Report to Report Server Step by Step 


How to Pass Multi-Value Parameters to Data Driven Subscription in SSRS - Solved - SSRS Tips

How to pass multi-value parameters to DDS (data driven subscription). SSRS – Passing multiple value parameters in data driven subscriptions video show you how you can pass the multiple values to parameter in data Drive subscription in SQL server reporting Services. There is no straight forward way to handle that so I have used dynamic SQL and then use concatenated values for dataset of Data Drive Subscription.


Sample Stored Procedure for Data Driven Subscription example:

USE [TechBrothersIT] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER Procedure [dbo].[sp_TotalSale] @Region VARCHAR(500), @Country Varchar(500) AS BEGIN Declare @var_Country VARCHAR(500) SET @var_Country = Replace(@Country, ',', ''',''') --print @var_Country Declare @SQL NVARCHAR(MAX) SET @SQL = ' Select [SalePersonFName], [SalePersonLName], [ProductName], [ItemsSold], [SoldPrice], [SoldDate], [City], [State], [Country], [Region] from dbo.TotalSale Where Region = '''+@Region+''' And Country in ( '''+@var_Country+''' ) ' --Print @SQL Execute( @SQL ) END



Query for Data Driven Subscription DataSet:

SELECT Region, Region as Filename, stuff( ( SELECT distinct ',' + [Country] FROM dbo.TotalSale WHERE Region = t.Region FOR XML PATH('') ), 1, 1, '') as Country FROM ( SELECT DISTINCT Region FROM dbo.TotalSale ) t


SSRS Data Driven Subscription Multi Value Parameters


How to Hide Tablix or Chart in SSRS Report if No Value returned - Hide a Tablix if No Rows Returned

SSRS Tip: Hide a Tablix if no rows returned, How to Hide Tablix or Chart in SSRS Report if No Value returned. In this video you are going to learn how you can hide Tablix in SSRS if No Rows are returned. You will also learn how to hide Chart of Matrix in SSRS if no value is returned in SSRS. SQL server reporting services items can be hide by using expressions if no data is returned by dataset.

How to to hide Tablix or Chart in SSRS when NO DATA is returned


How to Remove Zero from Stacked Chart in SSRS - Hide Zero Values in SSRS Stacked Chart Data Labels

How to Remove Zero from Stacked Chart in SSRS - How to hide zero values in SSRS Stacked chart data labels. In this video you are going to learn how you can remove zero from labels in Stacked Charts in SSRS.

How to remove zero from Stacked Chart in SSRS Chart Report


SSRS Chart Does Not show all Labels on Horizontal Axis - Fix Missing Labels on Vertical Axis on Bar Chart

SSRS Chart Does Not show all Labels on Horizontal Axis, Labels Missing on Vertical Axis on Bar Chart in SSRS. In this video I will show you how you can fix missing labels on horizontal Axis on Columns charts of SSRS report. Also I have demo how you can fix the Vertical Axis in Bar Chart in SSRS Reports.

How to fix Missing Labels in SSRS report on Horizontal/ Vertical Axis 


Hiding Data Label of Values 0 on Column Chart in SSRS - How to Remove Values with 0 in Bar Chart SSRS

In SSRS, If our dataset is returning 0 value then SQL Server Reporting Services (SSRS) shows 0 on Column or Bar Chart. In case we want to hide value 0 on Column chart or want to hide 0 in Bar chart, we can use expressions. Below video will show you how you can quickly hide the 0 values on Bar Chart or 0 values on SSRS Column Chart.

How to hide data labels with 0 values on Bar / Column Chart in SSRS



How to Find the Largest Files in Windows 10 - How to find Large Size Files on Windows

If you need to find out all the large size files on your computer, you are looking at right article. In this video tutorial, I have explained how you can find the large size files on Windows 10. Also I have shown some tips how you can use expressions in filter to get your required size of files on Windows 10.

How to find large size files on Windows 10 quick and easy without any coding


How To Fix It's Time To Update Your Device Error Windows 10

I can't Install any software, it keeps saying "It's time to update your device" windows 10 is very common warning often users get. To fix this warning or error you need to change your settings on windows. Below video will walk you through quickly how you can fix this error.

How To Fix It's Time To Update Your Device Error Windows 10


How can I tell when Windows 10 was rebooted? How Long Has Your Windows 10 PC Been Up and Running?

Often we need to find out when our computer was restarted of for how long our computer been up. In this video I have shown multiple ways to find out how you can check when your computer was last time stated or for how long it has been up.

How to find out when my computer was restarted/ Uptime of Computer




How to Get Record Count of All CSV and Text Files from Folder and Subfolders in SSIS Package

  

How to Get Record Count of All CSV and Text Files from Folder and Subfolders in SSIS Package

 In this video you are going to learn how you can get the record count in each of your csv or text files and load record count in SQL Server table. In our SSIS Package, we did not use script task. I have used different technique to read multiple csv files or text files with different columns. 

If you want to download SSIS Package, Click here, You need to provide FilePath variable value as per your environment and change Database Connection. Don't forget to create table first as SSIS Package will save the row count in table. Rest you will be all set to use the SSIS Package.

How to get number of rows each file has in Folder and Subfolders in SSIS Package.