File Count after ODIFileWait

Hello,
I have a package with ODIFileWait as the first step polling for new files and i wanted to find out number of records in this file and store it into database for audit process..The only option i know is store all records into a temp table and do a count on that but i think it is not a good idea...would appreciate your inputs/ideas on this.
Thanks/Steve

If you have a UNIX system holding that file then you can use a shell command to get no of records and store it into the audit table. Assuming Oracle and UNIX here is a sample command:
sqlplus user/pwd@sid <<EOD
insert into audit_table(column_count) values (`wc -l $filename`);
commit;
EOD
You can also make the table as an external table and do a count. Using a T-SQL or PL/SQL procedure that can interact with OS filesystem and read files is a good idea too but that is not an ODI solution.
Otherwise database is your best bet. If you have a constant file name, then you can also create a dummy interface using that file as a source, use a file to SQL LKM and then when you run it, the LKM would produce a SQL like syntax that can read from file directly. Then you can use the same in a procedure to write to tables directly. But do not try this if you are not sure what you are doing. If you can implement the first solution then that would be the fastest.

Similar Messages

  • File Adapter - how to get the file count from a folder

    Hi All,
    I have a requirement that have to poll a directory when the file count is reached to number N (ex:number of files avilable in folder is 5) otherwise it should wait and not pick any of the files. Is it possible to get the file count from a folder using file adapter ?? otherwise please suggest me an approach to achieve this requirement.
    Thanks,
    JJ

    Hi Sarath,
    Thank you for your reply.
    Go with the list files operation of file adapter it will gives you the number of files in the specified folder as you given. . - this step is already done.
    When the number of files reaches your count startup your webservice that which can polls the files. . . - how can i acheive this?? Have to poll the directory and process the number files - please let me know, what could be added to the webservice which is being invoked after cheking file count from parent process.
    The reason for the above question is - we cannot use ReadFile operation in second webservice because it will be automatically triggered when the file is avilable. Also SyncRead operation supports reading one file in b/w bpel process. Kindly explain me the implementation steps.
    Thanks,
    JJ

  • Rename file in file adapter after processing

    Hi All,
    My requirement is, i need to rename the file in receiver file adapter after the file is written to the folder. and this file should have a counter attached to its name. For eg. If i had a file created with name Material, i want to change it to Order001, Order002, Order003.... so on and counter should reset after 999. how can i achecive it?
    thanks a lot in advance.
    Regards,
    Rashmi
    Edited by: Rashmi H S on Jul 15, 2009 12:15 PM

    Hi Rshmi,
    use this UDF i hope it will work fine,
    DynamicConfiguration conf = (DynamicConfiguration) container
         .getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File", "FileName");
    String a=conf.get(key);
    int inc = 1;
    Integer seqNo = (Integer) container.getParameter("seqNo");
    if(seqNo == null || seqNo ==999){
                                seqNo = new Integer(inc);
    else{
                               int num = seqNo.intValue() + inc;
                               seqNo = new Integer(num);
    container.setParameter("seqNo", seqNo);
    return var1+seqNo.toString();
    Regards,
    Raj

  • Reoccuring errors with volume file count, directory count, etc...

    I'll give a little back story...
    I purchased a new MacBook Pro 17" with OS X Lion (10.7.2) preinstalled back in January of this year (2012).  I migrated my user accounts from my old MacBook Pro 15" (2008) running OS X Snow Leopard.  Almost right away I started having issues of all sorts, including Admin accounts that wouldn't allow me admin priveledges, hidden user groups, apps that wouldn't run, multiple obscure error messages and a host of other issues.  After scouring forums like this one I used Disk Utility and not only discovered innumerable permission errors but also disk errors like these:
    Invalid volume file count
    (It should be 1656658 instead of 1656636)
    Invalid volume directory count
    (It should be 345764 instead of 345743)
    Invalid volume free block count
    (It should be 69344839 instead of 69355225)
    Volume header needs minor repair
    Disk Repair would correct the ACH/permission errors and above-noted disk corruption, but only temporarily.  After repairs I would reboot and be met with all of the same problems in the migrated accounts.  Over the following days I reinstalled OS X Lion at least three or four times, completely wiping the 750 GB hard drive before two of those reinstalls (even doing one-pass reformatting on one of those instances).  After reinstalling the OS, I would reinstall from TimeMachine and be met with all of the same problems again.
    I then brought my machine in to the Genius Bar where, after more than two-and-a-half hours they declared it to be an unknown issue that must be related to defective hardware and replaced my entire machine.  But wait - there's more!
    After getting home and moving my old accounts back over from TimeMachine all the same issues began reoccuring.  After at least two more OS reinstalls later I discovered that uninstalling Norton Internet Security seemed to fix some problems.  However, running Disk Utility still returned results like those listed above...
    Then there were the failed attempts at upgrading from 10.7.2 to 10.7.3 which  hung at the end the first two times and required complete OS reinstalls from the Recovery HD.  Several more headaches later I eventually I managed a sucessful upgrade.
    But still I find myself with a machine that stalls on boot-up at least once or twice a week, necessitating a power-off to interupt the process.  After each of these instances I run Disk Utility and get more of the same...
    Checking volume information.
    Invalid volume file count
    (It should be 1656658 instead of 1656636)
    Invalid volume directory count
    (It should be 345764 instead of 345743)
    Invalid volume free block count
    (It should be 69344839 instead of 69355225)
    Volume header needs minor repair
    The volume [...] was found corrupt and needs to be repaired.
    And now, this morning, after a month or two of all that... and after installing the Java Security Upgrade last night, I can't get into my accounts at all.  On first boot-up it hung for 20 minutes before I shut it down.  After running Disk Utility from Recovery Drive and repairing the drive I rebooted and got the log-in screen.  I clicked on my user icon, typed the correct password, was shown they white/grey screen for a few flickering seconds then was brought back to the log-in screen.  I rebooted to the Recovery Disk, ran Disk Utility, saw all the same errors again, repaired the disk, rebooted and got the same problems with logging in again.
    I've repeated this cycle five times today, as both a normal boot-up and in "Safe Mode" all with the same results.  I've repaired the disk using Disk Utility from Recovery Disk as well as accessing the disk in Target Mode, and always there are the same errors needing to be repaired.
    I don't buy that I'm dealing with a hardware issue.  My antivirus and security software are all up-to-date.  What the heck is going on?  Why do I keep having these disk problems?  Why can't I access my accounts anymore?  Why does it keep hanging during boot-up?  Why am I about to throw the machine out my bedroom window?

    WithoutID wrote:
    I don't buy that I'm dealing with a hardware issue.
    You have a software issue carried over from the previous computer likely caused by Norton and perhaps some other issues related to recent malware.
    Your going to need to copy your users data folders only to a external drive and disconnect everything,
    command r boot into Recovery,
    DU erase (with Zero) your Lion partition,
    install Lion fresh from Apple,
    setup with the same name (important),
    Software update,
    install all your programs from fresh sources,
    and return files from the external drive manually into their respective folders
    in that precise order.
    and for good performance for a long time, try not to go over 50% of the drive filled, but certainly not more that 75%
    Do not use migration or TimeMachine restores.
    This is known as a Fresh Install, where everything is brand spanking new and only vetted files are returned.
    It's a pain I know, the problem with too much automation, the crap seeps in and ruins everything.
    I don't migrate nothing, I like my machines to work perfectly.
    https://discussions.apple.com/docs/DOC-3046
    https://discussions.apple.com/community/notebooks/macbook_pro?view=documents

  • Invalid volume file count and directory count

    My wife's macbook pro started shutting down by itself randomly, so i performed Disk Utility Verify Disk and found these errors:
    Invalid volume file count
    (It should be 800651 instead of 800653)
    Invalid volume directory count
    (It should be 191005 instead of 191003)
    The volume Macintosh HD needs to be repaired.
    Error: Filesystem verify or repair failed.
    As i do not have the Mac OS Leopard disks physically with me, I target-disk started her mac on my mac, and use my mac to run Disk Utility on her hard-disk, and repaired the disk without problems.
    However, this is the 3rd or 4th time this has happened. After the 1st time, i figured something is causing it, so i checked this forum, and found that for some, the Blackberry Messenger app causes programs, so i promptly uninstalled it fully (including associated system files) and this problem didnt come back for a while.
    Or could this be a sign the hard disk is physically failing soon? It is out of warranty now. We have regular TimeMachine backups. We are actually kinda waiting out until the new line of macbook pro's come out.. (hopefully in June at WWDC)
    Any suggestions as to how else to address this? Thanks!
    Laptop stats: MacBook Pro 15"
    2.4 GHZ Intel Core 2 Duo
    2 GB RAM
    HDD: 250GB
    Graphics: NVDIA GeForce 9400M VRAM 256MB
    OS: Mac OS Leopard

    Well, the disk errors are due to corruption caused by the random power downs, so focus on getting that issue solved first. What's the stats on the battery?

  • Invalid volume file count

    My system gets stuck on gray screen at start-up. I boot as target drive and use disk utility from my laptop to repair the invalid file count. It starts up fine for a few starts, them hangs on gray screen again. Any fixes?
    Once I've repaired the drive remotely from my laptop using the disk utility with the mac pro booted in target mode it starts up ok 2 or 3 times... then gets stuck again and disk utility reports the same invalid count message.

    You may be getting that notice from a drive that is having problems.
    Do you have current backups? If not, put everything aside and make backups as soon as possible, as the drive may be about to fail catastrophically.
    There is a lot you can do to restore your faith in that drive. But several steps in the process take all afternoon. I suggest you buy a new drive and replace the one that is being unreliable, then work on the unreliable drive at your leisure.
    One thing that makes a drive unreliable is blocks that are Bad, or that require many retries to get good data. The classic way of dealing with this problem is to security Erase and write Zeroes into every data Block. It takes Hours, but can be done in the background IF this were not your Boot Drive.
    When completed without error, the drive has substituted spares from its private stash to replace any Blocks found bad after Zeroing. If too many blocks were spared out, the Zeroing can be repeated, but the drive should be assigned lighter-duty use, such as periodic Backups. Sometimes the drive never passes, and must be retired.

  • Verify Disk gives message invalid volume file count/invalid directory count

    My Powerbook G4 (running Leopard 10.5.5) was running slower and slower. So I ran Disk Utility. When running “Verify Disk”, I received the following message -
    Quote
    At “checking volume information”, got the following message –
    Invalid volume file count
    (it should be 608262 instead of 608269)
    invalid volume directory count
    (it should be 126277 instead of 126270)
    The volume Macintosh HD needs to be repaired.
    Error: Filesystem verify or repair failed.
    Unquote
    A friend told me my hard drive was DEAD and needed to be repaired. Is this true or is there some way to fix my drive?

    I started up from my latest OS X Installer (Leopard) and opened Disk Utility (although it seems to give me the Disk Utility that's on my Hard Drive, NOT one on the installation disk). Repair Disk was NOT an option (even after running Verify Disk again to see if that helped).
    So, now what do I do now? Disk Warrior may help (or it may not) and a new hard disk isn't THAT expensive. Should I just go ahead and bite the bullet and get a new hard drive???
    Oh, and while I'm asking questions - my PowerBook G4 is 5 years old. Besides the dodging hard drive everything else is running ok. But after 5 years (mainly run on mains power, not the battery), is it about time for a new battery? Is there a way to tell whether your battery is about to die before it actually dies and you can't start up?
    Message was edited by: paswines

  • KM report - add folder & file count

    Hi all,
    I've just finished my custom report to report files and folders in a given time range.
    After running one of the default EP reports under 'Content Administration' -> 'KM Content' -> 'Toolbox' -> 'Reports' : 'Delete', the report displays not only 'Found Items', but also 'Folder Count' and 'File count' in the 'schedule' tab.
    How can these properties be added to a custom report?
    Does anybody now where the default reports par file can be found? Seems like it's not on the file system.
    Thanks for the help :o))

    Hi Kevin,
    you might try this trick as last instuction in your execute(..) method:
          List summary = new ArrayList();
          if(!useFramework) {
            summary.add(new Property(PN_RESULT_FOLDER_COUNT,new Long(folders)));
            summary.add(new Property(PN_RESULT_FILE_COUNT,new Long(files)));
          return receiver.finish("",ITEM_PROPERTY_NAMES, summary);
    In fact this is the code block that creates the output in your referenced example.
    Best regards,
    Michael

  • Invalid File Count (Disk Utility)/slow machine. Possible RAM/HD issue?

    I have an entry-level macbook (2010, white plastic unibody). Over the past year, every few months or so my system would become painfully slow (30 minute boot times, the rainbow beach ball popping up every few minutes). I would run the disk verification via Disk Utility and it would often come back with the error "Invalid Volume File Count". After booting into the OSX cd and running a repair, everything would be back to normal and the system was working as good as new. However, over the two months, this issue has been happening a lot more frequenty (almost once a week). I've ran the "Apple Hardware Test" and memtest and both came up with nothing. I decided to format the system and start from scratch. The boot time is now as fast as it was when I first bought the machine, however it's still hanging up on the most trivial processes (opening finder, typing a URL into Safari). Now that i've reformatted, I ran all of the diagnostics again (Disk Utility reports that "The Macintosh HD appears to be ok", memtest reports no issues, and neither does the Apple hardware test). Due to the number of times I had to run the disk repair, and the fact that the system is still having issues after formatting, i'm leaning towards this being an issue with the hard drive, however, all of the diagnostic tools I've tried so far want to tell me otherwise haha. Does anyone have any ideas/have experienced anything like this?

    I went into Recovery HD and ran Disk Utility. It verified and repaired the permissions without any data loss or problems. As a bonus the boot problem seems to have been recitifed.

  • I can edit on Premiere Pro 6 files, but after a dozen keystrokes, the space bar and cursor keys stop working while the save function works

    I can edit on Premiere Pro 6 files, but after a dozen keystrokes, the space bar and cursor keys stop working while the save function, render workspace function, export file are still operational. How can I fix it so I may complete my assignment?
    Besides DaVinci Resolve, Adobe Creative Suite 6 is the only software on the machine. I am using Windows 7 Professional 64-bit Operating System on AMD FX 6100 six-Core Processor at 3.31gHz and 32 GB RAM memory. There are two SLI-bridged GTX680 NVidia cards.
    The software was very stable for the last six months, working with 720P proxy files from 2.5K masters (Blackmagic Design Camera). I am working on a feature-length project that exceeds 1000 edits. I have broken the file into 2 one hour segments.
    I have deactivated the software before reinstalling the entire OS from scratch. PP6 was very stable for 48 hours. Then the freezing space bar returns. After a dozen strokes into the project, same problem.  I have made cache files store next to originals, I have deleted preview files if they were corrupted and causing instability. Am I missing something?
    I have Microsoft Security Essentials for virus protection. I double checked the memory for damage/defect. Nothing says that the motherboard or other components are damaged.
    I am in film competition overseas and need to have deliverables in less than a month's time.  I lost the last two weeks troubleshooting and this crisis came at an inopportune moment of the project.
    Any assistance would be greatly appreciated.

    Still getting software freezes but found a way to mitigate for the mean time.
    Upon launching Adobe Premiere Pro, hit CTRL-ALT-DEL to launch TaskManager as well.
    You will want to highlight Adobe QT32 Server.exe
    Right click and select "End Process Tree"
    You will get considerable stability in the program, long enough to get timing of cuts done. Be sure to save often.
    If the program freezes, do not hit Save. You definitely want to avoid saving the corruption into your TimeLine
    CTRL-ALT-DEL to relaunch the TaskManager and highlight Adobe Premiere Pro.exe
    Right-click to "End Process"
    No need to reboot the whole system; just launch Premiere Pro again and continue with the session. Note that your work reverted to Last Save.
    Hope this helps until the bug is fixed.

  • It's very slow to access file server after installed SP1 of Win7.

    I found it's become very slow to access shared files on file server after installed win7 SP1, (windows6.1-KB976932-X86.exe),  access same file, the win7 without sp1 is fast in 5 secs, but the pc with sp1 need more than 30 secs. And
    I tried to removed the sp1, everything goes fine, access fast as others.
    I don't understand what's the reason and which feature affected it, I believe the sp1 can help Win7 be more safety, but why the performance on it get worse.
    And I didn't find the same question or tips on forum or website, do you really haven't the issue?
    Arnold From Shanghai, China
    Arnold Yu

    Hi Arnold,
    Windows 7 Service pack and any other Windows Updates are released to improve the performance, reliability and security of the system.
    Firstly please run the performance troubleshooter:
    Open the Performance troubleshooter
    http://windows.microsoft.com/en-US/windows7/Open-the-Performance-troubleshooter
    If it doesn't resolve the issue, Put the computer in
    Clean Boot and then check to see if the issue persists.
    If it still persists, please use performance monitor to trace your computer's performance:
    Performance Monitoring Getting Started Guide
    http://technet.microsoft.com/en-us/library/dd744567(v=ws.10).aspx
    Karen Hu
    TechNet Community Support

  • Formatting lost in the text file, got after zipping.

    Hello ABAP gurus,
    A text file has to be zipped .I have used the class method CL_ABAP_ZIP-SAVE() to create a zip file in the application server.    The zip file is double clicked and the text file is opened.
    The formatting is lost in the text file, got after zipping.
    Please let me know how I maintain the formatting in the zip file.
    Thanks.
    Edited by: GVVisweswara . on May 5, 2011 5:17 PM

    Hi.,
    Check this link: [Zip text file using Cl Zip|http://www.saptutor.org/?p=59]
    also this wiki., http://wiki.sdn.sap.com/wiki/display/ABAP/CL_ABAP_ZIPusage-ZippingABAPreportoutput
    hope this helps u.,
    Thanks & Regards
    Kiran

  • I can't see WMV files in After Effects CC since I installed the AE patch 12.0.1

    I downloaded yesterday the Mac update called Maverik (OS X 10.9) and also the After Effects patch 12.0.1 in order to open AE using Maverik as operative system (before downloading the AE patch was impåossible to open After Effects CC). The problem now is that I was able before to see and edit window media files in After Effects but now, when I open the project that I've been working on, After Effects shows an error "After Effects error: file xxxx.wmv cannot be imported - this wmv file is damaged or unsupported". I am pretty sure that all the wmv files are not damage as Iø'e been working on these files the last couple of months. Besides  I have imported again the same wmv files from colleagues who can see and edit these files in After Effects CC for PC.
    Would you please advice me on this? Should I download a codec or Adobe will resolve this issue with the next update for After Effects CC?
    Thanks in advance
    Sebastian

    Can you open your WMV files in QuickTime Player?
    After Effects on Mac does not read WMV files natively. You probably have the Flip4Mac QuickTime components installed, which allows QuickTime to read WMV files, and through that AE can read WMV files.
    My guess is that Flip4Mac is either having problems on your machine after the upgrade to Mavericks, or it is not compatible with Mavericks. I didn't see any notices on Telestream's site, so I would guess the former.

  • File Count with selected date range

    Hi,
    Our requirement is to get the file count with selected date by the user from two sharepoint date time controls i.e. dtp1 and dtp2 into the data table. I am able to get the file count of specific folder from Pages library through below code. Now need to get
    the selected date range from two date time picker controls and check with the item created by is within the date range. If yes I need to get the file count.
    So please share your ideas/thoughts to do the same.
    SPList list =
    wikiweb.Lists["Pages"];
                        SPFolderCollection oFolders
    = list.RootFolder.SubFolders["foldername"].SubFolders;
                        DataTable dt
    = new DataTable();
                        dt.Columns.Add("Column1");
                        DataRow dr;
                        if (oFolders.Count
    > 0)
                            foreach (SPFolder oFolder in oFolders)
     if (!oFolder.Name.Equals("Forms"))
                                    dr
    = dt.NewRow(); 
    dr["Column1"] = oFolder.ItemCount.ToString();
    dt.Rows.Add(dr);
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

    Hi,
    I have modified the code as below
    if((DateTime)(oFolder.Item.File.TimeCreated>dtFromDate.SelectedDate)&&(DateTime)(oFolder.Item.File.TimeCreated<dtToDate.SelectedDate))
    But still it is throwing the error.
    Please share your ideas on the same.
    Regards,
    Sudheer
    Thanks & Regards, Sudheer

  • Where is the file count in a finder window?

    Where is the file count in a finder window now?  I have nothing in any of the view modes.

    From the Finder Menu bar View > Show status bar

Maybe you are looking for

  • Ipod ITunes library help please!!!

    Hi, i hope someone can help. I had to return my laptop to work and it contained my ITunes library (i have spent a fortune). I thought that i had stored all the purchased songs on a memory stick but when i put this into my new laptop it won't work. I

  • Albums in Library not on iCloud

    I just signed up for Match.  I have 55 albums in my iTunes Library, but only 25 show up as available on my devices.  What can I do to make the other 30 albums available on iCloud?

  • How to handle hierarchies in process chain

    Hi All, I am designing the process chain for a master GL account number . It has attribute hierarchy and text. I am successfully able to create the process chain for the attribute and text . But when i add the infopackage for the hierachy I am confus

  • A larger JTextField

    I want a text field that is about the size of a 3x5 card for users to enter information. It would be nice if they could use html too. what do i use?

  • Payroll reporting

    Does any body have documentation on US payroll reporting