Flat File with multiple record types (OWB 10.2.0.2)

Hi!
I`m using OWB 10.2.0.2 and I`m trying to load a flat file with multiple record types, using SQL LOADER.
In the flat file editor in the Record tab, I`ve set the type values and the corresponding record names like this:
Type Value Record Name
======== ===========
T TRAILER
0 DETAILS
1 DETAILS
2 DETAILS
When using this flat file in a mapping to load the data in a staging table, the generated code looks like this:
INTO TABLE TRAILER
TRUNCATE
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = 'T'
INTO TABLE DETAILS
APPEND
REENABLE DISABLED_CONSTRAINTS
WHEN (1:1) = '0,1,2'
The above clause (WHEN (1:1) = '0,1,2') is wrong as I expect one "INTO TABLE..." clause for each record type.
Could this be a bug or am I doing something wrong?
Thanks a lot for your help,
Yorgos

We`re using two target tables, one for the trailer record and the other for the details records.
We are facing this problem from the moment we upgraded from OWB 10.1 to OWB 10.2.0.2, so we think it must be something with the way the sql loader code is generated in the new version.
As our data sources are mainly flat files coming from mainframes, this is a huge problem for us. We even asked an expert in DW from Oracle to help us on this, but still haven`t found a solution.
Is there any workaround for this or should we forget sql loader and go with an external tables + custom PL/SQL code solution?
Your help is greatly appreciated Jean-Pierre.
Regards,
Yorgos

Similar Messages

  • Load data from a file with multiple record types to a single table-sqlldr

    We are using two datastores which refer to the same file. The file has 2 types of records header and detail.
    h011234tyre
    d01rey5679jkj5679
    h011235tyrr
    d01rel5678jul5688
    d01reh5698jll5638
    Can someone help in loading these lines from one file with only two data stores(not 2 separate files) using File to Oracle(SQLLDR) Knowledge Module.

    Hi,
    Unfortunately the IKM SQLDR doesn't have the "when" condition to be wrote at ctl file.
    If you wish a simple solution, just add an option (drop me a email if you want a LKM with this)
    The point is:
    With a single option, you will control the when ctl clause and, for instance, can define:
    1) create 2 datastores (1 for each file)
    2) the first position will be a column at each datastore
    3) write the when condition to this first column at the LKM in the interface.
    Does it help you?

  • Create a flat file with multiple characters for enclosures

    Hello,
    we use OWB 11g2 (11.2.02).
    Now we try to create a flat file with multiple characters for enclosures. The manual wrote:
    "Enclosures (Left and Right): Some delimited files contain enclosures that denote text strings within a field. If the file contains enclosures, enter an enclosure character in the text box or select one from the list. The list displays commonenclosures. However, you may enter any character. The default for both the left and right enclosure is the double quotation mark ("). You can specify multiple characters and hexadecimal characters as field enclosures."
    But it will not work. The OWB use the first character from the left enclosure definition as left enclosure and the second one as right enclosure !?!
    Did anyone know this behavior? Is there a solution for this problem?
    Thanks and regards
    Norbert

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • Reading fixed length file with different record types

    Hi,
    I need to read a fixed-length file with different record types, but the record identifier is in 31st position and not in 1st position.
    But if I give 31 as position in File adpater wizard, BPEL takes whole 1-31 as identifier.
    How we need to read such files.
    Thanks
    Ravdeep

    hi ,
    u cannot use the default wzard for this
    use some thing like this nxsd:lookAhead="30" nxsd:lookFor="S"have a look at the below link it has some examples
    http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/nfb.htm

  • Re: Upload a flat file with multiple field seperators

    HI Experts,
    In my reports program iam trying to  upload  the data with in flat file with multiple seperators
    but data is not uploading can ypu please suggest the solution.
    Is there any function module to upload with multiple field seperators
    Example of flat file:
    E1234     JOHN     BB     HYD     IN     EN
    E1234,BURE,BH,DSNR,IN,EN
    E1236 KIWI KW HYT IN EN
    E1237;BRAD;BW;MSRD;IN;EN
    Thanks & Regards,
    Raghusagar.G

    HI Raghu,
               Use the function module 'GUI_UPLOAD'.
               In that you have to specify the field_separator value = 'X' in export section.
    Regards,
    S.C.K

  • File Adapter - Multiple Record Types to same Target

    I am currently reading in a fixed length file and loading into a table.
    The issue is, some of the lines in my file differ by two spaces at the end. See example below.
    For example,
    Record 1 might look like :
    DD/MM/YY - length of 8
    Record 2 might look like:
    DD/MM/YY{space}{space} - length of 10
    and they both go into the same date column of my target
    Question 1) Is there a way for BPEL to skip the two spaces at the end of each line for Record 2
    Queston 2) I have currently created multiple record types for the two types but it won't allow me in my transformation to map them both to the "date" column in the target table. It says multiple nodes cannot be mapped to the target
    Any help would be appreciated.

    Hi,
    Unfortunately the IKM SQLDR doesn't have the "when" condition to be wrote at ctl file.
    If you wish a simple solution, just add an option (drop me a email if you want a LKM with this)
    The point is:
    With a single option, you will control the when ctl clause and, for instance, can define:
    1) create 2 datastores (1 for each file)
    2) the first position will be a column at each datastore
    3) write the when condition to this first column at the LKM in the interface.
    Does it help you?

  • VSAM file with multiple record layouts (COBOL REDEFINES)

    Hi. We're using Tuxedo 12c to migrate a COBOL/CICS/VSAM application from MVS to Solaris/Oracle 11gR2.
    We have a few VSAM files with record layouts that start with a record-type field, and based on that, the remainder of the record layout varies based on COBOL copybooks using REDEFINES. We can't be the first to have this issue, and am wondering if there's a best-practice solution. Our initial thought is that each record type should become a separate database table, but if we need to do this manually, we'll also need to modify the post-converted code manually. I'm hoping there's a better way.
    Thanks.

    You are correct; you are not the first person to do this. There are a number of different strategies depending upon what you are trying to accomplish. First, is your objective to leave the COBOL/CICS/VSAM as is? If so, which COBOL compiler do you intend to use? Are you using Tuxedo ART Workbench? Are you aware that you have the option of leaving the VSAM datasets as VSAM on the target platform? If you want to convert VSAM to Oracle DB tables, you can create a separate table for each record type as you suggested or you can treat the entire record as a blob and let the copyfile sort it out once the data is returned to the program. Of course with this approach you will not realize the benefits Oracle DB as an RDBMS. Please provide me some additional context and I will make some best practices suggestions.
    You can get some insight on Tuxedo ART Workbench at http://docs.oracle.com/cd/E18050_01/artwb/docs11gr1/wbuser/FileToOracle.html

  • Loading Hex Files with multiple records with each line starting with : record marker, how do I load this hex file into a front panel table ? thanks in advance, Jeff.

    I have written a routine that loads a Hex file, checks for record marker,length,address etc then loads the data into a table on front panel. However, my routine only loads single record hex files. I need to be able to load multiple record files, I need to identify the ':' colon record marker start for each record in the hex file, I just can't see how to loop my routine so that all records with ':' prefix marker are loaded.

    Jeff,
    I'm not exactly sure of what you are trying to do. Is it possible you could post your code, or a screen shot of the diagram in question, so that I can get a better understanding, and possibly offer some assistance?
    I am familiar with hex files, but not with the : marker separating records. This may be able to be solved with simple text parsing, and as I am not familiar with how you are retrieving and/or displaying the files, I require more information.
    Thanks

  • Get MUTLIPLE output files for SINGLE input file with multiple records

    Hi ,
    I have source xml file  which has multiple records in it and  I want to get multiple seperate  flat files for it.
    this is my source structure
    <root>
    <Header1 fld1=1234 fld2="name1" fld3='SAP1"
    fld4='000" fld5=0 fld6="sdn1"></header>...............no line items here
    <Header2 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value1 fld8=value2 fld9=value3 /line><line fld7=value4 fld8=value5 fld9=value6 /line></header>.....two line items here
    <Header3 fld1=123 fld2="name" fld3='SAP"
    fld4='00" fld5=0 fld6="sdn" ><line fld7=value7 fld8=value8 fld9=value9 /line></header>......one line item here
    Header4 fld1=12345 fld2="name2" fld3='SAP2"
    fld4='0006" fld5=01 fld6="sdn2"</header>.......no line items here
    </root>
    I am trying to get flat files as many time the <b>header</b> values occur that many target files should appear in the target.
    like
    file1:
    1234name1SAP10000~sdn1
    file2:
    123nameSAp000~sdn
    value1value2valu3
    valu4value5value6
    file3:
    123namesap000~sdn
    value7valu8value9
    file4:
    12345name2SAP2000601~SDN2
    here I have 4 headers so i need to get 4 output files ,similarly for 'n' headers I need to get 'n'  output flat files. the above mentioned source xml file is just one file,like that I might get somany sourc xml files which has similar structure in it.
    and also it is important to get the line items,if exists to the header, for the corresponding headers.
    how can I achieve this?do I need to use BPM or any mappings other than Graphical? 
    please suggest me.
    thank you.
    Babu
    sorry,output file structure changed
            Babu

    Babu,
    See the Mapping and the logic.
    Make sure your target message occurrence:http://www.flickr.com/photo_zoom.gne?id=1412748793&size=o
    Check out for source and target structure
    http://www.flickr.com/photo_zoom.gne?id=1412748803&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748809&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748815&size=o
    http://www.flickr.com/photo_zoom.gne?id=1412748825&size=o
    Results:http://www.flickr.com/photo_zoom.gne?id=1412748799&size=o
    Note:
    While creating Interface determination choose it as Enhanced/Extended
    The Receiver Content conversion - For field separator and line separator give 'nl' , coz we concatenated all of them using ~ in mapping.
    If you find any discrepancy in the above logic , please let me know.
    raj.

  • Positional Polling a file with multiple records at single line

    Hi
    I am trying to poll a file with positional read.It works fine with single record at single line.But how to solve the problem when there are multiple records at single line???How to delimit the records??

    i have a file which contains emp records like empID,empName,Dept.And these records of fixed length.I need to poll this file wirh positional read.I used fixed length polling.It works fine when there is only 1 record at one line.But when 2 or more records on same line it takes first record correctly but could not understand the start of second record.
    for ex
    1 shital mktg
    2 priya finance
    it works when records are at separate line.
    but another case is:
    1 shital mktg 2 priya finance
    how to delimit these records??

  • Idoc outbound to file with multiple records

    Hi Friends,
    I want to export multiple materials into one flat file per ale (idoc).
    I know I can create îdocs per "bd10" and download into file per WE19,
    but only several files not many idocs in one file.
    Can somebody help me with this requirement.
    Actually I want to extract material data per Idoc and import it later per LSMW.
    Many Thanks.
    Jimbob

    Your file port defintion (WE21) specifies the function module for creating the pathname (path + filename) for the IDOC file; most likely , it's EDI_PATH_CREATE_CLIENT_DOCNUM.  You can replace this with your own Z-function or one of the other EDI_PATH_CREATE_ functions that will use the same path name over and over.  You would not need to change the write mode, since it's already append mode by default in the system.  Of course, you are correct, there are many other approaches available to get the data moved...

  • Splitting of a CSV File with Multiple Records into Multiple XML File

    Dear All,
    <b> I am doing a Scenario of CSV to XML Files. I am using BPM for the same. My incoming CSV File has got multiple records. I want to break this Multiple records into Multiple XML Files having one record each.</b>
    Can someone suggest how can I break this rather Split this into Multiple XML Files.
    Is Multimapping absoltely necesaary for this. Can't we do this without Multimapping. Can we have some workaround in the FCC parameters that we use in the Integration Directory.
    Kindly reply ASAP. Thanks a lot to all in anticipation.
    Pls Help.
    Best Regards
    Chakra and Somnath

    Dear All,
    I am trying to do the Multimapping, and have 0....unbounded also. Someways it is not working.
    <b>
    Smitha please tell me one thing...Assigning the Recordsets per Message to 1, does it mean that it will write multiple XML Files as I want.</b>
    Also I am usinf Set to Read only. So once the File is read it becomes RA from A. Then will it write the other Records.
    I have to use a BPM because there are certain dependencies that are there for the entire Process Flow. I cannot do without a BPM.
    Awaiting a reply. Thanks a lot in anticipation.
    Best Regards
    Chakra and Somnath

  • How to populate a form from an xml file with multiple records

    I want to be able to create a single form that will add pages as needed based upon the number of records being imported from an xml file.
    I have an IRS form that does this exactly, but I do not know how to re-create it.  I entered data into the form, then exported that data to xml.  Then I opened that xml file in excel and added more records (this is just an easy way to manage the xml data in a tabular form).  Then I import the changed xml file into the IRS form and it adds as many pages as I have records.  Perfect!  Unfortunately, I cannot edit the form to examine the technique.  It does not appear to be relying upon any additional local javascript files.  It does use an 'add page' button which may suggest the form is using the template .spawn() technique, but when I try that in my own form, it gives me unique field names for each page which are then not consistent with the xml data.  Hopefully someone can help me understand what I am missing.

    did you want
    <record>0
    <data>"11.97.23.174/32"
    <record>address <data>
    <record>address <data>
    <record>subnet <data>
    <record>ip <data>"10.97.23.174"</data></record>
    </data></record>
    </data></record>
    </data></record>
    </data></record>
    or
    <record>0
    <data>"11.97.23.174/32"
    <record>address <data>
    <record>address <data>
    <record>subnet <data>
    <record>ip <data>"10.97.23.174"</data></record>

  • XML file with multiple records

    I have an XML data file that will look something like this (repeated possibly several hundred times):
    <?xml version='1.0' encoding='utf-8'?>
    <A><V>Wake up to WonderWidgets!</V>
    <C>Why are great</C>
    </A>
    <?xml version='1.0' encoding='utf-8'?>
    <A>Eric</A>
    When I try to parse the code using the Echo03.java sample from the website, I get the following error: END_ELM: </>org.xml.sax.SAXParseException: XML declaration may only begin entities.
         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3339)
         at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3327)
         at org.apache.crimson.parser.Parser2.maybePI(Parser2.java:1107)
         at org.apache.crimson.parser.Parser2.maybeMisc(Parser2.java:1233)
         at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:638)
         at org.apache.crimson.parser.Parser2.parse(Parser2.java:333)
         at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
         at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
         at Echo03.main(Echo03.java:60)
    Is there any way (short of actually reading the file and looking for the beginning of each record) that I can get the parser to do multiple stard and end documents or at least get it to read and parse all the entries in the file?
    Thanks

    Yout file should look something like this: <
    ?xml version='1.0' encoding='utf-8'?>
    <start>
    <A><V>Wake up to WonderWidgets!</V>
    <C>Why are great</C>
    </A>
    <A>Eric</A>
    </start>
    you can only have one root element ( e.g. <start> )

  • File Adapter: Multiple Records, Multiple Types to Multiple DB Tables

    Hi there,
    I have a proof-of-concept scenario which I am trying to model in ESB:
    I have a single flat file with one invoice header record and multiple invoice lines.
    I want to read this file via the File Adapter, and insert the different records into different database tables: the invoice header in an invoice table, and the invoice lines into a line item table.
    If I tackle the lines in isolation no problem (i.e. single file with only invoice lines in to the invoice lines table). Things break down when I add the invoice header into the mix.
    Does anyone have an example of this or something similar?
    Would I need to use seperate database adapters for the two tables, or is this achievable with a single database adapter?
    Thanks in advance!

    Thanks for that Abhi.
    I actually tried that, but I'd find that I would only get the header record added properly; the multiple invoice lines would not get written to the invoice line table properly.
    I found that I would either get the same invoice line added many times, or I would get null values.
    I played around with the for-each statement, and I even tried creating my own xsd for the data file (instead of using the native format tool).
    Any ideas what the issue might be?
    Thanks,
    Richard

Maybe you are looking for