Hi, Suganya.
I initially had your problem, but was able to find a solution.
First, I created a new object as a custom utility.
In the Initialize stage:
- In the Global Code, I placed "Private CONN As TdConnection" (without the quotation marks).
- Under Code Options, (and hopefully you have the same folder structure), I put C:\Program Files (x86)\Teradata\NET Data Provider for Teradata\15.11\bin\Teradata.Client.Provider.dll in the External References, and Teradata.Client.Provider in the Namespace Imports.
To open the connection, I used a similar code structure as the
Data - OLEDB VBO object. In a code stage, I put the following:
If CONN Is Nothing Then
Try
CONN = New TdConnection("Data Source=" & datasrc & ";User Id=" & usrid & ";Password=" & pass & ";")
CONN.Open()
Catch ex As Exception
errmsg = ex.Message
End Try
End If
datasrc, usrid, and
pass are all inputs to the code stage.
datasrc is your Teradata server address. I ended up putting all this into a new BP Credential.
Finally, in order to get a collection from querying Teradata, I again made some minor adjustments to a
Data - OLEDB VBO object action. In a separate action and code stage:
Try
Dim oDataAdapter As New TdDataAdapter(SQL,CONN)
Dim oDataSet As New DataSet
oDataAdapter.Fill(oDataset)
Results = oDataSet.Tables(0)
Catch ex As Exception
errmsg = ex.Message
End Try
SQL being the only input, and
Results being the main output.
------------------------------
Max Downey
------------------------------