Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Parsing a file in ODI

656730Aug 26 2008 — edited Aug 26 2008
Hello all,

I am trying to read a value from a file and store it in a variable in ODI. The file is a flat file with a single value in the following format

*2007-12-29*

What I would like to do is store that value as '20071229' in a variable. What I have done is create a file datastore in ODI that points to my file.

I have tried creating a variable and entering this in the 'refresh' tab

SELECT NEXT_DT FROM DONE_FILE (where NEXT_DT is what I called the column in my datastore, and DONE_FILE is the name of the datastore). The logical schema is also selected correctly and it points to the right physical scheme. The error I am getting is

"Error while executing query
Invalid format description"

So how can I remove the hyphens from this value and store it in a variable?

Your help is much appreciated.

Comments

Gary Graham-Oracle

I have not tested specifically on Linux, but it should behave the same as on Windows.  Basically...

0.  You must have a Java 8 JRE (public, standalone) or JDK installed.

1.  If PATH environment variable points to an Oracle client, SQLcl should automatically connect with OCI/Thick driver

2.  If not, then SQLcl connects with Thin driver.

Once connected, you can verify the connection type by running...

show connection

which will display something like...

CONNECTION

HR@jdbc:oracle:oci8:@ADC122PB

or...

CONNECTION:

HR@jdbc:oracle:thin:@(DESCRIPTION =    (ADDRESS_LIST =      (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.mycompany.com)(PORT = 1521))    )    (CONNECT_DATA =

   (SERVICE_NAME = orcl.mycompany.com)    )  )

If it does not work on Linux as I describe above, then you can try passing the -oci flag when invoking SQLcl.

1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 23 2008
Added on Aug 26 2008
1 comment
488 views