Ahh, it appears the functionality is there. Its just that the README file hasnt been updated,

Theres now a transform-nifi command in addition to the transform-yml command.


On 6/1/2025 2:59 pm, Robert Cohen wrote:
[You don't often get email from robert.co...@anu.edu.au.invalid. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

I had a look at the minifi toolkit.

However, it only appears to contain functionality for converting legacy
minifi config to minifi 2 config

Heres an excerpt from  the minifi-tookit 2.1.0 README file

      Valid commands include:
      transform-yml: Transforms legacy MiNiFi flow config YAML into
MiNiFi flow config JSON

## Example
- You have an older version of MiNiFi located in <legacy_minifi_directory>.
- You would like upgrade to the latest version of MiNiFi. You downloaded
and extracted the latest MiNiFi into <latest_minifi_directory>.
- Run the following command to migrate the flow and the bootstrap config
```
./config.sh transform-yml <legacy_minifi_directory>/conf/config.yml
<legacy_minifi_directory>/conf/bootstrap.conf
<latest_minifi_directory>/conf/flow.json.raw
<latest_minifi_directory>/conf/bootstrap.conf
```


Is there functionality somewhere to convert a nifi 2.x flow file to a
minifi 2 flow file,


On 12/12/2024 6:48 pm, Kedvessy Péter wrote:
[You don't often get email from pkedve...@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hi Robert,

Seems like the documentation has not been updated. I'm going to file a JIRA
ticket to apply doc update about how we can import NiFi 2 exported flow
files into MiNiFi.
In a nutshell: before moving the json file into minifi, we should convert
it with minifi toolkit. Related ticket for more details:
https://issues.apache.org/jira/browse/NIFI-12644

Regards,
Peter

Robert Cohen <robert.co...@anu.edu.au.invalid> ezt írta (időpont: 2024.
dec. 12., Cs, 2:11):

Im having trouble getting code into minifi 2 from nifi 2.

The documentation here

https://github.com/apache/nifi/blob/main/minifi/minifi-docs/src/main/markdown/minifi-java-agent-quick-start.md

says

# Export the dataflow in JSON format.
# Move your new .json file to |minifi/conf|.
# Rename your .json file /flow.json.raw/.


Im using the option in nifi to "download flow definition"

However when I load that into minifi, I get an error message.

java.lang.Exception: Unable to load flow due to:
org.apache.nifi.controller.serialization.FlowSerializationException:
Could not parse flow as a VersionedDataflow


When I compare the file to the dummy flow file that ships with minifi.

The file that ships with minifi starts with

{
    "encodingVersion": {
      "majorVersion": 2,
      "minorVersion": 0
    },


But the export from nifi has

{"flowContents":{"identifier":"a2ac574c-635d-3df5-baf0-6cbf4dd5bdec",


So the 2 files dont appear to be the same format.

Is there some other method of exporting code from nifi that Im missing?


Reply via email to