logo
down
shadow

NiFi JoltTransformJson outputs only first record


NiFi JoltTransformJson outputs only first record

Content Index :

NiFi JoltTransformJson outputs only first record
Tag : json , By : kdietz
Date : January 11 2021, 03:32 PM

may help you . What made it behave like that is the fact that you referred your data(one record per line) as JSON while your data is not JSON. If it was JSON, then it would at least start and end with [] and each line (except for the final one) end with a comma.
Since JoltTransformJSON accepts only JSON, it behaved like that.

Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

JoltTransformJSON processor in NiFi(json without any parent tag)


Tag : development , By : Dennizzz
Date : March 29 2020, 07:55 AM
hop of those help? The trick is to walk back up the tree until you get to the element in the array, then you can reference that index in the target. Try this spec:
[
  {
    "operation": "shift",
    "spec": {
      "*": {
        "Header": {
          "recordNum": "[&2].recordNum",
          "readOn": "[&2].&1.created_date_time",
          "fileName": "[&2].&1.readFile"
        },
        "Data": {
          "id": "[&2].&1.Id",
          "first_name": "[&2].&1.First_Name",
          "last_name": "[&2].&1.Last_Name"
        }
      }
    }
  }
]

Nifi JoltTransformJSON : Keeping the underscore sign in key name


Tag : development , By : Brian Cupps
Date : March 29 2020, 07:55 AM
hope this fix your issue I think the underscore might be some kind of special character in that operator, try double-backslashes in front of _Source:
[
  {
    "operation": "shift",
    "spec": {
      "user_name": "userName"
    }
        },
  {
    "operation": "modify-overwrite-beta",
    "spec": {
      "\\_Source": {
        "userName": "@(2,userName)"
      }
    }
         },
  {
    "operation": "remove",
    "spec": {
      "userName": ""
    }
  }
]

JoltTransformJSON processor in NiFi


Tag : json , By : evegter
Date : March 29 2020, 07:55 AM
seems to work fine Input: , Try below example:
[
  {
    "operation": "shift",
    "spec": {
      "table": {
        // table items
        "*": {
          // internal object in item under "_id" key
          "*": "table[]"
        }
      }
    }
  }
]

NiFi JoltTransformJSON


Tag : development , By : ezzze
Date : March 29 2020, 07:55 AM

Apache NiFi JoltTransformJSON processor attribute as jolt spec


Tag : development , By : Sanoran
Date : March 29 2020, 07:55 AM
Any of those help Jolt Specification supports NiFi Expression Language but only for substituting the values inside the spec. That is:
Say you have a NiFi attribute : jolt.operation: shift you can refer that inside your spec as:
[
    {
        "operation" : ${jolt.operation},
        ...
        ...
    }
]
Related Posts Related QUESTIONS :
  • Spark How to get number of Keys changed in two JSONS in Scala?
  • Break JSON in pager "less"
  • How to filter Map in Flutter?
  • Convert hashmap to simple object in Groovy
  • Not extracting json properly using json4s
  • How do I display JSON data in my tableView when objects have the same value?
  • Where I can parse IoT data in Azure so I can afterwards save it to SQL DB
  • How to unmarshal this json string
  • What's wrong with my JSON?
  • JSON parsing problem in BlackBerry
  • GWT: How can I use JsonpRequestBuilder to handle a Json response of a list
  • JSON feed to Java Object
  • json character encoding problem
  • JSON Loading Speed Optimization: Use online API vs. create my own API based on that?
  • How can I access some JSON documents from my AWS lambda function?
  • How to extract multiple correlating variables from a JSon
  • Schema/Resolve for nested objects graphql/mongoose
  • Dynamics 365 opportunity EntityType processid and stagename error
  • How to convert dataframe output to json format and then Normalize the data?
  • In Angular, how do I avoid a "Property 'json' does not exist on type 'Object'" error?
  • Python giving vague error when trying to parse JSON object
  • Invalid JSON literal: xxx when calling ASMX service from Angular8
  • How to write the data converted from json to csv without skipping the rows
  • Unpacking JSON Into Flat Format
  • TypeError: items is undefined while reading a json using fetch in reactjs
  • How to insert date to the web path api
  • schema validation get value from sum of another value of json
  • Deleting a field in nested objects in JQ
  • Get multiple JSON keypair values within a JSON object only if a specific keypair value matches iterable
  • parse contents from returned json to el-dropdown-item
  • Replace content by key in JSON
  • JSON parsing using String Condition with JMESPATH
  • Only Output Rule Alerts to Suricata EVE
  • How to unmarshal a json string with a hyphen in key to a struct?
  • How can I aggregate sub-values into arrays with jq?
  • How to parse JSON array in Flutter with length of one?
  • Python: Combine multiple lists into one JSON array
  • jq - parsing complex JSON into a string
  • Json array elements duplication using jolt
  • How to read multiple json files
  • How to configure different levels for different appenders but under same logger in logback
  • How to skip text at the beginning of a json file in python
  • Value of type 'Type' has no subscripts Error Swift
  • Map mongo aggregation result to array
  • How to convert Matrix HTML to JSON in Typescript (for sending through api)
  • jsonschema - oneOf keyword behaves unexpectedly
  • Match password efficiently in Spring Boot - JPA
  • Import ndjson into elasticsearch 7.2 by command line
  • Extract inner field value from JSON document based on a key using jq
  • How can I decode a nested array of multiple types?
  • How to stop JSON Path returning object
  • How do I Parse from Multiple JSON files in Roku Scenegraph (brightscript)?
  • anyOf in OAS 3.0 for requestBody that is url encoded form data does not render obvious inputs in swagger UI
  • make requestBody fields optional in swaggerUI
  • Linkedin API: How to activate r_basicprofile as a permission?
  • Writing a given sequence of int's as an array of hex values in Jackson
  • find and delete nested json object in Go
  • Using Postman to test API, where is the Postman call?
  • Since Spark 2.3, the queries from raw JSON/CSV files are disallowed when the referenced columns only include the interna
  • Cannot match integer value using regex - error (at <stdin>:6): number not a string or array
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com