Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
Parsing a file in ODI

656730
Member Posts: 8
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.
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.
Answers
-
Hi,
You can't do query in a FILE techno rather you can do a case statement in the mapping at interface level. For example,
case
when <column_name> ='2007-12-29' then '20071229'
else <column_name>
end
Thanks,
G
This discussion has been closed.