Exporting and importing Oozie workflows directly from the UI

Exporting and importing Oozie workflows directly from the UI

Until now Hue did not have a good way to backup or transfer workflows between servers. A command was added in Hue 3.8 but its usage was still advanced.

In Hue 3.9, the command is directly integrated in the UI.

 

import-export-documents

Note that this export/import interface will be generic in Hue 4 and will support any document or script like Hive, Pig. In addition to exporting the Hue json document, sql or workflow.xml files will be included in the export.

Future improvements will make it easier to change the owner of the workflows without having to edit the json file manually.

 

So it is time to build even more workflows! Feel free to comment on the hue-user list or @gethue!

23 Comments

  1. MYao 3 years ago

    Sounds great. Unfortunately the latest CDH 5.4.5 is only up to Hue 3.7.0 – when will 3.9 be included?

    • Hue Team 3 years ago

      3.9 will be in CDH 5.5!

      (and FYI CDH5.4 actually has the same content as Hue 3.8)

  2. Miles Y. 3 years ago

    Thanks. Now, the video suggests that the export is only for the workflow XML. How about all the dependent files used by the workflow – scripts, JARs, properties and data files, etc.? Wouldn’t it be more intuitive to just package up the workflow directory and download to local (similar to CM export of client config files)?

    Also, a command-line version would be helpful for software release managers to integrate into existing enterprise develop-test-build-deploy processes.

    • Hue Team 3 years ago

      These are good points, will add to the list. In a closer short term, we plan to have the workflow scripts coming directly from the query editor.

  3. Chenna Venkatasubbaiah 3 years ago

    Good improvements. But it allows to import only JSON files. We have many oozie flows in workflow.xml format and there is no option to import xml

    Any workarounds?

    thanks
    Chenna

    • Hue Team 3 years ago

      There is no way to import workflow.xml currently, this feature required to much time and is not implemented yet.

  4. Tom 2 years ago

    Can I export workflows from HUE 3.8.1 and then import to 3.9?

    • Hue Team 2 years ago

      Yes it should work

  5. Emmanuel 2 years ago

    Do you plan to have those import/export functions in an API? Or some CLI or routines to do it programmatically.

    • Author
      Hue Team 2 years ago

      Not now, but you could do some curls, POST calls or use the Django Python shell to access those.

  6. Steve 2 years ago

    Hey, how would we approach using some curls, POST calls, or Django Python shell to access those?

  7. Debjani Das 2 years ago

    is it possible programmatically from java or the command prompt you have suggested to import external workflow.xml definitions in Hue and edit plus manage using Hue Editor?

  8. Marcos 2 years ago

    Hi, is there any way to create/build your own json workflow and then import from Hue GUI? I’ve tried to do that, but there are a lot of things in the json exported file that I cannot understand. Is there any document which explain the parts that make up the json workflow file?
    Cheers

    • Author
      Hue Team 2 years ago

      This is not very documented and designed to be from Hue only currently. We are planning to add a clean REST API to allow the creation of workflows instead: https://issues.cloudera.org/browse/HUE-5409

      Would that interest you?

  9. Karel 11 months ago

    Hi, great feature! If only I could import JSON that I create by myself. Now we’ll be creating 200+ workflows that follow pretty much the same pattern, so I’d like to generate them with some script and than mass- import it in Hue (plus there are DEV,PRE and PRO environments). That would also ease future maintenance of the WFs.

    • Author
      Hue Team 11 months ago

      Can’t you try to generate the json Hue understands? (this is the same format used by Django)

  10. Sergio 11 months ago

    Hey guys! There is no xml support 🙁 ?

    • Author
      Hue Team 11 months ago

      Only export to XML currently.

  11. Harpreet 1 month ago

    Hi,
    Do we have UI functionality with import export of oozie workflows now. This seems to be requirement from 3 years. Which version will have it ?

    Regards
    Harpreet

    • Author
      Hue Team 1 month ago

      “In Hue 3.9, the command is directly integrated in the UI.” cf. the second line

Leave a reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.