Forum Stats

  • 3,827,912 Users
  • 2,260,838 Discussions
  • 7,897,404 Comments

Discussions

Using XML File as a Data Server

geeo73
geeo73 Member Posts: 54
edited Sep 23, 2008 12:16PM in Data Integrator
OK - here's my scenario:

- Have an XML file that I am holding parameters (i.e log file folder) in
- I have set the XML file as a data server (which test connects OK) and created physical and logical schemas in Topology Manager
- In Designer, have created a data model for this file

What I am trying to do is populate/refresh a global variable with a value from the XML file; however, when I make a change to the value in the XML file, the value does not get passed into the variable.

In the global variable, it is set to refresh from the xml data source and in a package I am using a variable step set to refresh but still the data does not update with the current values in the file.

Couple of other things - if I go to the data model and view the data, it sees the value that is in the xml file but the variable is not getting the same value - it seems to be using some kind of cached value. Also, if I close any open ODI apps (Designer, Operator, etc.) and re-open, the values (sometimes) seem to reflect what is in the file.

Crux of the post - am I missing something so obvious that I cannot see it or has anyone else experienced this kind of issue.

Thanks,

Gee

Answers

  • 197908
    197908 Member Posts: 5
    edited Sep 18, 2008 11:21PM
    Hi,

    I am not entirely whether this will solve your problem but create a procedure with following commands in separate steps:
    1. DROP SCHEMA <your_schema_name_for_xml>
    2. CREATE SCHEMA <your_schema_name_for_xml> WITH DTD "<your_dtd/xsd_file_path>" REPLACE
    3. SET SCHEMA <your_schema_name_for_xml>
    4. SYNCHRONIZE SCHEMA <your_schema_name_for_xml> FROM FILE IGNORE CONFLICTS

    Add this procedure as first step in your package. In my honest opinion only the last step which synchronizes schema with the file should be sufficient but I just wanted to make sure the existing schema is dropped and recreated so added the first three steps.

    Hope this helps.

    Regards,
    Nik

    Edited by: odinik on Sep 18, 2008 8:21 PM
    197908
  • geeo73
    geeo73 Member Posts: 54
    OK - I got this working but in order to do this I followed some info from another post and changed the structure of the XML.

    Previously, it was structured as:

    <params>
    <param>
    <name>Test1</name>
    <value>Some Value</value>
    </param>
    <param>
    <name>Test2</name>
    <value>Some Value2</value>
    </param>
    </params>

    Now I have changed it to:

    <params>
    <param name="Test1" value="Some Value" />
    <param name="Test2" value="Some Value2" />
    </params>

    I also added the dod=true value into the JDCB url.

    Now, one of these circumstances fixed my issue (of which I am very glad) but I don't know which one :-) .... and I currently don't have the time to find out.

    I may investigate this further in the future (and post accordingly).

    Thanks,

    G
This discussion has been closed.