Member since
12-01-2017
4
Posts
0
Kudos Received
0
Solutions
12-02-2017
03:42 PM
In this case, you have two different schemas, one for the input and one for the output. The one you list above is the output schema, but you will also need an input schema such as: {
"type": "record",
"name": "employeeInfo",
"fields": [
{ "name": "ID", "type": "long", "default": 0 },
{ "name": "Name", "type": "string", "default": "defaultName" },
{ "name": "Age", "type": ["null", "long"], "default": 0 },
{ "name": "JoinedOn", "type": "string", "default": "defaultDate" }
]
} Because your input and output schemas are not the same, ConvertRecord is not the right choice for this operation; the doc says "The Reader and Writer must be configured with "matching" schemas. By this, we mean the schemas must have the same field names". I believe you will need two UpdateRecords in a row: 1) Move the employee info from the top-level into the array (using a Replacement Value Strategy of "Record Path Value"), with an example user-defined property for the ID field having property name "/columns/ID" and value "/ID". 2) I'm not sure where you are getting your values for timestamp, database, and table_name, but you can probably set those with another UpdateRecord, this time with a Replacement Value Strategy of "Literal Value", possibly using Expression Language to get the values from flow file attributes ("/table_name" = "${table.name}" for example), or functions ("/timestamp" = "${now():toNumber()}" for example).
... View more
06-18-2019
12:24 PM
Hi @Pierre Villard , The GET request for /nifi-api/flow/process-groups/{id}/controller-services is returning all Controller Services, not only the ones for the Process Group {id}. Do you mean I need to parse the returned JSON and look only for the ones with parentGroupId = {id} ? Thanks in advance.
... View more
12-01-2017
11:39 AM
Docker image of hortonworks schema registry: https://hub.docker.com/r/thebookpeople/hortonworks-registry/
... View more