Current Position:Home > How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g

How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g

Update:10-11Source: network consolidation
Advertisement
Hi ALL,
Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way .
For example :
file name is :subscribers (Cost) Sep13.csv is specified in the below path
  E:\Accounting\documents\subscribers (Cost) Sep13.csv
here I need to fetch the "Sep13" as a Date column in the ODI 11g in the generalized way.
Can any one help us in this case as early as possible.

The Best Answer

Advertisement
I would suggest using a piece of Jython code for this.  Something like this...
import os
import os.path
filelist  = os.listdir(E:\Accounting\documents\)
for file in filelist:
datestr = file[19:-4]
You'd need to work out what to do with datestr next...  perhaps write it to a table or update an ODI variable with it.
Hope this is of some help.
  • How to fetch the Date column(or Month column) from the file name from the specified path in ODI 11g Update:10-11

    Hi ALL, Can any one help us regarding How to fecth the Date column(or month column) from the file name specified in the path in a generalized way . For example : file name is :subscribers (Cost) Sep13.csv is specified in the below path   E:\Accountin

  • User Profile Data for One Month in ST03N Update:11-30

    Dear All, I have one question for a similar requirement. I want to see the User Profile data for last month (e.g.August) I navigate through the same path as described by you. ST03N- Expert Mode- Total (select period)-- User Profile (from analysis vie

  • Help:Using Order by for a date column fetching wrong results Update:11-30

    Hi all, In my table I am having a date column which is having values 13/06/2007 09:24:00 31/05/2007 10:30:00 I am selecting this column with some other columns using order by at the end by giving the date column. But I am getting rows in reverse orde

  • How to get Week,Month and Year details from a date column Update:10-11

    Hi frenz, I've a column like tran_date which is a date column..... I need the next week details based on this column and so on... I need month and year details as well based on this tran_date column.... can any one tell me how... Thanks in advanceMy

  • What is the best way to dynamically create table partition by year and month based on a date column? Update:10-11

    Hi, I have a huge table and it will keep growing. I have a date column in this table and thought of partition the table by year and month. Can any you suggest better approach so that partition will create automatically for new data also along with th

  • Achieving chronological sort on a date column with month function Update:11-30

    Hello all , I have a a date column(start_date) on which I applied 'MONTHNAME' function to extract the month name out of the date . i.e. 4/24/2013 will return 'Apr' . While trying to achieve a sort on this , its returning alphabetical sorting , i.e. a

  • How to drill date (column )into month in xcelsius Update:11-30

    Hi, I am fresher to Xcelsius. I need to know how to drill the date column into month, then further drilling down month to day. I have 2 columns Date                       Revenue 1/1/2010                 452553 2/2/2011                  97992 3/5/201

  • IW69 report not fetching all transaction data of current month. Update:10-11

    Dear Guru Ji, While doing testing IW69 report, i noticed that it is not displaying current month data. It is only get the data uptil last date of past month data in DEV & QA client. I wonder why this is happening? I tried using Malfunction start date

  • Last/latest 10 months data ( including current month) Update:11-30

    Hi,   I need to find the last/latest 10 months data ( including current month) Year 1/1/2014 1/2/2014 1/3/2014 1/4/2014 1/5/2014 1/6/2014 1/7/2014 1/8/2014 1/9/2014 1/10/2014 1/11/2014 1/12/2014 1/1/2013 1/2/2013 1/3/2012 1/4/2012Hi, this is my data 

  • Using MODEL clause and COUNT for not numeric data columns.... Update:10-11

    Hi , Is it possible somehow to use the COUNT function to transform a non-numeric data column to a numeric data value (a counter) and be used in a MODEL clause....???? For example , i tried the following in the emp table of SCOTT dataschema with no de