LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Node Release: Output Delimited (Multifile)

    Employee
    Posted 11-16-2010 15:09

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mmarinelli

    Node Name: Output Delimited (Multifile)
    Node Category: Publishing
    Use Case: Use this node when you want to output multiple delimited files from a single data stream
    Tested on Release: 4.1.7
    External Dependencies: None
    Practical Usage Example: An example use of this node has been provided in the prototype examples graph which is released in conjunction with the prototype library. Please see that graph for a executable use case.*
    Node Documentation:

    Functional Description:
    This node improves upon the core Output Delimited node by adding multiple file output functionalitysimilar to the multiple file input functionality found with Input nodes. The FilenameExpr is used to name the output files; each discretevalue will be used to create a file, into which matching records will be output.By default, this node has no output pins. However, if one is added, the names of the filesgenerated by the node will be output on this pin.
    Parameters:
    • FilenameExpr: The expression which defines the filename for which each record will be written.
    • FieldNames: Specifies header writing behavior. A list of field names can be written as the first record of the output file.

      Options are:
      • None - no header line, just the data.
      • Name - a header row of field names.
      • Name:Type - BRAIN format style (<field name>:<data type>) header.
      Defaults to Name.
    • FieldDelimiter: The field delimiter. This is a string or character that will separate consecutive fields in the output file.
      Use \t for tab, \\ for single backslash. Default is \t.
    • RecordDelimiter: The record delimiter. This is a string or character that will separate consecutive records in the output file.
      Use \n for newline (Unix style), \r\n for carriage return newline (Windows style),
      \t for tab, \\ for single backslash. Defaults to \n.
    • EscapeCharacter: The escape character, which will be used to precede literal EscapeCharacters or QuoteCharacters
      appearing within data fields. If there is no EscapeCharacter specified,
      a doubled QuoteCharacter will be used to escape a literal QuoteCharacter in the data
      (as is done in CSV format). Unlike the delimiters, this character should not be preceded with a backslash.
    • QuoteCharacter: The quote character, which will be used to surround fields in the data
      otherwise containing RecordDelimiters, FieldDelimiters, or QuoteCharacters.
      Unlike the delimiters, this character should not be preceded with a backslash.
      Default is double quote (").
    • DoubleQuote: If true, when the quote character appears in the field, the character is doubled.
      If false, EscapeCharacter must be defined, and it will be used instead.

      Default is true.
    • WhenToQuote: Describes when quoting should occur.

      Options are:
      • All - All fields will be quoted.
      • Minimal - Only quote fields that contain the delimiter or begin with quote character will be quoted.
      • NonNumeric - All non-numeric fields will be quoted.
      • None - Use the escape character given instead of quoting (EscapeCharacter must be defined).
      Default is Minimal.
    • NullValue: The value to be output when the field is NULL.

      Defaults to empty string.
    Known Limitations: None


  • 2.  RE: Node Release: Output Delimited (Multifile)

    Employee
    Posted 11-19-2010 08:51

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    A good suggestion that was given during my node training session which covered this node; it would be nice to add to the output data a count of number of records that were written to each file.

    Also, it was noted (I don't think it mentions it in the docs), that the directory has to exist, this node will not create a directory...so if you wish to have a path that is modified via a value, you would need to pre-create all the directories. This is not deemed a bug necessarily, but an observation.

    Additionally, if a file already exists, it will be overwritten, not appended to. It was mentioned that appending might be a nice option to have for this.

    Cheers
    Rich


  • 3.  RE: Node Release: Output Delimited (Multifile)

    Employee
    Posted 05-13-2011 10:56

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    I added a new feature (clumsily done, so the idea is sound, the implementation may be questionable).

    I wanted to write the file, but wanted to not include the info that specified the path expression, so I added another parameter which allows the exclusion of a field to the outfile.

    Cheers
    Rich
    Attachments:
    Outfile Delimited (Multifile).brn


  • 4.  RE: Node Release: Output Delimited (Multifile)

    Employee
    Posted 10-02-2011 05:41

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: mgajdosik

    I was trying to output BRD files using this node, but when I set the FieldNames param to Name:Type, I got an error. I think line no 93 in the code should be:

    typeName = self.typeConversion.get(typeName, typeName)

    instead of

    typeName = typeConversion.get(typeName, typeName)

    Marek


  • 5.  RE: Node Release: Output Delimited (Multifile)

    Employee
    Posted 01-25-2012 05:02

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Tim Meagher

    Request from another forum user here:
    https://infogix.zendesk.com/hc/en-us/community/posts/360051800833

    Basically, in most cases with an Output Delimited node, if you don't want some columns, then just remove them prior to the output node.
    For the Output Delimited Multifile node though, these columns might be required to determine which output file the record gets written to, but not desired in the output.

    It could be nice to add the feature requested, whereby you could have an optional fields expression specifying which columns to include. Or perhaps because of the use case, specify which fields to exclude from the output.