Тёмный

SSIS Tutorial Part 25-Load Multiple Excel Files to SQL Server Table & Archive them with Datetime 

TechBrothersIT
Подписаться 90 тыс.
Просмотров 116 тыс.
50% 1

In this video you will learn how to load Multiple Excel files to a SQL server Table and archive them after loading them.
Expression used for video to get date_time.
Replace(Replace(Replace(SUBSTRING((DT_WSTR,50)(GETDATE()),1,16),"-","")," ","_"),":","")+".xlsx"
How to load Multiple Excel files to SQL Server Table
How to Load Multiple Excel files to SQL Server Table and Archive with datetime added to them.
In this video you will learn
How to use foreach Loop Container
How to use Excel Source in SSIS
How to use File System Task to rename and move files.
Check out our Step by Step SSIS Tutorial
www.techbrother...
Twitter
/ aamirsh48904922
Facebook
/ techbrothersit

Опубликовано:

 

15 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 78   
7 лет назад
You have saved 10+ hours working for this tutorial. Thanks alot.
@LepsMere
@LepsMere 3 года назад
Your video is amazing. That set validation to true section solved an issue that I have been having for the past day. You good sir are the BEST!!!!! :)
@TechBrothersIT
@TechBrothersIT 3 года назад
You're so welcome!
@alfaroandrew
@alfaroandrew 2 года назад
Great job Amir! This guide was very helpful, I always worked with txt files, but with excel ones is slightly different. Greetings from Lima
@TechBrothersIT
@TechBrothersIT 2 года назад
thanks
@kannanramakrishnan4814
@kannanramakrishnan4814 Год назад
Excellent explanation
@krismaly
@krismaly 9 лет назад
I like this video and re-watched since it contains lots of file handling cum data moving. Definitely this kind of work is is required in day to day. I recommend others to watch. Thanks for educating. Thanks a lot
@abdulghani8031
@abdulghani8031 4 года назад
This video is detail oriented. Thanks.
@priviyapaulraj2645
@priviyapaulraj2645 5 лет назад
your video is so clear. thank you very much
@TechBrothersIT
@TechBrothersIT 5 лет назад
You are very welcome. Hit subscribe if you have not done it yet!
@MatthewTorontoParis
@MatthewTorontoParis 6 лет назад
Your video is very clear and helpful
@TechBrothersIT
@TechBrothersIT 6 лет назад
Thank you for the support and liking it.
@jonatanlambert
@jonatanlambert 5 лет назад
thank you my friend your video helped quite alot !
@TechBrothersIT
@TechBrothersIT 5 лет назад
Thank you for liking my effort.
@immanuelb41
@immanuelb41 5 лет назад
Great work, even though i had difficulties grasping towards the end of the video. My challenge comes with variables and the fact that my input folders are more than one (seven network computers) which are all imported into seven identical SQL tables. The archive folder is one though.
@FlareSoul69
@FlareSoul69 2 года назад
Thanks!
@nicolasotalora4700
@nicolasotalora4700 4 года назад
Hi Aamir , Why does rename file operation move the files to the new Archive Path? , Thanks
@kenackimenko280
@kenackimenko280 8 лет назад
Thanks for the excellent video. It was a great help.
@TechBrothersIT
@TechBrothersIT 8 лет назад
You are most welcome and thanks to hear that our effort was helpful. Thanks for watching.
@StreamBits
@StreamBits 4 года назад
genius. life and time saver. thanks a ton
@micheleproce4590
@micheleproce4590 3 года назад
Excellent !!! Respect
@frankburns8871
@frankburns8871 8 лет назад
Very helpful! SSIS is a great tool, but it's incredibly unintuitive and quirky as hell. Thanks for the video.
@TechBrothersIT
@TechBrothersIT 8 лет назад
Thanks, you are right.
@_jay-tee_
@_jay-tee_ 6 лет назад
Fantastic logical guide - thanks for this!
@korraramunaik4021
@korraramunaik4021 3 года назад
Directory option in forech container is not showing
@krismaly
@krismaly 9 лет назад
This is an important to all developers who handle Excel files. Functionality explained well and I like it and recommend to others. Question If I have an Excel file with three sheets with same data like yours then I need to use Excel Source three times configuring each sheet and use Merge Transformation and write it to my table in database without File Archiving, am I right? Thanks
@TechBrothersIT
@TechBrothersIT 9 лет назад
krismaly If you have multiple files with single sheet and all files and sheet has the same meta data( Structure) you can use this package. If each file has different sheet structure , then you might have to use three connection managers to read and use merge or other transformations to join them. Tomorrow I have a goal to make a video " How to load multiple sheets to a single table from an Excel file. Hopefully you will like it. Thanks
@ejazshahana
@ejazshahana 8 лет назад
This is a very good video. I followed the instruction and it worked like a charm. However, when new Excels file lands on the source folder with same schema, it does not work any more. For instance, after archiving file1.xlsx and re-run the package with file2.xlsx (from source), if fails with 'Opening rowset for "Sheet1$" failed....Excel Source" failed validation.... any idea? Thanks
@Amit-q8l
@Amit-q8l 2 месяца назад
Great !!! Your video really amazing. I have one question,could you please help me to resolve. Actually want to develop a SSIS package for importing Customer where the data is provided from multiple flat file sources. The customer primary data like customer id, name from one file and address information from different file source. The customer address data also contain multiple address information for each customer. need to get the latest customer information and merge it with customer primary data and import it into destionation customer table. How to design such a logic and it must be recent customer infomation is imported ? Please explain by drawing a diagram.
@bidev8728
@bidev8728 3 года назад
Is there any tutorial to load data from multiple excel workbooks (each workbook can contain data in different worksheets). Number of columns will be same. ...???
@krismaly
@krismaly 9 лет назад
Revisited since I like this video and it has real time application. I wanted to learn this technique. Recommend others to watch. How about Foreachloop for each file to pick up then another Foreachloop to read each sheet in the Excel file and load the data in to database? It's only my thought and implications to be studied. Any suggestions? Thanks for educating the community. Thanks a bunch
@TechBrothersIT
@TechBrothersIT 9 лет назад
I thought about that to make a video:) but got lazy. But you are right that can be done and actually it is very often requirement to do perform tasks like this. I will see if I can make a video on this scenario. Good suggestion. Thanks Kris!
@laurischarf
@laurischarf 8 лет назад
Awesome tutorial! Thank you for posting.
@TechBrothersIT
@TechBrothersIT 8 лет назад
You are welcome and thanks for watching!
@chaudhryalisalam3668
@chaudhryalisalam3668 8 лет назад
Well done sir , great information
@abhi3487
@abhi3487 5 лет назад
this fails when my sheet has same table structure but different sheet names. i have files downloaded from server where the sheet name changes the as per the day i download the file. Can you please make a video on it.
@madhurao404
@madhurao404 3 года назад
My Excel Filenames are in sql table and i need to get the fileid and save this id along with the data in excel file to another sql table. how can this be achieved?
@saichandra2630
@saichandra2630 2 года назад
Please, How to import multi excel file, csv file and text file into multi difference table in SQL? Thanks very much!!!
@TechBrothersIT
@TechBrothersIT 2 года назад
you are welcome. all those videos are in playlist
@tuyetmaivu9183
@tuyetmaivu9183 4 года назад
Great! What if I'd like to save the filename of each file into sql table so that I could know from which file the data was coming from, how can I make that work? Thanks
@jaithileeben
@jaithileeben 6 лет назад
Hi TechBrothers, Good job. If any possible for automatically upload excel file to SQL server(for example: when i paste the excel file into the inputfolder that excel file automatically saved to SQL Table)
@TechBrothersIT
@TechBrothersIT 6 лет назад
For that you have schedule SSIS Job by SQL Server Agent. You can set the schedule every five minutes and it will keep looking for files and load them once available.
@srkreddybe
@srkreddybe 8 лет назад
Thanks for the Video !
@srikeerthi9571
@srikeerthi9571 5 лет назад
Hi, I have followed your method for loading multiple files. When i used both the variables file and inputfolder the package is failing.when I just use the file name it works. Can you tell why this might have happened?
@larryding7618
@larryding7618 7 лет назад
Hello TechBrother, I have a quick question regarding the variable used in foreach container. so you want every file and every extension in the file, but why you just use one parameter 'FileName' but you are using '*.*' when you configure the foreach container?
@robertogutierrez985
@robertogutierrez985 3 года назад
Thanks, i have a question, In this case, if posible to change the excel? because in my case i have the same information but in different dates like, excelfile_202101.xls to excelfile_202102
@danielchavarro8697
@danielchavarro8697 4 года назад
Good day, What happen if the excel file has many columns and the excel source task doesn't take all of them?
@neharajput1251
@neharajput1251 4 года назад
Awesome tutorial.. very helpful... can we valid the sequence and the columns name of excel sheet for each excel file using SSIS
@jessiesp1988
@jessiesp1988 7 лет назад
Very helpful tutorial, thank you. How to archive to different folder?
@atulsahu1341
@atulsahu1341 4 года назад
I was trying to get the filenames and write into a txt file. But the issue is i am getting only one filename in txt file. What could be the problem anyone can help. Thanks
@ck2610
@ck2610 8 лет назад
I have excel files where the tab names differs always, how can I make it dynamic?
@edniltonsc
@edniltonsc 7 лет назад
muito bom!!!! salvou minha carreira /;d
@GiuseppeSerraonline
@GiuseppeSerraonline 7 лет назад
Hi guys, Can you please help me to understand how can I load multiple xlsx files to different sql server tables? Example Customer.xlsx -> dbo.csutomer AND Orders.xlsx -> dbo.Orders. Thnaks in advance
@prathipatirasi3198
@prathipatirasi3198 3 года назад
sir can you please explain excel source errors
@chintankhambhati
@chintankhambhati 8 лет назад
Awsome tutorial..Thanks for posting. I created the package after referring to this video. I have 5 excel files with same column names over these 5 files. Once the package is executed I see the content of First file into Sql server 5 times. My foreach loop container is iterating through the same file 5 times. Can you please let me know what am I missing? Thanks in advance.
@TechBrothersIT
@TechBrothersIT 8 лет назад
+Chintan Khambhati you need to write the expressions for sheet name. Watch the video again and you will see that you are missing the expressions. also you can use the this post if you like to handle by using Script Task www.techbrothersit.com/2016/03/how-to-load-multiple-excel-files-with.html
@senthilsaranya
@senthilsaranya 7 лет назад
Hi, Helpful Video. I have a question though! In excel connection manger properties, to read the data from different files, why can't we change the connection string property in the expression rather than changing the excel file path property? Will it lead to any issue?
@TechBrothersIT
@TechBrothersIT 7 лет назад
Hi Sara, that is exactly I am doing. We need to write expressions but on something( in this case on Connection String).
@senthilsaranya
@senthilsaranya 7 лет назад
But in this video I see u adding the expression on "excel file path" rather then the "connection string" property?
@topcovers6647
@topcovers6647 9 лет назад
Thanks for the video. I created the package and doing exactly as in your video but the package is picking the same file again and again. Why?
@TechBrothersIT
@TechBrothersIT 9 лет назад
You might be missing one step. You need to go to excel connection manager and provide excel sheet name come coming from variable. Please watch the video again n try to stop at connection string part n take a look. Good luck
@topcovers6647
@topcovers6647 9 лет назад
+TechBrothersIT I have watched the video multiple times and have read numerous other articles. In your video, in excel connection manager, you just browse to one of the excel files, right? I don't see any variable mentioned in the connection manager.
@TechBrothersIT
@TechBrothersIT 9 лет назад
+awseomeumo101 Hi, Check the video at 7:22, I have setting the connection manager and using the variable so it can get new file from folder if there are multiple files. I hope this will help.
@shiva9891
@shiva9891 5 лет назад
Hi Team, the same way please explain how to load multiple ms access files to SQL server. All Access files having single table and same structure. Please help !
@TechBrothersIT
@TechBrothersIT 5 лет назад
Hi Siva, will do. Thanks for your message.
@ankursrivastava8635
@ankursrivastava8635 4 года назад
Hi, I have few query regarding the import data from excel files. import multiple files with same schema data (like column names, data types) which have same table name in each files in a folder. the table is start from column C and row 10 due to some formatting and analysis. Is there any way to import them into SQL server through SSIS directly from the tables or defined named range? Another query is regarding importing data from excel- I have 64bit SQL Server & Excel 2016, but Visual Studio is 32 bit. While I create package for excel import my excel connection manager show an error Microsoft Visual Studio ------------------------------ Could not retrieve the table information for the connection manager 'Excel Connection Manager'. Failed to connect to the source using the connection manager 'Excel Connection Manager' Can you help me with this?
@hari9020
@hari9020 9 лет назад
Sir i have built the package its runs fine. but cannot deploy the package i am some errors
@TechBrothersIT
@TechBrothersIT 9 лет назад
+harish patil I will suggest you to watch deployment videos or read some blogs on deployment. I don't have much on deployment but have plan to create step by step videos on deployment and common errors. Will take me sometime to get to those.
@Therippedathlete
@Therippedathlete 9 лет назад
Can I get a download link for the SSIS package in this video?
@TechBrothersIT
@TechBrothersIT 9 лет назад
+TheRippedAthlete, I been thinking to upload the sample SSIS Packages to somewhere so they can be downloaded. I mostly use blogger to post scripts that does not allow to upload the files. I will try to find a way to upload them somewhere so they can be downloaded. Sorry about that. Wish could help you with this :( I will try to locate the SSIS Package and send you in email if found it.
@nkiran-dg7ip
@nkiran-dg7ip 4 года назад
Whole container failed..wt I am do
@prathameshshinde7281
@prathameshshinde7281 7 лет назад
Unable to play this video
@ankitausa
@ankitausa 7 лет назад
Job runs through visual studio but not through sql server agent job.
@ankitausa
@ankitausa 7 лет назад
It runs in sql server agent job but not loading data to sql server table.
@mohammedaala856
@mohammedaala856 8 лет назад
How to load xls & xlsx files simultaneously using a single DFT, please revert if anyone have developed such package.
@Ranjay_Kumar
@Ranjay_Kumar 8 лет назад
Nice Video..But i don't know why i am getting Error while doing the same as you did in this video. SSIS ERROR CODE DTS_E_OLEDBERROR, Am OLE DB error has occurred. Error Code: 0X80040E37. can you please help in the same ?. Thanks ans god Bless you.
@TechBrothersIT
@TechBrothersIT 8 лет назад
+Ranjay Kumar Hi Ranjay Kumar, Wish could be more help but error is very generic and can;t tell what could be the issue. blogs.msdn.microsoft.com/chrissk/2006/06/12/ssis-data-flow-task-an-ole-db-error-has-occurred-error-code-0x80040e37/ Check about link and that might be reason for your error. Good luck.
@Deathseesmirror
@Deathseesmirror 4 года назад
This doesn't work
Далее
Раскрыла секрет дочки!
00:37
Просмотров 355 тыс.
06 How do I archive files in SSIS
20:10
Просмотров 11 тыс.
05 Load only new files in SSIS
13:44
Просмотров 33 тыс.
3 Essential Excel skills for the data analyst
18:02
Просмотров 1,5 млн
01 SSIS Load From Excel Files with For Each Loop
12:43
7 Database Design Mistakes to Avoid (With Solutions)
11:29