Importing CSV Flat File defaults all columns to 50 chars

  • pbaldridge

    Newbie

    Points: 1

    While some are great suggestions, this absolutely should not be necessary. To not have a way to change the default values is simply ridiculous for software that has been around this long. I've seen this question many times and for them to not address the issue just doesn't make sense.

  • Jeff Moden

    SSC Guru

    Points: 996831

    As a bit of a sidebar, I think it funny how names of things have (inappropriately, IMHO) changed over the years.  If we look at the title of this thread, it asks about "CSV FLAT FILES", which is an oxymoron.  Either it's a CSV file or it's a FLAT FILE.  A FLAT FILE used to mean a "Fixed Field File" that had no delimiters at all and relied on esoteric knowledge of what was called a "Record Layout", which identified the "Field Name", the datatype of the "Field", and both the starting character position and the number of characters for each "Field".

    Sometimes the record layout was published as either a document or sometimes as an accompanying additional "Flat File" that could be automatically read so that you could easily develop a target table from it.

    And I actually hate CSV and TSV files.  IMHO, they exist because people needed to load their spreadsheets from files and to make some sort of "universal" standard that would also allow people to review the data in human readable form using simple text editors.  Lord only knows why people didn't/don't actually transmit spreadsheets.  Don't get me started on XML or JSON.  I've lost track of the link but even the inventor of XML actually regrets inventing it.

    Both the old/simple ASCII character set ( http://www.asciitable.com/ ) and the relatively newer Unicode standards include "Control Characters" for nasty fast and consistent data transfer of large volumes of non-graphical data (especially characters 28 thru 31) without tag bloat and the hooey a system has to go through to construct and shred the likes of XML, JSON, EDI, and multiple other data transmission sins.  Add an embedded manifest file (contains non-fixed field record layouts and line counts of the data) at the beginning of the transmission and all of this brew-ha-ha with importing text based tabular (not to be confused with TAB delimited) files could easily be standardized so you wouldn't need things like SSIS and format files and, etc, etc, ad infinitum.

    I guess that qualifies as a rant but this ol' dude is seriously disappointed in current "standards", the fact that there are so many different "standards", and the fact that people don't even follow those, never mind anything easy. 😀

    Here's my campaign hat for a simpler standard. 😀 😀 😀

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "If "pre-optimization" is the root of all evil, then what does the resulting no optimization lead to?"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply