19 Import files from multiple locations to SQL Server in SSIS

  Рет қаралды 9,551

Learn SSIS

Learn SSIS

Күн бұрын

Пікірлер: 54
@deepalipatil5281
@deepalipatil5281 3 жыл бұрын
Thank you. I had a small doubt. Pardon me if this sounds silly. In the DestFilePath you have set the value as the sample_data.csv. But the actual files have something more appended in the file name in c drive. Won't that create an issue while copying the file?
@learnssis
@learnssis 3 жыл бұрын
No problem Deepali. The value I have given it will be over written during run time, thus it won't make any issue.
@triveninalabothu9094
@triveninalabothu9094 9 ай бұрын
Hi Aqil, Is there any specific reason to move the file to other location using File system task. Instead of File system task we can use DFT to load data right?
@learnssis
@learnssis 9 ай бұрын
Yes you are right, we don't need to move the files using File System task. Same thing we can do using foreach loop container with ado enumerator to loop through multiple locations, as in this case the source files were placed at 2 different drives. So first foreach loop container can loop through multiple drives, and then second foreach loop container which will be placed inside the first loop container will be of type file enumerator and it can load the file from a drive to the sql server table. So instead of using file system task we can use data flow task.
@krishnaveer9419
@krishnaveer9419 3 жыл бұрын
How will you improve the performance tuning if data is huge?
@sathiyamoorthi9224
@sathiyamoorthi9224 3 жыл бұрын
Hi Aqil, Thanks a lot for your video!!
@learnssis
@learnssis 3 жыл бұрын
You are welcome Sathiya.
@SagarSagarsoftware
@SagarSagarsoftware 2 жыл бұрын
How Can I load a multi-tab excel file into multiple tables by matching the table names with tabs name present in ExcelSheet. Please help Sir!
@learnssis
@learnssis 2 жыл бұрын
Can you take a look at this video kzbin.info/www/bejne/j4jUgGyBe7mEedE
@SagarSagarsoftware
@SagarSagarsoftware 2 жыл бұрын
@@learnssis Thank you So much, Sir!!
@solomong.gebrhana1204
@solomong.gebrhana1204 2 жыл бұрын
I am trying to import data from an external source(website) to my local server database, do you have any advice? I am using visual studio 2010 on a windows server 2012R2.
@learnssis
@learnssis 2 жыл бұрын
Sorry I don't have experience working with importing data from web sites.
@krishnaveer9419
@krishnaveer9419 3 жыл бұрын
How to resolve if dead lock happens in ssis. If the package will run for 30 mins due to dead lock it's running from one hr.
@learnssis
@learnssis 3 жыл бұрын
Every package is different and thus deadlock in each package can be because of different reasons. I have some SSIS packages, some of the packages pulls data from a table and some updates data to the same table, thus sometimes deadlock can occur. Thus we need to make sure that no 2 processes are trying to update\insert\delete data to the same table at a time, and while reading data from the table use with (nolock) hint. These things can avoid the dead lock scenarios.
@krishnaveer9419
@krishnaveer9419 3 жыл бұрын
@@learnssis there is no need to take care in package level
@sathiyamoorthi9224
@sathiyamoorthi9224 3 жыл бұрын
Hi Aqil, Can please the upload videos same but file does not copy from other directory to move into common folder because each and every day new files comming we need track and file should be excel format. I am working real time on this please help me Thanks in Advance !!
@learnssis
@learnssis 3 жыл бұрын
Hi Sathiya, as soon as you load a file, you can move the file to an archive folder. I have shown in below video how to archive files. kzbin.info/www/bejne/iIe1cqh8jNeAmac
@dhirajsharma8084
@dhirajsharma8084 Жыл бұрын
I am getting an error while executing package through sql server agent job. It is showing error that not able to acquired connection with default value that i passed in variable. It is not picking dynamic value in runtime. How to resolve this issue.
@learnssis
@learnssis Жыл бұрын
Can you set the delay validation property of ssis package to true, save the package and try again. Also make sure that the owner of the SQL services should have full access on the machine.
@mohammadrizwan3779
@mohammadrizwan3779 2 жыл бұрын
Hi, I want a incremental load base on date column. Daily basis take csv file and load only T-1 date into sql server table
@learnssis
@learnssis 2 жыл бұрын
If you want to load only specific rows from csv file to sql server according to a date column, then you can use a conditional split transformation in the data flow and according to the values of dates, you can insert only specific data to sql server table. Once you process a file you can move the file to an archive folder. In Below video I have shown how to move a file to archive folder. kzbin.info/www/bejne/iIe1cqh8jNeAmac If you can explain your case in detail then I can suggest you more.
@gantamahesh4386
@gantamahesh4386 2 жыл бұрын
Hi Aquil, In the Data flow task what will need to configure the Source to the destination?
@learnssis
@learnssis 2 жыл бұрын
What is your requirement ?
@krishnaveer9419
@krishnaveer9419 3 жыл бұрын
Can you do how will send the data to sql server if a source is API.
@learnssis
@learnssis 3 жыл бұрын
Sure, I will make a video on this topic.
@ImranKhan-g9p4s
@ImranKhan-g9p4s Жыл бұрын
Hi Aquil, Thanks for making incredible session on SSIS. I want to knwo if there is a way we can import multiple csv files with diffrent schema into respective database tables. I dont want to use script activity(C#) for this. Thanks in advance
@learnssis
@learnssis Жыл бұрын
Thanks Imran for your comment. At the moment SSIS does not provide a way without using C# to import multiple files with different schema using a single data flow task.
@krishnaveer9419
@krishnaveer9419 3 жыл бұрын
How you will add column to the exists slowly changing dimension
@reality752
@reality752 2 жыл бұрын
Hi friend.. in server source any table in dynamic.. destination also dynamic table , insert any table but final data will came dynamic.. it's possible or not
@learnssis
@learnssis 2 жыл бұрын
There are 2 options I can think of, 1. Create a linked server and then execute the query like below select * into destTable from linkedservername.databasename.dbo.SourcetableName Now in above query you can dynamically pass the value of destTable and SourcetableName. 2. You would need to use C# code to implement this. I have not created this thing so far, its not easy but this can be done. In below video they have done second half of the task like creating the tables dynamically. kzbin.info/www/bejne/opeqhGp5i9GAeJY
@paragbshah8084
@paragbshah8084 3 жыл бұрын
Hi, is there any option in SSIS to get data from API source? If yes, then could you please let me know the steps. Thank You
@learnssis
@learnssis 3 жыл бұрын
Hi Paras, to get the data from API source you would need to write the code for example in C#, thus I would recommend if you are familiar with C#, then write the api code to pull the data in C# console app, test it and then you can put the same code in either C# script component or C# script task. Thanks.
@aditipande
@aditipande 2 жыл бұрын
How to save several files from database to folders through ssis?
@learnssis
@learnssis 2 жыл бұрын
Take a look at this video, I have shown same thing here kzbin.info/www/bejne/f2jInmanm69jhJY
@priyavishalkulkarni2415
@priyavishalkulkarni2415 2 жыл бұрын
How to import files from different file formats into SQL using SSIS?
@learnssis
@learnssis 2 жыл бұрын
Can you precise your question ? From which format you want to import it from ?
@ahmedhassankotb8785
@ahmedhassankotb8785 3 жыл бұрын
how to import tables from different server to one database destination
@learnssis
@learnssis 3 жыл бұрын
Hi, you need to make an OLE DB connection for source server and then may be you can make the connection dynamic by providing the values of ServerName and DatabaseName from SSIS variables, so that if you change the value of ServerName or DatabaseName then the Source connection will change, and finally make an OLE DB Connection for database destination and insert the data into destination table. I think I should make a video on it how we can achieve it, I will make a video on it this week and will let you know.
@ahmedhassankotb8785
@ahmedhassankotb8785 3 жыл бұрын
@@learnssis thanx you for your efforts and your reply, and I will wait your next vedio♥️ and this is my WhatsApp num 01002818537
@prajaakeeyaparty6578
@prajaakeeyaparty6578 3 жыл бұрын
HI Aqil...I have requirement like need to build a ssis pacage from multiple excel files to sql tables based on one column values from excel files .........Load data to multiple company tables from excel .........Note the table has to be created dynamically if not available and to be truncated before loading (Table name example infosys(from Companyname column))
@learnssis
@learnssis 3 жыл бұрын
Hi Kalleshi, if you want the sql table to be created dynamically based on the value from the excel file, then first you would need to load the data from excel to a staging sql table. And then get the distinct company name in an Object variable, and declare an SSIS variable TableName as well and assign the value to that variable in the foreach loop container ado enumerator and then in the foreach loop, create the table if table not exists, otherwise truncate the table like below IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo' AND TABLE_NAME = 'MyTable')) truncate table MyTable else create table MyTable(column list goes here) This query needs to be written in an execute sql task in expression, in the sql statement source, and table name needs to be passed from an SSIS variable TableName. Thanks.
@prajaakeeyaparty6578
@prajaakeeyaparty6578 3 жыл бұрын
@@learnssis Thank you so much Aqil for quick response, it is working now as you suggested
@learnssis
@learnssis 3 жыл бұрын
@@prajaakeeyaparty6578 Glad it worked for you.
@prajaakeeyaparty6578
@prajaakeeyaparty6578 3 жыл бұрын
@@learnssis Thank you Aqil
@learnssis
@learnssis 3 жыл бұрын
@@prajaakeeyaparty6578 You are welcome.
@pavan_YRCP
@pavan_YRCP 3 жыл бұрын
Executive sql Task vs executive t-sql
@learnssis
@learnssis 3 жыл бұрын
Thanks, I was not aware about that there is "execute t-sql task" in SSIS, but it seems there is one and below are the main differences between two 1. And it seems that the execute t-sql task can only accept ado.net connection while the execute sql task can accept other connection types as well like oledb connection as well as ado.net connection. 2. We can't use parameterized queries in execute t-sql task but we can use it in an execute sql task. 3. execute t-sql task can't return the values to ssis variables, while execute sql task can return the values to ssis variables.
@pavan_YRCP
@pavan_YRCP 3 жыл бұрын
Hi
@learnssis
@learnssis 3 жыл бұрын
Hello Pavan, How are you doing ?
@pavan_YRCP
@pavan_YRCP 3 жыл бұрын
@@learnssis I am good and u
@learnssis
@learnssis 3 жыл бұрын
@@pavan_YRCP Thanks I am good.
@learner_SSIS
@learner_SSIS Жыл бұрын
Really good sir 😀👍
@learner_SSIS
@learner_SSIS Жыл бұрын
Thank you so much Aqil sir 🔥
@learnssis
@learnssis Жыл бұрын
You are most welcome Naveen Sir.
58 Load Multiple Excel Sheets with different schema
16:41
Learn SSIS
Рет қаралды 16 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
SSIS Multiple Excel Files Import | using foreach object
14:33
Database Tales
Рет қаралды 12 М.
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
Рет қаралды 2,1 МЛН
The Only Database Abstraction You Need | Prime Reacts
21:42
ThePrimeTime
Рет қаралды 230 М.
SQLModel + FastAPI: Say Goodbye to Repetitive Database Code
19:50
142 How to move files and append current date to the file in SSIS
15:14