calculation of values in sqlloader before loading the data.

Is it possible in the control sqlloader file to calculate the values in a particular field and then transfer the data to a table.

for example. If I have a, b, c, d, e, f in csv files.

e field value is based on if a is null or = 0 then b, if c is null or = 0 then d
and finally e = b | » -'c

Yes. You can use the SQL functions in your control as a GARNISH file in the example below. You could solve your problem by using NVL I think...

LOAD DATA

INFILE 'city.txt'
APPEND
INTO TABLE CITYOR_TOWN

(
 COTN_NAM             POSITION(7:34) "TRIM(:COTN_NAM)",
 COTN_CITYCODE      POSITION(1:6),
 COTN_ID                SEQUENCE (COUNT,1),
 COTN_STT           POSITION(35:36),
 COTN_CNTY          POSITION(37:39),
...
 FROM_DATE POSITION(84:91) DATE "YYYYMMDD" "replace(:MED_FROM_DATE,'00000000',null)",
 H_AVGESTAY           POSITION(19:21) ":H_AVGESTAY/10",
 CLTYPE      CONSTANT "RXTZASCode",
...
)

Published by: Zoltan Kecskemethy on May 27, 2013 17:24

Tags: Database

Similar Questions

  • How do I load the data calculated in HFM

    Hi gurus

    1. how to load the data calculated in HFM?

    I extracted the calculated data and when I tried to load the data calculated in HFM is partially responsible, showing the errors you can not load data for parent members of the account, Custom personalized 1 4...
    Then I ran the consolidation to get the values of the parent company.
    Is there an alternative way to load the data calculated in HFM?

    Concerning
    Hubin

    Hi Hubin,

    Calculated data cannot be loaded in HFM manually, these accounts with calculated field data should be generated through the logic of the computation.

    And parent members also don't take the data they are parents for the sum of some basic level accounts.

    So just load the data for basic level accounts and make sure they are consolidated accounts of field, that there was no error and calculated accounts data automatically generates through the logic written in the Rules file.

    And after loading data just run the consolidation and sink also rules file in both cases to the work of the logic of the computation.

    Kind regards
    Srikanth

  • How to send the page before loading the page header?

    Hello

    Is it possible to send the page before loading the page header. Because I have a sql report in the homepage itself that needs to be exported to excel.when, loading the page, the page elements will be set to NULL in the session that causes the output export empty.

    Appreciate the help,
    IDEOGRAM

    Hello

    Use according to the calculations of the header for these items.
    It should work

    BR, Jari

  • Loading the data into the ASO cube

    Hello

    Is it possible to load data to a member in the structure where there is a related formula?

    For example:

    Account - interest paid:

    Budget must be charged to members
    Real must be a calculated field

    I tried something like:

    CASE
    WHEN [scenario]. CurrentMember IS [real] THEN-[finance costs (IFRS)]
    END

    but it does not work?

    Is this possible?

    Thank you

    Hello

    ASO, you cannot load data to a member who has a formula attached to it. One option is to have 3 accounts, 2 accounts system and an original. Load data for accounting system: VAC - Bud and VAC - law and then to set a formula to the original account to get the values of 2 accouts of system based on the scenario.

    Let me know if it helps.

    However, you can do it in ASF, loading the data to the Budget and have a calculation script calculate the value of actual expenditures to the Member of the account.

    See you soon
    RS

  • Problem loading the data in the table

    Hi friends,

    I'm using ODI 11 g.
    I'm doing a flat file for the Table mapping. I have 10 records in the flat file when loading the data in an Oracle table, I can see only 1 card is loaded.
    I use IKM SQL add and control using separate option.

    Can you please let me know where exactly the problem.

    Thank you
    Lony

    Hi Lony,

    Please let us know other KM by in your ODI interface.
    Please check in the flat file, column PK have same value or it idifferent?
    Please check if the header is present in your flat file.
    When you load the file in the table of the model > right click on the table (flat file adding that model table) and click Show data and see all 10 records are you able to see at ODI level

    Kind regards
    Phanikanth

  • Load the data from a text file into a table using pl/sql

    Hi Experts,

    I want to load the data from a text file (sample1.txt) to a table using pl/sql

    I used the pl/sql code below

    ***********************************
    declare
    f utl_file.file_type;
    s varchar2 (200);
    c number: = 0;
    Start
    f: = utl_file.fopen('TRY','sample1.txt','R');
    loop
    UTL_FILE.get_line (f, s);
    insert into sampletable (a, b, c) values (s, s, s);
    c: = c + 1;
    end loop;
    exception
    When NO_DATA_FOUND then
    UTL_FILE.fclose (f);
    dbms_output.put_line('No. deles de lignes insérées: ' || c);
    end;

    ***************************************

    and my sample1.txt file looks like

    ***************************************
    1
    2
    3
    ***************************************

    Gets the data inserted, with way below

    Select * from sampletable;

    A, B AND C

    1-1-1
    2-2-2
    3 3 3

    I want that data to get inserted as

    A, B AND C

    1 2 3

    The text file I have is to have three lines, and the first value of each line should go to each column

    Help, please...

    Thank you
    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;
    

    SY.

  • Loading the data into Essbase (add the crash)

    Hello

    We are loading data from oracle to target Essbase cube table. How to manage ODI loading data to add to rather than replace the last value?

    Ex: We have the data source with the mapping of M:1, so we court statement case [case when the Group has, B, C and D] is there a setting in ODI who allows to add (add) instead of overwrite data?

    Currently, the value of data in C is loaded into D instead of A + B + C in D.


    Thank you.

    You can put the CASE WHEN, in the mapping target and continue to use a rule to load a load rule has nothing to do with what you are doing in target mappings.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Loading the data into the planning

    I'm a little confused how loading data in the planning of the work of the application. I have created the new application of planning with the Application Wizard, created the database, etc.. Then, after documentation (the administrator Planning Guide), I loaded the metadata using contour loading utility (OutlineLoad). Now I want to load the data. Following a few steps from ducumentation I add DIRECT_DATA_LOAD = False parameter (there is no front) and the DATA_LOAD_FILE_PATH parameter points to a directory on the server (I tried creating the empty file and DATA_LOAD_FILE_PATH the value piont this file). After saving configuration and restart the schedule I used Adminsitation to load data to choose the size of data loading, Driver-Dimension, I recorded it and then... no new files in the DATA_LOAD_FILE_PATH catalog has been created. What I am doing wrong?

    EPM 11.1.1.1.0 on Windows 2003 Server EE

    Hello

    Let me give you an example of loading data from the sample application planning.

    Dimensions
    Account, currency, entity, period, scenario, Version, year, Segments

    Loading data Dimension = account

    Driver dimension = scenario

    Selected member real =

    The format of the csv file is

    Account, Point of view, data load Cube real name
    330000, "USD, Jan, E05 NoSegment, work, AFA 08 ', Consol, 1000

    I hope that gives you an idea?

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Create a script to update, to deploy, to load the data with the version 9.3.1

    Hello

    I would like to know if it is possible to run a script to run:

    -Dimensions profile (by EPMA) import
    -deploy an application (by EPMA)
    -load rule to load the data (by essbase)
    -Calculation (by essbase) script

    We use version 9.3.1

    Thanks in advance.

    Roby

    Hello

    I don't think it doesn't matter which feature of command batch for EPMA up to version 11.
    It is possible, you can try creating a regular taskflow in EPMA to import a dimension and then reploy, finally you could run a batch script that contains a maxl script to load and calculate essbase data.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Generic procedure to load the data from the source to the table target

    Hi all

    I want to create a generic procedure to load data of X number of the source table to X number of the target table.

    such as:

    Source1-> Target1

    Source2-> Target2

    -> Target3 Source3

    Each target table has the same structure as the source table.

    The indexes are same as well. Constraint are not predefined in the source or target tables.there is no involved in loading the data from the business logic.

    It would simply add.

    This procedure will be scheduled during off hours and probably only once in a month.

    I created a procedure that does this, and not like:

    (1) make a contribution to the procedure as Source and target table.

    (2) find the index in the target table.

    (3) get the metadata of the target table indexes and pick up.

    (4) delete the index above.

    (5) load the data from the source to the target (Append).

    (6) Re-create the indexes on the target table by using the collection of meta data.

    (7) delete the records in the source table.

    sample proc as: (logging of errors is missing)

    CREATE or REPLACE PROCEDURE PP_LOAD_SOURCE_TARGET (p_source_table IN VARCHAR2,

    p_target_table IN VARCHAR2)

    IS

    V_varchar_tbl. ARRAY TYPE IS VARCHAR2 (32);

    l_varchar_tbl v_varchar_tbl;

    TYPE v_clob_tbl_ind IS TABLE OF VARCHAR2 (32767) INDEX OF PLS_INTEGER;

    l_clob_tbl_ind v_clob_tbl_ind;

    g_owner CONSTANT VARCHAR2 (10): = 'STG '.

    CONSTANT VARCHAR2 G_OBJECT (6): = 'INDEX ';

    BEGIN

    SELECT DISTINCT INDEX_NAME BULK COLLECT

    IN l_varchar_tbl

    OF ALL_INDEXES

    WHERE table_name = p_target_table

    AND the OWNER = g_owner;

    FOR k IN l_varchar_tbl. FIRST... l_varchar_tbl. LAST LOOP

    SELECT DBMS_METADATA. GET_DDL (g_object,

    l_varchar_tbl (k),

    g_owner)

    IN l_clob_tbl_ind (k)

    FROM DUAL;

    END LOOP;

    BECAUSE me IN l_varchar_tbl. FIRST... l_varchar_tbl. LAST LOOP

    RUN IMMEDIATELY "DROP INDEX ' |" l_varchar_tbl (i);

    DBMS_OUTPUT. PUT_LINE (' INDEXED DROPED AS :'|| l_varchar_tbl (i));

    END LOOP;

    RUN IMMEDIATELY ' INSERT / * + APPEND * / INTO ' | p_target_table |

    ' SELECT * FROM ' | '. p_source_table;

    COMMIT;

    FOR s IN l_clob_tbl_ind. FIRST... l_clob_tbl_ind LAST LOOP.

    EXECUTE IMMEDIATE l_clob_tbl_ind (s);

    END LOOP;

    RUN IMMEDIATELY 'TRUNCATE TABLE ' | p_source_table;

    END PP_LOAD_SOURCE_TARGET;

    I want to know:

    1 has anyone put up a similar solution if yes what kind of challenges have to face.

    2. it is a good approach.

    3. How can I minimize the failure of the data load.

    Why not just

    create table to check-in as

    Select "SOURCE1" source, targets "TARGET1", 'Y' union flag double all the

    Select "SOURCE2', 'TARGET2', 'Y' in all the double union

    Select "SOURCE3', 'Target3', 'Y' in all the double union

    Select "SOURCE4', 'TARGET4', 'Y' in all the double union

    Select 'Source.5', 'TARGET5', 'Y' in double

    SOURCE TARGET FLAG
    SOURCE1 TARGET1 THERE
    SOURCE2 TARGET2 THERE
    SOURCE3 TARGET3 THERE
    SOURCE4 TARGET4 THERE
    SOURCE.5 TARGET5 THERE

    declare

    the_command varchar2 (1000);

    Start

    for r in (select source, target of the archiving of the pavilion where = 'Y')

    loop

    the_command: = "insert / * + append * / into ' |" r.Target | ' Select * from ' | '. r.source;

    dbms_output.put_line (the_command);

    -execution immediate the_command;

    the_command: = 'truncate table ' | r.source | "drop storage."

    dbms_output.put_line (the_command);

    -execution immediate the_command;

    dbms_output.put_line(r.source ||) 'table transformed');

    end loop;

    end;

    Insert / * + append * / into select destination1 * source1

    truncate table SOURCE1 drop storage

    Treated SOURCE1 table

    Insert / * + append * / to select TARGET2 * in SOURCE2

    truncate table SOURCE2 drop storage

    Treated SOURCE2 table

    Insert / * + append * / into select target3 * of SOURCE3

    truncate table SOURCE3 drop storage

    Treated SOURCE3 table

    Insert / * + append * / into TARGET4 select * from SOURCE4

    truncate table SOURCE4 drop storage

    Table treated SOURCE4

    Insert / * + append * / into TARGET5 select * from source.5

    truncate table source.5 drop storage

    Treated source.5 table

    Concerning

    Etbin

  • Automation of loading the data of single application FDM for different applications

    Friends, my query is somewhat complex. I have 6 (two in Hyperion Planning, two HPCM) and two in Hyperion Essbase applications. I copied the adapter in the Workbench and renamed accordingly to load the data for each of them. Now the problem is I want to automate the data load for each of these requests, but don't know how it's done. Through many forums to get a better understanding but no luck!

    A humble request to all the FDQM experts for their valuable advice on how to realize the automation of all the tools in one application of FDM.

    Thanks in advance!

    You would automate this process via the Batch Loader integrated with FDM. The process to use this is exactly the same as you have one or more target applications. The ultimate target application is based on the name of the place incorporated into the batch processing file naming convention. Each of your adapters different target will be associated with one or more locations in your configuration of metadata location FDM.

  • API to load the data of Group of people

    Hello

    Can someone give me the API for loading the data of Group of people, in Oracle Payroll?

    Thank you
    George

    Hello

    You can update the api group of people by HR_ASSIGNMENT_API.update_emp_asg_criteria data,

  • Load the data from txt

    Hello

    I just export the data in my cube, he geneates two text because of this file is more than 2 GB in size, one is xxxxx.txt, another is xxxxx_1.txt.

    My question is that if I load the data file above in the same cube, I should just specify the first file xxxxx.txt? It seems that I can't specify both text files?

    Thank you

    you only need to load the second file
    Or
    clear data and load the two

    Your choice, you will get the same results.

  • Loading the data into Essbase is slow

    Loading the data into Essbase is slow.
    Loading speed of 10 seconds on a record.

    It is used standard KM.

    How it is possible to optimize the loading of data into Essbase?

    Thank you

    --
    Gelo

    Just for you say the patch was released

    ORACLE DATA INTEGRATOR 10.1.3.5.2_02 UNIQUE PATCH

    Patch ID - 8785893

    8589752: IKM SQL data Essbase - loading bulk instead of rank by rank treatment mode when an error occurs during the loading

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Is mapping dimension AWM - possible to load the data in two tables of entry?

    Hi all

    I have two tables ProductFamily (parent level) and products (child level).

    I want to load a dimension of those tables where the parent-child relationships are maintained (I use AWM).

    I created a map with these two entry tables, but the loaded data has no relationship.
    So, how do I do that? Is it possible to load dimensions where different levels get data from multiple tables?
    Is any type of Carpenter available in AWM?

    Thank you

    ------------------------

    A few Notes:

    -I don't want to use OWB here that my data are clean
    -In AWM, when I loaded the data in a single view that contains two tables of input data, it worked fine. But it's my worst case option.

    You must use Dimension option in snowflake in the mapping screen of size for the Product Dimension (as opposed to the default style mapping - star schema dimension).

    This will modify map entries to include a separate parent for each level of hierarchy level / that is to say, for each level of hierarchy / (unless a higher level of the hierarchy), you must specify the parent level key in addition to the key current level, code/name/description/other attributes etc.

    You can make the mapping or... use the icons at the top of the map screen.
    mode drag/drop by dragging the relational column on dimension - level/hierarchy/attribute model
    -or-
    the table expression mapping mode that gives the same effect... by dragging a column on an attribute defined in the .

    . the format of .

    HTH
    Shankar

    Note1: Complete the mapping of a sudden... B & w switching mapping modes cause the mappings to reset.
    NOTE2: assumes that your data are correct foreign key table parent level: ProductFamily exists in the child level table: products.

Maybe you are looking for