Getting correct field length when creating formats for delimited flat files

Using Data Services 3.2 to pull in tsv and Excel source files.
When creating a new format for each file, DS tries to intelligently set the field size for each column. However, it seems to sample only a portion of the file. The end result is that it often determines too short a length for a field.
Is there a way to force it to scan an entire file before it sets the field length? Or alternatively, how to get it to at least throw an error instead of silently truncating my data?

I am not aware of any way to force DS to scan the whole file, or to log a warning when it truncates.  The field sizes DS sets by using a sample of the data is only really to give you a starting point, you need to try and determine the maximum possible lengths preferably from someone who understands the source of the data or through profiling.  But the profiling method will obviously only be based on the data you have at the time of profiling, new data added to the source later could exceed the field lengths.  The way I prefer to handle this is to set all the field lengths to longer than expected, eg. varchar(999) and then use a validation transform immediately after reading the file to check for any fields that exceed the maximum allowed for the target system and send these to an error file/table.

Similar Messages

  • Creating a comma delimited flat file

    Hi,
    I am trying to create comma delimited flat files from oracle large Oracle 8.0.6 tables. What is the best method? It seems like using the spool command is very inefficiant. Can sqldr be used?

    Todd,
    This looks very helpful -- thanks! I need to unload very large tables and this should do the trick.
    Jeremiah

  • Photoshop Elements Organizer 11 crashes due to deadlock in the thread wait chain when creating thumbnails for *.mts (AVCHD) files

    Hi,
    the Elements Organizer 11 creates a deadlock in the wait chain when generating thumbnails for more than a handful of MTS (AVCHD) files.
    After importing AVCHD files from my Canon video camera, the organizer using default settings always crashes. I was able to narrow down the problem to be caused by thumbnail generating.
    After deactivating the automatic generation of thumbnails, the organizer does not crash any more upon launching .
    Of course, working without thumbnails is not very practical. The next resort is manual trigger of thumbnail generation by selecting "update thumbnail".
    If I manually trigger updating of thumbnails for files one by one, then it works for quite many files before crashing again.
    Selecting thumbnail update for multiple files at once has a much higher likelihood to crash.
    This does not seem to be related to particular file contents: a file that leads to crashing once may be flawlessly get a thumbnail created at the next attempt.
    The Windows event report looks as follows (German language Windows):
    Name der fehlerhaften Anwendung: PhotoshopElementsOrganizer.exe, Version: 11.0.0.0, Zeitstempel: 0x505e9f67
    Name des fehlerhaften Moduls: msvcrt.dll, Version: 7.0.9600.16384, Zeitstempel: 0x52158ff5
    Ausnahmecode: 0xc0000005
    Fehleroffset: 0x00009919
    ID des fehlerhaften Prozesses: 0x13c8
    Startzeit der fehlerhaften Anwendung: 0x01cfb676145d0c54
    Pfad der fehlerhaften Anwendung: C:\Program Files (x86)\Adobe\Elements 11 Organizer\PhotoshopElementsOrganizer.exe
    Pfad des fehlerhaften Moduls: C:\WINDOWS\SYSTEM32\msvcrt.dll
    Berichtskennung: b8817e29-2269-11e4-bf2d-10bf487f7b28
    Vollständiger Name des fehlerhaften Pakets:
    Anwendungs-ID, die relativ zum fehlerhaften Paket ist:
    Occasionally, a different module is listed as erroneous instead of msvcrt.dll.
    My questions:
    - has anyone experienced the same problem?
    - is this a known issue with Organizer 11?
    - is the issue solved with Organizer 12?
    I have Premiere Elements 11, Photoshop Elements 11 installed and not experienced any other issues with these applications.
    Playback of said AVCHD (*.mts) files works flawlessly, i.e. I do not have any codec or performance issue on my PC.
    Deactivation of anti-virus software has no significant effect. I have excluded video directories from scanning anyways.
    Have deactivated face recognition, visual search and smart tagging in the organizer.
    Have also disabled hyperthreading in the BIOS.
    Using Windows XP compatibility settings for PSE somewhat improved the stability, but did not completely eliminate crashes.
    Additionally, it signnificantly slows down thumbnail generation and a progress indication window becomes visible during thumbnail generation, which is barely noticable in native Win 8.1 mode.
    Officially, Elements 11 is compatible with Windows 8.1.
    There is a knowledgebase article related to Elements 6, which recommends to disable multi-threading and to enforce execution of Organizer on more than one core.
    This reduces the problem a little bit, but thumbnailing more than a handful of files still leads to crashing.
    By means of the task manager, I analyzed the wait chain of the process PhotoshopElementsOrganizer.exe:
    Every time the fault occurs, it is caused by a deadlock in the wait chain.
    For example:
    PhotoshopElementsOrganizer.exe (PID:6440) Thread: 6540
    -- PhotoshopElementsOrganizer.exe (PID:6440) Thread: 5932
    ---- PhotoshopElementsOrganizer.exe (PID:6440) Thread: 6540
    PhotoshopElementsOrganizer.exe (PID:6440) Thread: 5932
    -- PhotoshopElementsOrganizer.exe (PID:6440) Thread: 6540
    ---- PhotoshopElementsOrganizer.exe (PID:6440) Thread: 5932
    Regards
    Oliver
    Microsoft Windows 8.1 Pro, 64bit, 6.3.9600 Build 9600
    Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz,
    16 GB RAM
    AMD Radeon HD5450, 1GB
    256 GB SSD,  Crucial M4-CT256 (Windows, Application, Swap and Temp files), NTFS
    1.8 TB HDD, WesternDigital, WD2002FAEX-007BA0, NTFS  (media store)

    Hi,
    I'm experiencing the same problem after importing MTS files.
    When you said that you unisntall all other codec, what do you mean?
    Codec Inside element software?
    I have desable the automatic thumbnail and it still crash.
    I'M running the software and trying to import more video files and the program keep crashing during the process of selecting the files in the directory to be imported.
    i went in my windows 7 journal and here is the error.
    System
    Provider
    [ Name]
    Application Error
    EventID
    1000
    [ Qualifiers]
    0
    Level
    2
    Task
    100
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2014-08-31T19:36:04.000000000Z
    EventRecordID
    244366
    Channel
    Application
    Computer
    Ordi-Denis
    Security
    EventData
    PhotoshopElementsOrganizer.exe
    11.0.0.0
    503fdd1d
    MSACM32.dll
    6.1.7600.16385
    4a5bda4e
    c0000005
    00004d91
    1634
    01cfc552c927dce5
    C:\Program Files (x86)\Adobe\Elements 11 Organizer\PhotoshopElementsOrganizer.exe
    C:\Windows\system32\MSACM32.dll
    0b097e53-3146-11e4-a14e-bcaec51a14f7
    Please i need help since Adobe is not helping us.

  • How to get fixed field length when download a CSV  file ?

    hi all ,
        I had downloaded a CSV file from an ALV list which created by myself. the current layout of the CSV file is :
    aaa;bbbbbbbbbb;cc;                
                                                         for example . but what i want is :
    aaa         ;bbbbbbbbbbb            ;cc     ; 
    it means these three fields are all with fixed length don't ommitting spaces when you preview the CSV file. how should i do this ?
    best regards
    Kevin

    i got the solution.

  • Getting ora-904 error when create objects for the 2DayPlus apex 3.1 demo

    Searched metalink and the forum and can't determine the cause of my error below.
    CREATE TABLE oehr_categories_tab OF oehr_category_typ
    ( category_id PRIMARY KEY)
    NESTED TABLE TREAT
    (OBJECT_VALUE AS oehr_leaf_category_typ).product_ref_list
    STORE AS oehr_prod_ref_list_ntab
    NESTED TABLE TREAT
    (OBJECT_VALUE AS oehr_composite_category_typ).subcategory_ref_list
    STORE AS oehr_subcat_ref_list_ntab
    ORA-00904: : invalid identifier
    DB Version: 9.2.0.7
    Any help would be appreciated.

    Hi,
    I believe the issue is with a new pseudocolumn reference introduced in 10gR2. Kindly refer to the Oracle Database SQL Language Reference on [OBJECT_VALUE Pseudocolumns.|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/pseudocolumns006.htm]
    A quick workaround for those using Oracle Database 9iR2 or 10gR1 would be to edit the "Installation Script" (under "Supporting Objects"). Edit the "OEHR_CATEGORIES_TAB" DDL to the following:
    bq.      CREATE TABLE oehr_categories_tab OF oehr_category_typ \\     ( category_id PRIMARY KEY) \\     NESTED TABLE TREAT \\     (SYS_NC_ROWINFO$ AS oehr_leaf_category_typ).product_ref_list \\     STORE AS oehr_prod_ref_list_ntab \\     NESTED TABLE TREAT \\     (SYS_NC_ROWINFO$ AS oehr_composite_category_typ).subcategory_ref_list \\     STORE AS oehr_subcat_ref_list_ntab;
    Reinstall the Supporting Objects.
    Hope this helps.
    -Amitabh

  • How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?

    How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
    Hi,
    I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
    but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
    ( f.ex. cannot verifying it correct in xmlspy )
    my dbms is
    NLS_CHARACTERSET          = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET     = AL16UTF16
    NLS_RDBMS_VERSION     = 10.2.0.1.0
    I do generate it in this matter :
    declare
    xmldoc CLOB;
    ctx number ;
    utl_file.file_type;
    begin
    -- generate fom xml-view :
    ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
    DBMS_XMLGEN.setRowSetTag(ctx, null);
    DBMS_XMLGEN.setRowTag(ctx, null );
    DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
    -- create xml-file:
    xmldoc := DBMS_XMLGEN.getXML(ctx);
    -- put data to host-file:
    vblob_len := DBMS_LOB.getlength(xmldoc);
    DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
    bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
    UTL_FILE.put_line(bHandle, vbuffer, FALSE);
    UTL_FILE.fclose(bHandle);
    end ;
    maybe while work UTL_FILE there is a change the encoding ?
    How can this solved ?
    Thank you
    Norbert
    Edited by: astramare on Feb 11, 2009 12:39 PM with database charsets

    Marco,
    I tryed to work with dbms_xslprocessor.clob2file,
    that works good,
    but what is in this matter with encoding UTF-8 ?
    in my understandig, the xmltyp created should be UTF8 (16),
    but when open the xml-file in xmlSpy as UTF-8,
    it is not well ( german caracter like Ä, Ö .. ):
    my dbms is
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_RDBMS_VERSION = 10.2.0.1.0
    -- test:
    create table nh_test ( s0 number, s1 varchar2(20) ) ;
    insert into nh_test (select 1,'hallo' from dual );
    insert into nh_test (select 2,'straße' from dual );
    insert into nh_test (select 3,'mäckie' from dual );
    insert into nh_test (select 4,'euro_€' from dual );
    commit;
    select * from nh_test ;
    S0     S1
    1     hallo
    1     hallo
    2     straße
    3     mäckie
    4     euro_€
    declare
    rc sys_refcursor;
    begin
    open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
    dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
    end;
    ( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
    open in xmlSpy is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <S0>1</S0>
    <S1>hallo</S1>
    </ROW>
    <ROW>
    <S0>2</S0>
    <S1>straޥ</S1>
    </ROW>
    <ROW>
    <S0>3</S0>
    <S1>m㢫ie</S1>
    </ROW>
    <ROW>
    <S0>4</S0>
    <S1>euro_€</S1>
    </ROW>
    </ROWSET>
    regards
    Norbert

  • How to make metadata fields required when creating folders

    Hello all....
    Related issue with SR 3-6472229431 and SR 3-6471130611.
    We're using DIS 11.1.6 64-bits (2011_11_29 (rev 9756) 11.1.6.97) in a Windows 7 64-bits workstation (with UCM 11.1.1.5 in a Linux machine). The check-in of images to UCM goes fine.
    I'm trying to make some metadata fields required when creating a folder. These fields are required when making a check-in, but not when creating folders.
    Folders_g is enabled. DesktopTag too.
    EDIT: Patch: 14695303 - WCC 11.1.1.5.0 BUNDLE ( MLR 16 ) NOV 6 2012 applied.
    Is it possible?
    Thanks for all.
    Edited by: fgomes on 22/11/2012 03:24

    After reading your response and rereading the original question a bit closer, the metadata prompting feature does not apply to creating new folders, only content.
    Again, though, I think the focus here is in the wrong place. The metadata applied to a folder is intended to be ultimately applied to the content. You can build global rules that fire on submission of content to check if a field has a value, and throw an error if the value is empty.
    If you expect users to create folders (and actually apply any metadata to the actual folder itself), you will be disappointed. Experience shows that users are not interested in that level of detail when creating content, let alone folders. Letting typical users create folders is a bad idea anyway, as they tend to create the same inefficient folder structures they previously created in file shares within Content Server.
    If you need to tightly control folder attributes, you'll be better served by locking down the ability to create new folders. Otherwise you're looking at some type of customization. Keep in mind that you won't be able to customize the right click behavior of DIS. Any changes to DIS would have to be an enhancement request.

  • Error when creating project for ESS

    I am getting the folowing error when creating a project in Dev Studio for the ESS leave application ess~lea. Pls help
    Failed to sync DC "sap.com/ess/lea(sap.com_SAP_ESS_1)" in configuration "JDI_XSSTrack_D". File "C:\Documents and Settings\User\.dtc\0\DCs\sap.com\ess\lea\_comp\.dcdef" does not exist locally after sync but it exists on the serve
    Regds
    Thirur

    Uninstalled and reinstalled the dev studio. Now it works.

  • Error when creating interval for number range object

    Hi,
           I am trying to transport my BW stuff from QA to Production and I am getting the following error in the transport logs. The info objects are inactive in RSA1.
    Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode)
    Characteristic YRESD: Error when creating interval for number range object BIM0000396
    Can some body advise me what's wrong? Is something need to be maintained in number ranges?
    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Thanks.
    Edited by: Raj G on Mar 20, 2008 11:38 AM

    Also when I am checking the objects in RSA1, I am getting a message saying "source system WD110 does not exist", WD110 is our dev system. How can I change the source system after transport?
    Which system are you checking this?
    refer: Re: Transport Source Systems from DEV to Testing for step to map the source systems for transport

  • Why is it when I go to open a file in Photoshop cc I get a "Could not complete your request because of a program error".  I have uninstalled and re-installed software,  It works for a short time then I get that error again when i go to open a file.  Thank

    @Why is it when I go to open a file in Photoshop cc I get a "Could not complete your request because of a program error".  I have uninstalled and re-installed software,  It works for a short time then I get that error again when i go to open a file.  Thank you!

    Without proper system information and other details like what files you work with  nobody can tell you much. From corrupted prefs to issues with your PS swap file to actual problems with the fiel storage this could be anything.
    Mylenium

  • When creating iframes for htm pages, I pdfs work just fine in all versions of Firefox. However, when I construct an iframe for an htm to be displayed on an htm

    ''duplicate of https://support.mozilla.org/en-US/questions/973637 - locking''
    When creating iframes for htm pages, I pdfs work just fine in all versions of Firefox. However, when I construct an iframe for an htm to be displayed on an htm, Firefox 24 will not load the htm/iframe.

    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thank you!

  • Why do I get so much noise when creating a real instrument track?

    Why do I get so much noise when creating a real instrument track?

    Creating a real instrument track is a very silent matter normally. Once you start recording, you can indeed pick up noise - but that depends on what you're recording, how you're recording etc. - you didn't tell us anything about it.

  • I keep getting network connections error when downloading update for iPhone 4. Any suggestions?

    I keep getting network connections error when downloading update for iPhone 4. Any suggestions?

    I think I solved the problem by initiating the update in a different way, from the itunes panel where I can click to start the update, instead of saying yes when asked if I want to update when itunes launches in response to the iphone being plugged into the computer.

  • How to create a dynamic SSIS package for multiple flat file destinations

    Hi,
    I have to create a ssis package which has single data flow task and inside that I have 23 source (sql- select * from - statements)- destination (flat files, 23 distinct) connection.
    Now for each product I have to create separate SSIS package (i.e. if prod=abc then these read select * from abc_tables and 23 abc_ txt files)
    I want to do it dynamically, means only single package and inside that variables will take select * values for each source-dest connection (so i believe 23 variables) and same for destination flat files.
    Let me know. :)
    ANK HIT - if reply helps, please mark it as ANSWER or helpful post

    Sorry It seems you're contradicting yourself. you say I know my source and dest structure and the you're
    asking all I want is to have a dynamic structure
    what does that mean?
    and reading your next sentence
    I want to run a package for 5 products, instead of creating 5 ssis packages with 23 source- dest connection, I would
    like to have one with only 23 source- dest connections 
    What I feel is what you're looking for is to  have a looping structure to loop through each of the 5
    products.
    In that case what you could do is this
    1. Create a object variable in SSIS 
    2. Use a Execute SQL Task to populate the variable with all available products (I think you'll have a master table for that). Set ResultSet property to Full ResultSet and then in ResultSet tab map Object variable to 0 th index
    3. use a ForEachLoop container with ADO .NET recordset enumerator and map to object variable. Create a variable of datatype same as that of Product identifier field to get individual values out
    4. Inside loop create your data flow task with 23 source destination connection. In the query part use a parameter for product field and map it to the variable containing product value to get only data for the product.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Different formats of the flat file for the same target

    In our deployment, we use plugin code to extract the csv files in the required format. The customers are on same version of datamart, but they are on different versions of source database - from 3.x to 4.5 depending on which version of application they are using. In 4.0, we introduced a new column email in the user table in the source database. Accordingly, plugin will add the field in the csv file. But not all the customers will get the upgraded version of plugin at the same time. So ETL code needs to decide which data flow to process depending on the format of the csv file to load data to the same target table. I made the email field in the target table nullable but it still expects the same format of the csv file with delimiter for null value.
    Need help to achieve this. Can I read the structure of the flat file in DS or get the count of delimiters so that I can use a conditional to use different data flow based on the format of the flat files.
    Can I make the email column in the flat file optional?
    Thanks much in advance.

    You can add an email column that maps to null in a query transform for the source that does not contain this column. 
    Or else you can define two different file formats that map to the same file.  One with the column and one without

Maybe you are looking for