Hi ,I have doubt in ssis,
get usd to gbp exchange rates conversation information for daily basis
here I Done current live values for ssis package ran day information values using webservice task.
get currency
exchange rates for USD to GBP.
to run ssis ETL package daily,pull the data from webservice on the web and insert into the stage table.
step 1 : open new project of integration services and rename the default package name as webservice
step 2 : drag and drop the webservic task in package and a variables (GBP_value)
step3 : create new HTTP connection by right clink in connnection manager and select http connection and enter the server url as
http://www.webservicex.net/CurrencyConvertor.asmx?WSDL and testthe test connection.
step 4: open the new notepad and save it as currencyconvertor.wsdlfor required location .
step 5 : Double click on the web service task and confiure like belowin
general tab: Httpconnection .....>http connection manager which we create earlywsdl file .....> browse and select the currencyconvertor.wsdl
fileoverwritewsdlfile.....> set as truedownload the wsl file and overwrite to empty wsdl fileinput tab:in input tab
we have to configurservice .....>currecconvertormethod.....>convesionrateand also
I need to select the from currency value and tocurrencyvalueFromCurrency as usd(us dollar)
and Tocurrency(GBP uk)output:in output tab i have to configur the output type : variable : GBP_value
step 6 : from the datafow to insert the stagein oledb source select data access mode : sql command
select getdate()as daterun ,convert(nvarchar(4000),NULL)as viewxml ,convert(nvarchar(3),'GBP')as currencytype
then fields list like daterun,viewxml,currencytypederievd column to expression : @[user::GBP_value]insert to stage dimcurrencystage.
after that take another dft and drag and drop oledb source and dataaccess is sql command and write query like
SELECT [Currencytype] = [CurrencyAbbr] [DateSK] = convert(int,convert(varchar(8),Convert(date,[DateRun]),112))
,[ExchangeRate] = CONVERT(Decimal(18,2),CAST(CAST(ViewXML AS XML).query('data(/double)') AS varchar(4000))) FROM
[dbo].[DimCurrency_Stage]
then this data load in to final table.its working fine some times.but
when I ran websrvice package some time its returning -1 as usd to GBP conversion.
<double>-1</double>
can you please tell me why its returning -1 instead of orginal values.
when -1 values return how to handle that case .please tell me how to achive this task in ssis.