19 Import files from multiple locations to SQL Server in SSIS

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ต.ค. 2024

ความคิดเห็น • 54

  • @deepalipatil5281
    @deepalipatil5281 3 ปีที่แล้ว +1

    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.

  • @krishnaveer9419
    @krishnaveer9419 3 ปีที่แล้ว +1

    How will you improve the performance tuning if data is huge?

  • @SagarSagarsoftware
    @SagarSagarsoftware 2 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      Can you take a look at this video
      th-cam.com/video/YWqO9KFTQCo/w-d-xo.html

    • @SagarSagarsoftware
      @SagarSagarsoftware 2 ปีที่แล้ว

      @@learnssis Thank you So much, Sir!!

  • @sathiyamoorthi9224
    @sathiyamoorthi9224 3 ปีที่แล้ว +1

    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 ปีที่แล้ว +2

      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.
      th-cam.com/video/RVRAuFWrMcE/w-d-xo.html

  • @triveninalabothu9094
    @triveninalabothu9094 7 หลายเดือนก่อน

    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  7 หลายเดือนก่อน

      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.

  • @solomong.gebrhana1204
    @solomong.gebrhana1204 ปีที่แล้ว

    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  ปีที่แล้ว +1

      Sorry I don't have experience working with importing data from web sites.

  • @krishnaveer9419
    @krishnaveer9419 3 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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

  • @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.

  • @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.

  • @sathiyamoorthi9224
    @sathiyamoorthi9224 3 ปีที่แล้ว

    Hi Aqil,
    Thanks a lot for your video!!

    • @learnssis
      @learnssis  3 ปีที่แล้ว

      You are welcome Sathiya.

  • @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.
      th-cam.com/video/RVRAuFWrMcE/w-d-xo.html
      If you can explain your case in detail then I can suggest you more.

  • @krishnaveer9419
    @krishnaveer9419 3 ปีที่แล้ว

    How you will add column to the exists slowly changing dimension

  • @krishnaveer9419
    @krishnaveer9419 3 ปีที่แล้ว +1

    Can you do how will send the data to sql server if a source is API.

    • @learnssis
      @learnssis  3 ปีที่แล้ว +1

      Sure, I will make a video on this topic.

  • @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 ?

  • @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.
      th-cam.com/video/lfGS7CVlMB4/w-d-xo.html

  • @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 ปีที่แล้ว +1

      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.

  • @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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@prajaakeeyaparty6578 Glad it worked for you.

    • @prajaakeeyaparty6578
      @prajaakeeyaparty6578 3 ปีที่แล้ว

      @@learnssis Thank you Aqil

    • @learnssis
      @learnssis  3 ปีที่แล้ว

      @@prajaakeeyaparty6578 You are welcome.

  • @priyavishalkulkarni2415
    @priyavishalkulkarni2415 ปีที่แล้ว

    How to import files from different file formats into SQL using SSIS?

    • @learnssis
      @learnssis  ปีที่แล้ว

      Can you precise your question ? From which format you want to import it from ?

  • @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
      th-cam.com/video/I7em3qfJ0N4/w-d-xo.html

  • @ahmedhassankotb8785
    @ahmedhassankotb8785 3 ปีที่แล้ว

    how to import tables from different server to one database destination

    • @learnssis
      @learnssis  3 ปีที่แล้ว +1

      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

  • @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 ปีที่แล้ว +1

      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.