Flat file as targets in a mapping.

Hi All,
While reading on-line documentation in topic Define Mappings of oracle9i warehouse builder i came across following statement.
"A mapping can contain up to 50 flat files as targets, and it can also contain mix of flat files, relational objects and transformations."
Does this mean a flat file can be used as target in a mapping? I am in impression that only flat file can be used as source in a mapping.
Thanks in Advance.
Regards,
Vidyanand

Hi Igor,
Some update on this, I managed to find steps to include flat file as target in a mapping.
Steps followed were as follows.
1> Created a File Module.
2> Imported a Text File with headings and no records.
3> Created a Warehouse Module.
4> Imported scott.dept table into the module.
5> Created a mapping, mapped scott.dept table to the text file.
6> Selected Configure option in the mapping. Set parameters Thefilename = the above file name and Access Specification).
7> Validated & Generated map, it looks fine with no errors.
8> Deployed & run the package.Deployment didn't show any errors however while running displays error ORA-01403: no data found.
Please note that the utl_file_dir parameter is set on oracle server and the utl_file_dir is mapped in windows NT explorer from machine.
Does anyone knows more about this error?
Thanks in Advance.
Regards,
Vidyanand

Similar Messages

  • Flat File as Target - MultiRecord Type

    How do I write from Oracle into a Flat File as Target where the data in Flat file is a multirecord type. For ex. Sales Order header and Sales Order Line info.
    I tried to do this by using a Joiner to the sales order header, line and items table and then mapping outgrp of joiner to the Flat file data with two record types in it. But when I generate and run this it could only create header records in out put file

    Dear 396217,
    As far as I am concerned you cannot really push out to a multi record structure without manual intervention.
    There are a few things you can do: on the target (not sure whether that was already available in 9.0.3... but it definitely is in 9.0.4) you can set the flat file as a target to generate field names as headers. If that is what you want... then great.
    The initial scenario: orders and order items in one model, is not supported. What you could do... is write a transformation to do this. Use calls to UTL_FILE to implement those and generate your own records. Primitive... but it works.
    Alternatively, create 2 files and have a separate external process merge these. Not ideal; I realize that.
    Mark.

  • Flat file to target table map in 11G

    Hi,
    I am havin many problem with my 10G R1 map that have been migrated to 11G.
    all that my 10G map has is mapping from flat file to stage table. It also had one constant operator. i am getting error coz of this constant that i am setting up in the map.
    when i validate this constant variable i get error mess:
    API8534:Validation no supported for language SQLLOADER,property Expression for SAASD_MAP
    -- Generator Version : 11.1.0.7.0
    -- Created Date : Mon May 11 21:16:25 CDT 2009
    -- Modified Date : Mon May 11 21:16:25 CDT 2009
    -- Created By : OWB_WUSER
    -- Modified By : OWB_WUSER
    -- Generated Object Type : SQL*Loader Control File
    -- Generated Object Name : "SADAD_MAP"
    -- Copyright © 2000, 2007, Oracle. All rights reserved.
    OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,READSIZE=65536)
    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.dat'
    BADFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.bad'
    DISCARDFILE '{{ETL_FILE_LOC.RootPath}}{{}}dgp.dis'
    CONCATENATE 1
    INTO TABLE "STAGING"."DGP_STAGG"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    WHEN (1:2) = 'EM'
    "PHONE_COUNTRY" CONSTANT ''Asia'',
    "MRI" POSITION(1:2) CHAR(2) ,
    if you note 11G some how does not allow me to have constant operator in flat file maps. and the constant for PHONE_COUNTRY column is enclosed in double quotes insted of single quotes.[should be 'Asia' and not ''Asia'']
    can any one tell me why this is heppening?...i also have problem with the READ BUFFER property. which in 10G used to be defulted to '4' but ignored which generating the .ctl but in 11G this property creates READ BUFFERS statement in .ctl....any help in this will be grt.
    Edited by: user591315 on May 12, 2009 7:39 AM

    if you note 11G some how does not allow me to have constant operator in flat file maps. and the constant for >PHONE_COUNTRY column is enclosed in double quotes insted of single quotes.Hi
    Please open the same mapping in 10g R2 its same .
    It use Double code around the column name.
    By the way execute the mapping and then check are you getting desired result.

  • VLD-6328 error : Use a flat file as Source in a mapping in OWB 10.2

    Dear all,
    I have created a simple mapping using a flat file in a remote server as a source and a simple table as a target.
    When I try to validate the mapping I get the following warning:
    "VLD-2398: No data file specified. Generated code will use the sampled file name and the file location xxx"
    I use the version 10.2 and I cannot find "Sources" or "Targets" when I use the "Configure" options.
    Any help will be appreciated

    Hi all,
    If you want to validate correctly this mapping you must to :
    1. Right click on the mapping, then Configure
    2. Right click on Sql Loader Data Files, then Create
    3. Verify that the location name is correct and complete the Data File Name
    4. OK
    The validation is now OK.
    I hope it will be help you
    Best Regards
    Samy

  • Flat File as Source in OWB Mapping.

    Hi All,
    Configuration Details is as follows:
    Oracle 9i Warehouse Builder Client: 9.2.0.2.8
    Oracle 9i Warehouse Builder Repository: 9.2.0.2.0
    Windows XP Professional
    I developed a mapping which involves a flat file as source & Oracle Table as target steps followed were as follows.
    1. Created Flat File module, selected Connector & Location Details.
    2. Done mapping for source file & target table.
    3. Validated & Generated the mappings.
    4. Deployed the mapping in Deployment Manager.
    5. Following was Error Message after execution of the mapping.
    Completion Status: Completed with errors.
    Meesage Log: Starting Execution of VHM_MAP2. Starting Task VHM_MAP2. RPE-01013:SQL Loader reported error condition,number 4. Completing Task VHM_MAP2.
    Following was Control File generated by the above mapping.
    OPTIONS ( ERRORS=50, BINDSIZE=50000, ROWS=200, READSIZE=65536)
    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.txt'
    BADFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.bad'
    DISCARDFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.discard'
    INTO TABLE "{{TARGET_LOCATION.Schema}}"."DEPT"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    FIELDS
    TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    "DEPTNO" POSITION (1) INTEGER EXTERNAL ,
    "DNAME" CHAR ,
    "LOC" CHAR
    Please note that no message is displayed in Row Activity & output parameters in Deployment Manager.
    I worked on lower version of the OWB & in that version there was no concept of Location, Connector, Deployment Manager.
    Not sure why the above mapping is failing?
    Also I would like to know where can I get more information about the mapping errors which are different from oracle error messages.
    e.g. In above case error message is RPE-01013: SQL Loader reported error condition, number 4 .
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi
    I'm using single host implementation OWB10g/Oracle on same host.
    My flat file location is
    c:\source\dept.txt
    Pl tell me if I have to save the same file on any particular location for OWB to read.
    Implementation in OWB10g
    1. Created Flat File module, selected Connector & Location Details.
    2. Done mapping for source file & target table.
    3. Validated & Generated the mappings.
    4. Deployed the mapping in Deployment Manager.
    5. Following was Error Message after execution of the mapping.
    Can not read data from file
    c:\souredept.txt
    OPTIONS ( ERRORS=50, BINDSIZE=50000, ROWS=200, READSIZE=65536)
    LOAD DATA
    CHARACTERSET WE8MSWIN1252
    INFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.txt'
    BADFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.bad'
    DISCARDFILE '{{TEXT_DATA_LOCATION.RootPath}}dept.discard'
    INTO TABLE "{{TARGET_LOCATION.Schema}}"."DEPT"
    APPEND
    REENABLE DISABLED_CONSTRAINTS
    FIELDS
    TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    "DEPTNO" POSITION (1) INTEGER EXTERNAL ,
    "DNAME" CHAR ,
    "LOC" CHAR
    Thx in advance

  • Load data from flat file to target table with scheduling in loader

    Hi All,
    I have requirement as follows.
    I need to load the data to the target table on every Saturday. My source file consists of dataof several sates.For every week i have to load one particular state data to target table.
    If first week I loaded AP data, then second week on Saturday karnatak, etc.
    can u plz provide code also how can i schedule the data load with every saturday  with different state column values automatically.
    Thanks & Regards,
    Sekhar

    The best solution would be:
    get the flat file to the Database server
    define an External Table pointing to that flat file
    insert into destination table(s) as select * from external_table
    Loading only single state data each Saturday might mean troubles, but assuming there are valid reasons to do so, you could:
    create a job with a p_state parameter executing insert into destination table(s) as select * from external_table where state = p_state
    create a Scheduler chain where each member runs on next Saturday executing the same job with a different p_stateparameter
    Managing Tables
    Oracle Scheduler Concepts
    Regards
    Etbin

  • How to Use Flat File As source in operation mapping?

    Hi dont want to use an FCC. I have written an JAVA Mapping to convert a flat file to XML.
    But in Interface Mapping How i can test this?

    /*This java mapping will give same output as input payload */
    package com.mapping;
    import java.io.InputStream;
    import java.io.OutputStream;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class Java_Mapping extends AbstractTransformation {
         public void transform(TransformationInput transformationInput,
                   TransformationOutput transformationOutput)
                   throws StreamTransformationException {
              try {
                   InputStream inputstream = transformationInput.getInputPayload()
                             .getInputStream();
                   OutputStream outputstream = transformationOutput.getOutputPayload()
                             .getOutputStream();
                   byte[] b = new byte[inputstream.available()];
                   inputstream.read(b);
                   String strContent = new String(b);
                   outputstream.write(strContent.getBytes());
              } catch (Exception exception) {
                   exception.printStackTrace();
    Edited by: Raghu Vamsee on Jan 5, 2011 3:46 PM

  • Flat Files as Targets

    I am working on Oralce Warehouse Builder(9.2). I would like to extract data from Oracle Db(8.1.7.4) and then transform to Flat Files...Could any one help me out how to set target as Flat files. or Is it possible to do that? your help would be highly appreciated.
    Thanks,
    Srikanth.

    Srikanth,
    Check out the user's guide (http://www.oracle.com/technology/documentation/warehouse.html):
    - http://download-west.oracle.com/docs/html/B12146_01/defsource.htm#sthref836
    - http://download-west.oracle.com/docs/html/B12146_01/mappings.htm#sthref1327
    - http://download-west.oracle.com/docs/html/B12146_01/mapoperators.htm#sthref1599
    - http://download-west.oracle.com/docs/html/B12146_01/configetl.htm#sthref2302
    Thanks,
    Mark.

  • Flat file to Target Table Mapping.

    Hi All,
    OWB Client 9.0.2.56.0
    OWB Repository 9.0.2.0
    WIN - NT 196 MB RAM.
    I created a mapping which involved a fixed width text file
    ( Size of text file is 5 MB & number of columns around 28), applied some filter criteria & performed insert operation in a target table.
    All seems to be fine, i could validate the mapping without errors & generate the mapping. I can save newly generated control file & uploaded the data into the target table using sqlldr. However it seems even after i selected Close command button in Generate Result window nothing happens, only way i can exit from this is by killing the session & this result in auto deletion of newly created mapping (Even though i commit the changes before selecting Close command button in Result Window).
    Is this happening due to memory constraint ? ( I am aware that for OWB recommended RAM is around 256 MB.).
    Just to add more i am experiencing this only for one specific mapping.
    Thanks in Advance.
    Regards,
    Vidyanand

    Hi,
    The error while I was getting earlier was solved. I have placed the schema as "target.<tablename>" in the table operator counfiguration while configuring the mapping.
    But now I am getting the error
    SQL*Loader-350: Syntax error at line 22.
    Expecting "(", found ".".
    INTO TABLE "target.custfile_target"."CUSTFILE_TARGET".
    Please suggest on how to proceed now as i am not able to find how and where i can correct such syntax error in OWB.
    Regards.

  • How to use Flat files as targets

    The root path of location LOC_FLAT_TGT must be specified as one of the file paths for the UTL_FILE_DIR parameter in the init.ora for the runtime instance. The root path of location LOC_FLAT_TGT must be a file path on the server.
    Thanks in Advance,
    Jash

    Hi,
    This is basically saying, either use the value of UTL_FILE_DIR of the runtime instance while registering your Target File Location
    OR
    ask your DBAs to change the UTL_FILE_DIR to the directory path where you want to place your files..........
    HTH
    Mahesh

  • OWB FLAT FILE MAPPING NOT ABLE TO DEPLOY

    Hi,
    I've recently started studying data warehousing and exploring the Datawarehouse builder version 3i.
    I've created a simple mapping from a csv file to database table ie my source is a flat file and target is a database table. The mapping gets validated successfully and the ctl scrip also gets generated. But the 'Deploy' and "Run' buttons on the "Transformations" tab of the "Generation Results" window are displabled(greyed out) and hence I cannot deploy the generated script.
    Please do suggest the cause and solution for the same.
    Regards,
    Barkha

    Many Thanks to Winfred Deering from Oracle who replied:
    "This is the expected behavior for flat file mappings. You can register the tcl script with Oracle Enterprise Manager and run it from there. Also you can save the control file and execute via sql loader. "
    Thanks and Regards,
    Barkha

  • Problem Experts OWB 10gR2 - Mapping with OMB - Give a name to the flat file

    I'm trying to create a mapping in OWB by using the Experts (OMB),
    where the data source is a database table and the target is a flat file (to transform a table to a flat file).
    The tasks of my Experts :
    This task create a mapping, and add a existing table on it.
         OMBCC '$thepath'
         catch {OMBDROP MAPPING 'M1'}
         OMBCREATE MAPPING 'M1'
         OMBALTER MAPPING 'M1' \
         ADD $INITIAL_LAUNCH_CONTEXT_TYPE OPERATOR '$thetable' \
         BOUND TO $INITIAL_LAUNCH_CONTEXT_TYPE \ '$INITIAL_LAUNCH_CONTEXT' \
    This task change the context and create a flat file
         OMBCC '/PRJ_LABO_PHARMA/SRC_FILE'
         catch {OMBDROP FLAT_FILE 'NEW_FILE'}
         OMBCREATE FLAT_FILE 'NEW_FILE' \
         SET PROPERTIES (DATA_FILE_NAME) VALUES('fichier_genere.txt')
    This task add the flat file to the mapping, and create a connection between the source (table) and the target (flat file)
         OMBCC '/PRJ_LABO_PHARMA/MOD_SRC_LABO'
         OMBALTER MAPPING 'M1' \
         ADD FLAT_FILE OPERATOR 'NEW_FILE'\
         BOUND TO FLAT_FILE '/PRJ_LABO_PHARMA/SRC_FILE/NEW_FILE' \
         OMBALTER MAPPING 'M1' \
         ADD CONNECTION FROM GROUP 'INOUTGRP1' OF OPERATOR '$thetable' \
         TO GROUP 'NEW_FILE' OF OPERATOR 'NEW_FILE' COPY ALL
    This task update the flat file structure
         OMBRECONCILE MAPPING 'M1' OPERATOR 'NEW_FILE' \
         TO FLAT_FILE '/PRJ_LABO_PHARMA/SRC_FILE/NEW_FILE' \
         USE (RECONCILE_STRATEGY 'REPLACE', MATCHING_STRATEGY 'MATCH_BY_OBJECT_ID')
    Then I have a task which execute this mapping.
    Everything is good, but during the execution I have a error VLD-2357 : The target file's name is not indicated for the file NEW_FILE.
    I don't know how to give a name to the flat file in OMB.
    Help me please.
    Best regards
    Samy

    Just like if you built this in the UI where you would have to configure the flat file operator and define a target data file name and possibly the location these properties should be set in scripting.
    Set the property TARGET_DATA_FILE_NAME to the name of the data file.
    Something like....
    OMBALTER MAPPING 'M1' \
    MODIFY FLAT_FILE OPERATOR 'NEW_FILE' SET PROPERTIES (TARGET_DATA_FILE_NAME) VALUES ('my_datafile.csv')
    Cheers
    David

  • Flat file as source and target in owb-error

    hi,
    I want to run an interface with source as flat file and target as rdbms table.
    The mapping got deployed with warnings.
    And when i run the mapping i get the below error.
    ORA-04063: package body "Schema.project_name" has errors
    ORA-06508: PL/SQL: could not find program unit being called: "schema.project_name"
    ORA-06512: at line 1

    Hi
    There's nothing wrong with your theory, however you might get a DB lock depending on the locking strategy of your RDBMS and it's current configuration.
    Now, assuming that DB locking is your issue (get a DBA to check when the dataflow stalls), there are 2 solutions. 
    1, change the DB lock settings
    2, take a copy of the target table in a new dataflow and use that as the source in the orginal dataflow.
    Michael

  • SQL Server Source and Flat File Target in OWB

    Hello All,
    I have a question, is it possible to have SQL Server as Source and Flat File as Target without using any intermediate Oracle table(s).
    like
    SQL Server --> ETL Operators --> Flat file?
    as i m getting errors in data type conversions here. but if i replace flat file with Oracle table it works fine. (though i have used some conversion functions for data types as well in Flat file loading but it is giving me errors)
    Thanks in advance.
    Tayyeb

    Yes this should be fine. Are you using the gateway to access SQLServer or code template mappings? You need to track which columns are throwing the data type conversion errors.
    Cheers
    David

  • Mapping with both source and destination as flat files???

    hi I have two two flat files(large data) for example A and B.
    let us say
    A has records of format( characteres of size(5) , numbers of size(6) , characteres of size(5) )
    B has records of format( characteres of size(5) , numbers of size(6) )
    i have to map these flat files so that rocords with numbers in both files should be added where the records of characters in both files are same) and output a flat file C .
    i.e
    A(aaaaa111111bbbbb222222ccccc111111
    bbbbb111111fffff666666ddddd333333)
    B (aaaaa222222)
    output should be(aaaaa333333)
    i have created the flat file module and could able to sample A and B .
    I have also created an external table based on A and B.but the data is not been showed ih the external table.How to map this.
    Pls guide me.
    srry for being long here.
    Thanks 4 ur time.

    Sounds like your datatypes/settings are incorrect.
    To process a file (let's call it stuff.txt) with fixed length records such as the following...
    aaaaa111111bbbbb222222ccccc111111bbbbb111111fffff666666ddddd
    Here is an example tcl script. There are some variables you have to setup for the flat file module, the oracle module, the File location and project name all of which should exist before running. It will create the flat file, external table, a simple mapping from external table to flat file defined by tcl variable target_file (in same directory as the LOC_SRC_FILES, you can change this..its just for demo purposes and will write a comma separated file). Hopefully this will get you up and going with your problem...
    # Create the modules etc and set the values below, then run
    set project MY_PROJECT
    set ff_module FF
    set ff_location LOC_SRC_FILES
    set ora_module MM
    set target_file my_target_file
    OMBCC '/$OMB_CURRENT_PROJECT'
    OMBDCC
    OMBCC '$ff_module'
    OMBCREATE FLAT_FILE 'FSTUFF' SET PROPERTIES (DATA_FILE_NAME,IS_DELIMITED, RECORD_LENGTH) VALUES ('stuff.txt',0, '16') ADD RECORD 'FSTUFF'
    OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDA' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('CHAR',1,5,5)
    OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDB' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('DECIMAL EXTERNAL',6,11,6)
    OMBALTER FLAT_FILE 'FSTUFF' MODIFY RECORD 'FSTUFF' ADD FIELD 'FIELDC' SET PROPERTIES (DATATYPE,START_POSITION,END_POSITION,MAXIMUM_LENGTH) VALUES ('CHAR',12,16,5)
    OMBCC '../$ora_module'
    OMBCREATE EXTERNAL_TABLE 'FSTUFF_EXT' SET PROPERTIES(LOAD_NULLS_WHEN_MISSING_VALUES,TRIM) VALUES (1, 'RIGHT') SET REFERENCE RECORD 'FSTUFF' OF FLAT_FILE '../$ff_module/FSTUFF' DEFAULT_LOCATION '$ff_location'
    OMBCREATE MAPPING 'FILE_TO_FILE'
    OMBALTER MAPPING 'FILE_TO_FILE' ADD EXTERNAL_TABLE OPERATOR 'SOURCE_STUFF' BOUND TO EXTERNAL_TABLE 'FSTUFF_EXT'
    OMBALTER MAPPING 'FILE_TO_FILE' ADD FLAT_FILE OPERATOR 'TARGET_FILE'
    OMBALTER MAPPING 'FILE_TO_FILE' ADD CONNECTION FROM GROUP 'OUTGRP1' OF OPERATOR 'SOURCE_STUFF' TO GROUP 'INOUTGRP1' OF OPERATOR 'TARGET_FILE'
    OMBALTER MAPPING 'FILE_TO_FILE' SET PROPERTIES (GENERATION_LANGUAGE) VALUES ('PLSQL')
    OMBALTER MAPPING 'FILE_TO_FILE' MODIFY OPERATOR 'TARGET_FILE' SET PROPERTIES (TARGET_DATA_FILE_NAME) VALUES ('$target_file')
    OMBALTER MAPPING 'FILE_TO_FILE' MODIFY OPERATOR 'TARGET_FILE' SET PROPERTIES (TARGET_DATA_FILE_LOCATION) VALUES ('$ff_location')
    You can do all this in the UI, just thought it would be useful as a script for you.
    Cheers
    David

Maybe you are looking for