Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.6K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
ODI12c parsing data file name and storing in target
Answers
-
I have one more question,
If you don't know the file name, how are you passing in to the datastore?
Regards,
Pavan
-
I know that filename that I am prototyping with, but I will not know it when this is up and running in production.
Regards,
Deena
-
Now you came to the point
Create a temporary table say file_name_tbl, use above blog and write file name into that temporary table.
Use variable in refresh mode and read the file name into that variable from temporary table file_name_tbl
Any way you are already using variable in datastore.
Regards,
Pavan
-
Thanks.
I am not a java developer.
I created a procedure in ODI (below). When i run the proc scenario I get the value /dw/data/dev/datain/File added to my table. I was expecting to get the name of the first file with the /dw/data/dev/datain directory.
-
Hi,
Indeed, the script inserts the full path and file name. Using Oracle SQL you can extract file name. So replace last line in your script with:
INSERT INTO URDW.ODI_GETFILENAME
select substr( '<@[email protected]>' , instr('<@[email protected]>','/',-1,1) +1) from dual
I have tested and it works. Script extract all the characters from last "/" to the end of the path - which is file name.
Hope this helps,
Adrian
-
thank you
-
Hi,
Please let us know if the workaround I have suggested works.
Adrian
-
Adrian,
Thank you for your help. It makes sense your suggestion and I will hold onto it for safe keeping.
I realized after speaking with our lead that I was trying to resolve an issue that in fact we will not have! We will actually be fed the
pertinent info for the filename and will be able to put it into a variable to use when running our package.
I will hold onto your script however.. you never know what we will need to address down the road.
Regards,
Deena