This content has been marked as final. Show 6 replies
There are multiple ways that data can be extracted from FDM. The simplest method is to use the Pull Adapter: http://docs.oracle.com/cd/E12825_01/epm.111/fdm_adapter_readmes/pull_g4_e_adapter_readme.html
As far as the reverse direction, can you explain in a little more depth as to what you're trying to accomplish?
Thanks for your reply.
Is it possible to pull data from table and load into text file by writing FDM custom script rather than using Pull adapter.
Regarding, the second point, I just want to know if there is any possibility where in we can create a table in any shcema and pass records from a text file to the table through custom script in FDM.
The answer to both questions is yes. You can use ADO to execute SQL commands that extract from/write to a database table. There is a script example in the section on Integration Scripts in the FDM Admin Guide that will provide some guidelines. There is also a good deal of info and examples online of using vbScript, ADO, and SQL to manipulate database tables and write to files.
Thanks for quick response..I tried the logic to copy records from table to text.
I am able to fetch records from table uisng sql and create record set.
But, I am having issues in opening the record set for reading and writing records to text file.
Is there any command to just open record set for reading because I see one for appending and not for just reading
Here's some code that writes a recordset's entire contents to file. A semi-colon is used as the delimeter. Plenty of info on GetString online:
Set rs = DW.DataAccess.farsFireHose(strSQL, False) With rs If Not .EOF Then Set fsoFile = fso.OpenTextFile(strFile, 2, True)' Open the file for writing, overwriting if it exists Do While Not .EOF fsoFile.Write .GetString(2,20,";",vbCrLf)' Write the records to file Loop fsoFile.Close End If .Close End With
This is really helpful.Thanks a lot.