Quantcast
Channel: SQL Server Integration Services forum
Viewing all 24688 articles
Browse latest View live

SSIS Derived Column Expression to work at time to string format

$
0
0

Hello

I have a time column in my data which I want to create a new column with a line of text for what the time is between.

So If my Column Call_Time is between 00:00 and 00:59 I want the new column to say "12am - 1am"

and if the Call_Time is between 01:00 and 01:59 I want the new column to say "1am - 2am"

and if the Call_Time is between 02:00 and 02:59 I want the new column to say "2am - 3am"

and so on.

Is this possible to do in SSIS Derived Column?

Regards

SQLSearcher99


ExecValueVariable property works? - SSIS 2014-2016

$
0
0

Hi,

in a SSIS 2014 package, I'm trying to use the ExecValueVariable property for an Execute SQL task to perform a SELECT statement.

I've created an Int32 variable that I pass to this property in order to retrieve the selected row number, but it is returned the -1 value (using a script task).

So, does the ExecValueVariable property function rightly or not? Is there a bug?

Thanks

Load Multiple Files from Source to Respective Multiple Folders (SSIS)

$
0
0

Hi All,

In SSIS or SQL-stored procedure, I need to load multiple files to multiple folders with respect to file names

I have a scenario

Source folder =  “Data Source Folder”

Files in source folders

Customer_datafile_data.csv

Customer_Branch_data.csv

Customer_City_data.csv

Employee_datafile_Dec2020.csv

Employee_Info_Dec2020.csv

Products_Information.csv

Destination Folders =

                            Customer

                            Employee

                            Products            

Files destination as

“Customer_datafile.csv”                       LOADS IN        “ Customer”

"Customer_Branch_data.csv"               LOADS IN        “ Customer”

"Customer_City_data.csv”                    LOADS IN       “ Customer”

“Employee_datafile_Dec2020.csv”         LOADS IN        “Employee”

Employee_Info_Dec2020.csv ”              LOADS IN        “Employee”

“Products_Information.csv”                  LOADS IN        “Products”

No. of files for one destination could be as many. No. of folders may be as many (not 3 it could be 4 or 5 )

One thing that I can control is the prefix of file is matched with folder name in which it has to load

Please help me in some good solution. Thanks

Running SSDT Package (With Power Query Source) manually without SQL Server Job

$
0
0

Hi Experts,

I have power query source in my SSIS data flow where it fetches data from SQL server. It works well if I run is manually via SSDT but fails while deploying to SQL server as Power Query Source is not available as General release yet.

Is there any way that I can schedule the package (using scheduler or anything else), so that it can just run successfully in the same way as it runs when triggered manually from SSDT ?

Thanks in Advance



Sam


Dynamic database connection using SSIS

$
0
0

Hi,

I want to create dynamic database connection using SSIS.

I have 5 databases and all has same table structure.Now I want to dump all 5 databases data to another database(single database) by creating dynamic database connection using foreach loop container.How to create dynamic connection for database as well as table so that it can iterate through each and every tables of each database using SSIS.

I am using latest version of visual studio with SSDT so I didn't find option in connection manager properties to select variables.It provides only project parameters in property expression editor.

Thanks,




Moving table into csv file , column delimiter issue

$
0
0

Hi,

I have irregular table structure and want to move them into cs/txt file. I dont know which column delimiter I should use, Comma doesnt work because a lot of columns has commas too and I can not update commas with some other character because of customer agreement. What else i can do to get right columns with right values?

Thanks,

Gok

How To Delete Bottom N Rows From Excel File in SSIS Package

$
0
0

Hi,

I need to load data from excel file to SQL database but my excel file bottom 2 rows having company information which i need to delete while loading into SQL database using script task.

I am able to delete bottom 2 rows, if source is flatfile using below script in script task but same script is not working for Excel file.

Declared below 2 variables in ssis package.

User::VarFilePath: Contains source file path

User::VarDeleteBottomNRows: Holds the rows to be deleted from bottom (i.e. 2)

#region Namespacesusing System.IO;using System.Linq;#endregionpublicvoid Main() {// TODO: Add your code herestring FilePath = Dts.Variables["User::VarFilePath"].Value.ToString(); Int32 DeleteBottomNRows = Convert.ToInt32(Dts.Variables["VarDeleteBottomNRows"].Value);string[] lines = System.IO.File.ReadAllLines(FilePath); Array.Reverse(lines); lines= lines.Skip(DeleteBottomNRows).ToArray(); Array.Reverse(lines); System.IO.StreamWriter file =new System.IO.StreamWriter(FilePath); foreach (string line in lines) { // MessageBox.Show(line.ToString()); file.WriteLine(line); } file.Close(); Dts.TaskResult = (int)ScriptResults.Success; }Please suggest how to fix this issue using script task.

Thanks,

Visu

Not able to view the excel sheets in excel connection manager in SSDT 2017

$
0
0

Hi All,

I am using Wn10 and visual studio 2019 .

I am using the SSDT (15.9.28307.960) VS 2017, 

For excelconnection manager I am getting the this error " SSIS Excel Connection Manager failed to Connect to the Source"

I uninstalled my office 365 and AccessDatabaseEngine.exe 64 bit and installed the AccessDatabaseEngine 32 bit.

I tested in SSDT 2017 its working fine .

After that I am not able to install the office 365 and AccessDatabaseEngine 64 bit, it says there is 32 bit office product.

So I tried via the commandprompt withepassive parameter, it still fails.

hence I need to remove the 32 bit and installed 64 bit it make my office 365 running.

can anybody has any solution to this, 

thanks




DFD result in another DFD

$
0
0

Hi,

I want to use Dataflow task1 result into another Dataflow task2 without storing Dataflow task1 result into any destination  table/file. Is it possible?

So here what I am doing in Dataflow task 1 is Taking 2 OLEDB Source and perform join and combine that resultset in 1 using UNION all Now here i don't want to store the result in any table but wants to use the result in another Dataflow (i.e; Dataflow task2)

Thanks in advance

Passing Variable value from Package Part to Packages

$
0
0

Hi Team,

I am currently exploring PackagePart concepts which can be useful for creating reusable transformation.

I am having a variable VAR1 and the value for the variable is "1" in package part.

I am using the package part in a package named Package1, also having a variable named VAR1.

Now i am using my PackagePart in my Package1 and need to pass the value of VAR1 from PackagePart to Package1.

Could anyone please help me to understand how to pass a value of a variable from PackagePart to Package.

Thanks in Advance

Gayathri S

Webservice not working as excpected

$
0
0

For the first time i’m trying to use a webservice in SSIS.

The webservice I’m trying to use is: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

To test this webservice I use: https://wsdlbrowser.com/

I want to use the function CheckVat. There are two input fields, countrycode and vatnumber. The method returns the requestdate, valid, name and adress.

Request XML:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

 <SOAP-ENV:Body>

   <ns1:checkVat>

     <ns1:countryCode>NL</ns1:countryCode>

     <ns1:vatNumber>801837236B01</ns1:vatNumber>

   </ns1:checkVat>

 </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Result:

<soap:Envelope

   xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>

       <checkVatResponse

           xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">

           <countryCode>NL</countryCode>

           <vatNumber>801837236B01</vatNumber>

           <requestDate>2020-01-20+01:00</requestDate>

           <valid>true</valid>

           <name>GEMINI TECHNIEK B.V.</name>

           <address>

METAALSTRAAT 00022

7483PD HAAKSBERGEN

</address>

       </checkVatResponse>

   </soap:Body>

</soap:Envelope>

After checking this I created a simple test SSIS Package.

At first I create an Execute SQL Task that executes this query:

select 'NL' as countrycode, '801837236B01' as vatnumber.

Resultset: full result set

The resultset name = 0 and the variable name is use is User::Relations

The next step is to create a foreach loop that loops through the recordset. (Foreach ADO Enumerator)

In the loop I’ll add the web service task. In this task I’ll create an new HTTP connection with server URL: http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl

I downloaded the WSDL file and stored this file in the projectfolder. When i choose to overwrite the WSDL file and click download: the specified web services description language file was downloaded successfully.

Then I defined the Inputs. So I selected CheckVatService as the service and i’ve chosen CheckVat as a method.

Instead of only the countryCode and the vatNumber, SSIS displays 5 input variables: countryCode, vatNumber, valid, name and adress. These are the output columns?!?

For this test I use a file connection as output.

The package does now look like this:


When I run the package I get an error:

[Web Service Task] Error: An error occurred with the
following error message:"Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException:
Could not execute the Web method. The error is: Could not create an object of
the type ProxyNamespace.Boolean&. Check whether the default constructor
exists..   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo
methodInfo, String serviceName, Object connection)   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo
methodInfo, String serviceName, Object connection, VariableDispenser
taskVariableDispenser)   at
Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

The first field that I didn’t map tot the input fields is of type boolean… If I map ‘dummy’ variables with no value to the remaining input fields I get no error, but no output either. The output file consist of only the xml header:

<?xml version="1.0" encoding="utf-16"?>

<dateTime>2020-01-20T00:00:00+01:00</dateTime>

Is there something I'm missing? or is the webservice not suitable to use in SSIS.

SSIS code error -1071607685?

$
0
0

Anybody knows about this code?

he say then duplicate key on insert table(sql server), but, on table dont have data duplicate.

why this error?

Text Qualifier in SSIS designer for Flat file source

$
0
0

 

 

Unlike SQL Server 2000 DTS, SSIS Flat File Connection Manager Editor does not provide available list of Text qualifier,

 

i tried

 

-- ""

-- double quote {"}

-- "

--{"}

 

but none of them worked....!

My file sample looks like this

 

"Col1","Col2"

"1234","3456"

"3456","1234"

 

what qualifier should I use then?

 

Many Thanks,

 

User Variable - checking a value

$
0
0

I have inherited an SSIS package that selects data by SQL command in OLE DB Source.  Have added additional User Variable for Location ID, now in some cases that ID will have a value and other it will have a default value of zero. Which means the query does not need location ID check in the WHERE clause.  I need to check that User Variable to determine when added LocationID to the query.  I was not able to successfully add an if statement is the SQL command editor window.

 

Thanks for any guidance!

Amazon Web Service Call with Web Service Task

$
0
0

With the new improvments to the web service task, we can now use variables as arguments in web service calls.  I am trying to setup a call to the amazon web service ECS.  I am trying to do a simple sellerlookup.  I have played with the settings and gotten nowhere.  I get one of two error when I try to execute.  I can always use a scripting task or write my own task, but I would like to use the built in task if it is possible.  Has anyone used AWS with SSIS?

 

[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Object reference not set to an instance of an object..    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".

or


[Web Service Task] Error: An error occurred with the following error message: "Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebserviceTaskException: Could not execute the Web method. The error is: Method 'ProxyNamespace.AWSECommerceService.SellerLookup' not found..    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebMethodInvokerProxy.InvokeMethod(DTSWebMethodInfo methodInfo, String serviceName, Object connection)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTaskUtil.Invoke(DTSWebMethodInfo methodInfo, String serviceName, Object connection, VariableDispenser taskVariableDispenser)    at Microsoft.SqlServer.Dts.Tasks.WebServiceTask.WebServiceTask.executeThread()".


Source Data Base Types

$
0
0
What are the databases like Postgres, MongoDB, MySQL, Greenplum, Netezza, Teradata, Reddish, Casandra, Neo4J, OrientDb can we connect through SSIS and also give me the procedure to get the data from various database.

How to come back from child package to Parent package using ssis?

$
0
0
Hi everyone,

I am using parent child package in SSIS and I am able to go to child package and it executes the child package functionality. Now I need to come back to parent package and continue executing the tasks after where I called the child package.

For ex: If I have tasks like A-->B-->c (child package) -->D-->E, So after executing the task C,mwhich is child package, Flow should come back to Parent package and start executing from D. How can we achieve this?

Thanks in advance

SSIS Packages Connection Copy Error

$
0
0

In SSDT 2017, I get the following error when copying the connection from one package to another package. Connection is Project type connection.

Error:

TITLE: Microsoft Visual Studio
------------------------------

The SSIS designer could not initialize the pasted components for design-time operations.  

ADDITIONAL INFORMATION:

At least one connection manager could not be pasted correctly.
The connection manager with the name 'XXXXXXXXXXX 1' could not be pasted successfully.
The connection manager could not be created.
Object reference not set to an instance of an object. (Microsoft.DataTransformationServices.Design)


SSIS Job Failing

$
0
0

I have an SSIS job which will hit MS SQL database, while running the specified job am getting below error message.

 Description: SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.  An OLE DB record is available.  Source: "Microsoft SQL Server Native Client 11.0"  Hresult: 0x80004005  Description:"Unable to complete login process due to delay in opening server connection".  End Error  Error: 2020-01-21 01:44:02.39     Code: 0xC0202009

During this failure am not finding any useful hints in event viewer or in SQL server error logs.

Can you please help me to fix this issue.

can a deleted package in ssis be retrieved?

$
0
0

Hi All

I deleted a package that I have spent time creating by accident, is there is a way to get it back?

Thanks

Viewing all 24688 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>