0

I want to read data from a .txt file in ODI and when mapping the source table to the target, add a date column representing the current date. Do you have any suggestion how I can do that?

1 Answer 1

1

I don't use ODI so this might be complete nonsense; however, see if it helps.

I presume that target table is the final destination of data loaded from the TXT file. If that's so, then - if you create date column whose default value is sysdate, then this might suite your needs. Here's an example:

SQL> create table target
  2    (id         number generated always as identity,
  3     name       varchar2(10),
  4     salary     number,
  5     load_date  date default sysdate          --> this
  6    );

Table created.

Let's simulate loading process; I'm inserting only columns that don't have pre-defined value:

SQL> insert into target (name, salary) values ('Little', 100);

1 row created.

What is table contents?

SQL> select * from target;

        ID NAME           SALARY LOAD_DATE
---------- ---------- ---------- -------------------
         1 Little            100 05.05.2024 11:20:29
                                 -------------------
                                 value you're interested in 
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.