143 How to import multiple excel files into sql server using ssis

  Рет қаралды 22,032

Learn SSIS

Learn SSIS

Күн бұрын

Пікірлер: 97
@LocNguyen-cr7tm
@LocNguyen-cr7tm 5 ай бұрын
why I see no any data connection afer clik "new" in OLE DB connection manager step ?? help me please
@iNtellectual.paradoX
@iNtellectual.paradoX 4 ай бұрын
Bro when i select excel with xlsx extenstion in excel source I do not get name of excel sheet.it says no table or view could be loaded. same is working fine with .xls extention. Plz help.
@learnssis
@learnssis 4 ай бұрын
Try to Install Access database engine drivers from here and try again drive.google.com/drive/folders/1iTtcu6EMuRMjCPnLnIkr-QfePEfJPwny First install 32-bit and try and if that does not works then install 64-bit. If you face any issue installing 64-bit then uninstall the 32-bit drivers and then install 64-bit.
@iNtellectual.paradoX
@iNtellectual.paradoX 4 ай бұрын
@@learnssis Thank you so much bro. :)
@samderrty123
@samderrty123 Жыл бұрын
the microsoft access database engine cannot open or write to the file. But I do not have it opened. any ideas?
@ziadbensaada
@ziadbensaada 7 ай бұрын
not working for me! it import one file only in sql server with flag x in the schema of excel source ? i dont know whaat is the problem?
@learnssis
@learnssis 7 ай бұрын
Maybe you can take a look at this video and use this code inside foreach loop container and pass the FilePath to Script task to import multiple excel files kzbin.info/www/bejne/sIKWpKyLqKatj7s
@ziadbensaada
@ziadbensaada 7 ай бұрын
@@learnssis but i have many files excel i wanna add them to one table in sql server , when i change the runtime not working told me not supported
@learnssis
@learnssis 7 ай бұрын
@@ziadbensaada What is the error message ? And How you are trying to do it for all excel files ?
@afiqghazali6826
@afiqghazali6826 9 ай бұрын
Hi there, great tutorial. In minute 4:59 you selected ExcelFilePath and the expression is User::FilePath. If im flat file source(.csv), what option should I choose?
@learnssis
@learnssis 9 ай бұрын
In flat file source, we will be using the flat file connection manager and in flat file connection manager we would need to use Connection String property. kzbin.info/www/bejne/h3W2g619rbGYZ8k
@putrigilang1516
@putrigilang1516 Жыл бұрын
Hi I've edited the expression and it turns out error "the acquire connection method call to the connection manager failed with error code 0xC0202009" can you help me with this?
@learnssis
@learnssis Жыл бұрын
Set the DelayValidation property of SSIS package to True. And you should be good if the excel file schema is same.
@beyzanuraltikardes2743
@beyzanuraltikardes2743 10 ай бұрын
I want to do this for excel files in different folders in the same project for example with 2-3 foreach loop containers. is it possible?
@learnssis
@learnssis 10 ай бұрын
Yeah you can use multiple foreach loop containers, one foreach loop container with one folder.
@HeadshotAndCruise
@HeadshotAndCruise 9 ай бұрын
I am Getting below mentioned two error while importing multiple excels. When I run the package the data in excel mentioned in log got imported and the package terminates with the following error. Can you please suggest what wrong I am doing. [Excel Source [84]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. [Excel Source [84]] Error: Opening a rowset for "MASTER_FEB_2024$" failed. Check that the object exists in the database.
@learnssis
@learnssis 9 ай бұрын
It seems like MASTER_FEB_2024$ sheet name does not exists in the excel file.
@HeadshotAndCruise
@HeadshotAndCruise 9 ай бұрын
But the file is there because when i run the package the rows of this excel got imported, after that it gives this error. Also in the log it shows package return the status success @@learnssis
@learnssis
@learnssis 9 ай бұрын
@@HeadshotAndCruiseSet the delay validation property of package to success. And make sure that you have followed other steps like made the excel connection manager dynamic by setting the excel file path property from ssis variable And getting the sheet name dynamically using the C# code.
@bzflowerbee
@bzflowerbee Жыл бұрын
Is there an alternative way to do this without ssis? Our company has 2017 visual studio and there isn't a business intelligence on visual studio available 😢
@learnssis
@learnssis Жыл бұрын
You can use C# as well to import all excel files form a folder to sql server tables. kzbin.info/www/bejne/gavYcmp_oqp0gKc
@bzflowerbee
@bzflowerbee Жыл бұрын
@@learnssis but I don't know c#. Thank you.
@learnssis
@learnssis Жыл бұрын
​@@bzflowerbeeThen you can manually import them.
@bzflowerbee
@bzflowerbee Жыл бұрын
@@learnssis I know 😭😭
@chvnetchvnet4481
@chvnetchvnet4481 Ай бұрын
Thanks for this solution. But this wont work for me . I use visual studio 2022. When i change the filepath expression in the excel connection. my excel source fails immediately. When i go to excel source and check the issue for columns - i see error below which says " An OLE DB record is available . Source:Microsoft.Access.Database.Engine. HResult:)0x80004005. Description : Invalid Argument. Is this error due to having a different sheet Name ?. Please help I am blocked. Thanks in advance
@learnssis
@learnssis Ай бұрын
Yes if your sheet name is different then before loading the data inside data flow task, you must get the sheet name inside a variable and then use that variable in excel source to dynamically fetch data from that sheet. kzbin.info/www/bejne/nXKthqdsasSHmdU
@chvnetchvnet4481
@chvnetchvnet4481 Ай бұрын
@@learnssis Thankyou for the response . This worked . Also thanks for sending the information in detail via email too. Appreciate the help
@zoyasaleem5689
@zoyasaleem5689 Жыл бұрын
please let me know how to SSIS package call from job and run automatically at configure time please
@zoyasaleem5689
@zoyasaleem5689 Жыл бұрын
i am stuck please
@learnssis
@learnssis Жыл бұрын
Hi Zoya Saleem, Take a look at this video, I have shown this in detail kzbin.info/www/bejne/p6O5Y3mYhtWIaas
@vochau9806
@vochau9806 Жыл бұрын
Hello, I build a SSAS to load data from SQL server. Firstly, I load fact table 500 lines. I deploy SSAS also load 500 lines. However, when I update the fact table by SSIS increate to 600 lines. SSAS does not load enough to 600 line. I have to process SSAS again, it loaded to 600 lines. But when I deploy SSAS again, it still loads 500 lines. Therefore, the Excel report does not refresh. How do I fix this. Thank you for your help
@learnssis
@learnssis Жыл бұрын
Hi Vo Chau, frankly speaking I don't have any experience working with SSAS thus not sure what might be wrong here, sorry for that.
@vochau9806
@vochau9806 Жыл бұрын
Do you have a video that load Dim and Fact table from an Excel file. For example, I have a E-com data, I want to load to Dim and Fact table. Thank you so much
@learnssis
@learnssis Жыл бұрын
No I don't have a video on that one. but loading a Dim and Fact table from excel file is as simple as loading it from CSV file. The only change for excel will be that instead of flat file source, now you would need to use excel source. And if in the destination table the data type is varchar, then you would need to add a data conversion task before the lookup transformation and it can convert the data type to varchar those you can use inside lookup transformation. I have made videos on loading data to Dim and Fact tables and on Data conversion task as well. kzbin.info/www/bejne/mWPPhH6ChrWVlas kzbin.info/www/bejne/mqbEg5KGnbGXo8U kzbin.info/www/bejne/l4KtdJ6vZ9aZedU
@kichuchinnu3303
@kichuchinnu3303 2 жыл бұрын
Hiii , Can you suggest your video for ODBC destination in ssis package
@learnssis
@learnssis 2 жыл бұрын
This is one of the video for ODBC destination kzbin.info/www/bejne/gIHRkKdsZdl6edk
@funbutterjam4734
@funbutterjam4734 2 жыл бұрын
We have 3 tables it have millions record. so last 3 year before data move source to stg table and then stg to archival and delete record from source and stg table after moved archival (source and stg table same server but archival is different server). How to create siss package. please make one video.
@vochau9806
@vochau9806 Жыл бұрын
Hello When I manual write this command in SQL Insert into TableA (a1,a2,a3, FileName) Select a1, a2, a3, ‘abc.txt’ from Table . This SQL works. No problem But when I create a variable in SISI "Insert into TableA (a1,a2,a3,FileName) Select a1,a2,a3," + @[User::FileName] + " from TableB" .it does work The error is [Execute SQL Task] Error: Executing the query "Insert into [Table A].." failed with the following error: "The multi-part identifier "FileName230123.TXT" could not be bound.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly. Could you please help me. I try to search but cannot resolve. Thank you very much
@learnssis
@learnssis Жыл бұрын
Try this one "Insert into TableA (a1,a2,a3,FileName) Select a1,a2,a3,'" + @[User::FileName] + "' from TableB"
@vochau9806
@vochau9806 Жыл бұрын
@@learnssis I see what I am wrong. just a '. Thank you so much
@lifeisawesome4566
@lifeisawesome4566 6 ай бұрын
Thanks for this great tutorial. I have a question: If files are in SharePoint, is this approach will work?
@learnssis
@learnssis 6 ай бұрын
No. If the files are at sharepoint then first you would need to download the files from sharepoint to a folder on the server and then you can use this method.
@DeUraq
@DeUraq 3 ай бұрын
Excellent one and it worked with me! I have a quick question. If my excel files are their respective folders with the same file names, the how to use the dynamic variables? like c:\data\emp1\emp1.xlsx, c:\data\emp2\emp2.xlsx etc. Thank you
@learnssis
@learnssis 3 ай бұрын
Thanks, in that case either you can give path of parent folder like c:\data and then tick the option traverse sub folder and it will try to find files from sub folders (emp1,emp2) as well.
@DeUraq
@DeUraq 2 ай бұрын
@@learnssis thanks for the reply. if I have multiple excel files (up to 50 files) as (emp1.xlsx, emp2.xlsx ...emp50.xlsx) and load them to sql table emp1 to emp50 . Do i have have to create a different workflow for 50 times for each table to load data?!
@learnssis
@learnssis 2 ай бұрын
@@DeUraq If the layout of all files is same then you can use a single data flow task with foreach loop container to load them, however if their layout is different then you can create separate data flow for each file.
@decentmendreams
@decentmendreams Жыл бұрын
Hi , do you provide consulting services ?
@learnssis
@learnssis Жыл бұрын
Sorry right now I am very busy and don't provide consulting service.
@priyavishalkulkarni2415
@priyavishalkulkarni2415 9 ай бұрын
The same steps are followed. The only difference is that I have a CSV file. But getting data from only the first file.Not the second one. And if I execute the package again then the same rows are added repeatedly.
@learnssis
@learnssis 9 ай бұрын
Hi Priya, the video you are referring is for loading multiple excel file and to load multiple csv files you can watch this video kzbin.info/www/bejne/eJvTkoaugr-ArtU I think you have not configured the flat file connection manager correctly. You would need to make it dynamic, by passing the file path to connection string property using expressions. Thanks.
@priyavishalkulkarni2415
@priyavishalkulkarni2415 9 ай бұрын
@@learnssis Thank you for your quick response. Now the package is working fine. But the only issue is records from the second file from SSIS come with double quotes.
@learnssis
@learnssis 9 ай бұрын
@@priyavishalkulkarni2415 In the flat file connection manager, put the double quote " in the text qualifier option. kzbin.info/www/bejne/gXKQpmmli9CKrZI
@priyavishalkulkarni2415
@priyavishalkulkarni2415 9 ай бұрын
But I don't have quotes in my flat file.@@learnssis
@TheMan-wd1pv
@TheMan-wd1pv 2 жыл бұрын
i heard sql and msbi vanished many years ago is it true
@learnssis
@learnssis 2 жыл бұрын
I am working on these technologies for last 13 years and still I see a lot of jobs in these areas. SQL Server is the widely used database management system in the world.
@piraviperumal2544
@piraviperumal2544 2 жыл бұрын
@@learnssis Very true
@shaneparkes7105
@shaneparkes7105 2 жыл бұрын
Thank you, I would move uploaded files to another folder instead, this should help if ever a file needs to be replaced, not sure how it will handle when there is no file present though. I will also add an identifier to the filename to avoid duplicate filenames
@learnssis
@learnssis 2 жыл бұрын
Moving the processed files to another folder is also a good approach, it will work fine if there are no files to process. You can watch a video on this one here kzbin.info/www/bejne/iIe1cqh8jNeAmac
@shival7096
@shival7096 2 жыл бұрын
Excellent one. Please do a video on importing multiple excel files into sql server as separate tables with scheduled incremental refresh.
@learnssis
@learnssis 2 жыл бұрын
Sorry did not get this one completely. You mean each excel file will be loaded to a separate table ? Then how it will be incremental ?
@shival7096
@shival7096 2 жыл бұрын
@@learnssis yes, i mean when data changes in excel it need to update in sql server on a schedule.
@learnssis
@learnssis 2 жыл бұрын
@@shival7096 Okay got it. but you want to update data to multiple tables. If we can write the code for one table then we can use the same logic for another table as well. If we will create video doing it for multiple tables then the video can be very lengthy.
@shival7096
@shival7096 2 жыл бұрын
@@learnssis Got it , thank you so much.
@pallavikrishna7591
@pallavikrishna7591 2 ай бұрын
Thank you so much!!! Very Crisp and clear , as always
@learnssis
@learnssis 2 ай бұрын
Thank you.
@farzadsaedi1954
@farzadsaedi1954 11 ай бұрын
Very good tutorial. Can you please show how multiple excel file can be transferred from SharePoint folder to Sql Server? thanks
@lifeisawesome4566
@lifeisawesome4566 6 ай бұрын
Hey, did you get your answer?
@lonestarparrot
@lonestarparrot Жыл бұрын
Great tutorial and very easy to follow!!! Thanks @Learn SSIS
@learnssis
@learnssis Жыл бұрын
You are most welcome Sir.
@prashantsinha123us
@prashantsinha123us Жыл бұрын
Thanks, It was good and all easily understandable
@learnssis
@learnssis Жыл бұрын
Its good to know Prashant that you found the video useful.
@ArwaAldoudOmer
@ArwaAldoudOmer 5 ай бұрын
Thanks, it was amazing. I followed the steps and it worked perfectly. Thank you 🥰
@learnssis
@learnssis 5 ай бұрын
Glad it worked for you.
@dilipchauhan5598
@dilipchauhan5598 10 ай бұрын
Simple and on point!
@learnssis
@learnssis 10 ай бұрын
Thank you Dilip.
@TheLighty37
@TheLighty37 Ай бұрын
Thank you it worked for me
@learnssis
@learnssis Ай бұрын
Glad it worked for you.
@OleYoule
@OleYoule Жыл бұрын
Hi Aqil, Thank you for your tutorials 👍. I got huge amount of useful information) Could you please make video how to record sheet names in extra column inside main database (main sql table) for each data record(line). For instance if excel file has multiple sheets Sheet1, Sheet2, and so on they have to be added to each record inside main database(main sql table). Thank you in advance!
@learnssis
@learnssis Жыл бұрын
Sure will try to make a video on this one.
@learnssis
@learnssis Жыл бұрын
Hi, if you want to import multiple excel sheet then you can take a look at this video kzbin.info/www/bejne/Z4qofamlaat2gac And if you want to add a new column Sheet Name to the data flow and want to import it to a sql server table, then you can use a derived column transformation and in the derived column transformation just drag and drop the sheet name ssis variable into Expression and create a new column SheetName, this will create a new column SheetName with the value from SSIS variable Sheet name, then you can map this column with your sql server destination table. I have done the similar kind of thing in below video by creating a new column FileId kzbin.info/www/bejne/eJvTkoaugr-ArtU
@OleYoule
@OleYoule Жыл бұрын
@@learnssis Hi Aqil, thank you for your tip. Changes based on your recommendations were implemented and SSIS task works perfectly! You are the best SSIS tutor👍
@learnssis
@learnssis Жыл бұрын
@@OleYoule Glad it worked for you.
@sureshareti2843
@sureshareti2843 2 жыл бұрын
Good one bhaiyya... Thanks alot.... I request you do one video on Source Excel Read all excel header with data dynamically based on that create table dynamically in sql server and map columns dynamically excel source and sql server destination and load the data
@learnssis
@learnssis 2 жыл бұрын
Thank you. In data flow task, SSIS does not allow to change the columns dynamically using the excel source. We can only use Script task and write all code there may be in C# or VB.NET
@sureshareti2843
@sureshareti2843 2 жыл бұрын
@@learnssis thanks for clarification bhaiyya
@newtechnofayda
@newtechnofayda 2 жыл бұрын
Good
@learnssis
@learnssis 2 жыл бұрын
Thank you.
@akramabushmais2949
@akramabushmais2949 Жыл бұрын
I need help I did the same steps and I have two excel sheet in the folder but when I applied the steps and check the database I found one of the excel twice in the database table how can I solve this !!? Thanks @leanssis
@learnssis
@learnssis Жыл бұрын
Did you made the excel connection manager dynamic by going to expressions of excel connection manager and setting the ExcelFilePath property to come from the variable as shown in the video ?
@akramabushmais2949
@akramabushmais2949 Жыл бұрын
@@learnssisyes I found the problem (I read the wrong extensions ) I’m sorry to interrupt you thank you again for the great KZbin channel it is very helpful ✌️
@akramabushmais2949
@akramabushmais2949 Жыл бұрын
@@learnssisone more question If I already have table in database I just need to don’t choose fast load in database and choose the existing table in database and do the correct mapping in mapping option right !
@learnssis
@learnssis Жыл бұрын
@@akramabushmais2949No problem, you are most welcome.
@learnssis
@learnssis Жыл бұрын
@@akramabushmais2949Just choose the fast load option and select the table from the database.
@learner_SSIS
@learner_SSIS 2 жыл бұрын
Good sir 😀
@learnssis
@learnssis 2 жыл бұрын
Thanks 😃
144 How to handle errors in script task in ssis
11:23
Learn SSIS
Рет қаралды 2,7 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН
SLIDE #shortssprintbrasil
0:31
Natan por Aí
Рет қаралды 49 МЛН
SSIS Multiple Excel Files Import | using foreach object
14:33
Database Tales
Рет қаралды 12 М.
SSIS Import Multiple Excel Worksheets
12:36
SQL with Ant Johnson
Рет қаралды 175
58 Load Multiple Excel Sheets with different schema
16:41
Learn SSIS
Рет қаралды 16 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 220 М.
151 How to merge data from multiple flat files using ssis
9:31
Learn SSIS
Рет қаралды 3,2 М.
Create an ETL package with SSIS! // step-by-step
13:11
Kahan Data Solutions
Рет қаралды 169 М.
154 How to export data to multiple excel files in SSIS
27:42
Learn SSIS
Рет қаралды 2,5 М.
УНО Реверс в Амонг Ас : игра на выбывание
0:19
Фани Хани
Рет қаралды 1,3 МЛН