Monday, March 19, 2012

Is it possible to access data associated with a hyperlink in SSIS?

I need to be able to to extract the data that is returned by clicking a hyperlink. I click the link and it displays the data.

I know that SSIS has a web services task, and that appears to be a neat feature, but the link I am connecting to does not have a WSDL file or anything like that. So I think I cannot use this task.

Does anyone have a suggestion about how I might do this?

Thanks for your help,

Harold

What data that is returned by clicking a hyperlink?

What is the hyperlink hosted in?

What defines or restricts this data?

What do you expect to happen to this extracted data?

SSIS is a backend ETL tool, I cannot work out what you would expect it to do for you, in what I am guessing is some kind of web UI

|||

Hello Darren,

Thanks for responding to my post.

I want to read the data that are displayed when I click a hyperlink.

When the package is executed, it should go to the hyperlink (URL) and get the data it displays.

The data that are displayed are:

var imgRates = {"ThirtyFixed":"6.298","FifteenFixed":"5.926","ThirtyFixedJumbo":"6.339","FiveOneARM":"5.831"};

I want to read that string into my package. I will then parse and store it.

Do you know if this can be done?

Thanks,

Harold

|||Your data looks to be a line of code. It doesn;t look very big, and not really what i woudl expct for an ETL source. Just write this in your programming language of choice, forget about SSIS.|||Here is some code that will go to a URL that you provide and read the content into a string.

Code Snippet

Dim webRequest As System.Net.WebRequest = System.Net.HttpWebRequest.Create(Dts.Variables("Url").Value.ToString())
Dim webResponse As System.Net.WebResponse = webRequest.GetResponse()
Dim stream As System.IO.Stream = webResponse.GetResponseStream()
Dim streamReader As New System.IO.StreamReader(stream)
Dim content As String = streamReader.ReadToEnd()


|||

Hello Jay,

The code snippet was just what I needed!

Thanks for your help, and for the others who took time to repond.

Harold

No comments:

Post a Comment