Github user ijokarumawak commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/1983#discussion_r126362595
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/PutSQL.java
 ---
    @@ -110,11 +113,13 @@
                     + "sql.args.1.value, sql.args.2.value, sql.args.3.value, 
and so on. The type of the sql.args.1.value Parameter is specified by the 
sql.args.1.type attribute."),
             @ReadsAttribute(attribute = "sql.args.N.format", description = 
"This attribute is always optional, but default options may not always work for 
your data. "
                     + "Incoming FlowFiles are expected to be parametrized SQL 
statements. In some cases "
    -                + "a format option needs to be specified, currently this 
is only applicable for binary data types and timestamps. For binary data types "
    -                + "available options are 'ascii', 'base64' and 'hex'.  In 
'ascii' format each string character in your attribute value represents a 
single byte, this is the default format "
    -                + "and the format provided by Avro Processors. In 'base64' 
format your string is a Base64 encoded string.  In 'hex' format the string is 
hex encoded with all "
    -                + "letters in upper case and no '0x' at the beginning. For 
timestamps, the format can be specified according to 
java.time.format.DateTimeFormatter."
    -                + "Customer and named patterns are accepted i.e. 
('yyyy-MM-dd','ISO_OFFSET_DATE_TIME')")
    +                + "a format option needs to be specified, currently this 
is only applicable for binary data types, dates, times and timestamps. Binary 
Data Types (defaults to 'ascii') - "
    +                + "ascii: each string character in your attribute value 
represents a single byte. This is the format provided by Avro Processors. "
    +                + "base64: the string is a Base64 encoded string that can 
be decoded to bytes. "
    +                + "hex: the string is hex encoded with all letters in 
upper case and no '0x' at the beginning. "
    +                + "Dates/Times/Timestamps - "
    +                + "Date, Time and Timestamp formats all support both 
custom formats or named format ('yyyy-MM-dd','ISO_OFFSET_DATE_TIME') "
    +                + "as specified according to 
java.time.format.DateTimeFormatter.")
    --- End diff --
    
    Nice documentation! How about adding default behavior as well? Such as "If 
not specified, a long value input is expected to be an unix epoch (milli 
seconds from 1970/1/1) or 'yyyy-MM-dd' format is used."


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to