Giter Club home page Giter Club logo

nifi_sdk_ruby's Introduction

NifiSdkRuby

A RUBY SDK to use APACHE NIFI API.

See more at APACHE NIFI API.

https://rubygems.org/gems/nifi_sdk_ruby

Installation

Add this line to your application's Gemfile:

gem 'nifi_sdk_ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install nifi_sdk_ruby

Usage

Instanciate the client

require 'nifi_sdk_ruby'

nifi_client = Nifi.new()
nifi_client.set_debug true

Get Root's Process Group id

# Get Root Process Group
pg_root = nifi_client.get_process_group
puts "PG Root's ID"
puts pg_root['id']

Create new Process Group

new_pg = nifi_client.create_process_group(:name => 'test')
puts new_pg

Check if Process Group exists

puts nifi_client.process_group_by_name? test

Get all attrs a the Process Group by ID (PG Root's child)

puts  nifi_client.get_process_group(new_pg['id'])

Get all attrs a the Process Group by Name (Root's childs)

puts nifi_client.get_process_group_by_name 'test'

Delete some Process Group

puts nifi_client.delete_process_group(new_pg['id'])

Upload a template to Root Process Group

From file ...

puts nifi_client.upload_template(:path => 'IN.hmStaff.taskStatus.xml')

From url ...

puts nifi_client.upload_template(:path => 'https://your.domain.net/IN.hmStaff.taskStatus.xml')

Check if Process Group exists

puts nifi_client.template_by_name? test

Get all attrs of a template by Name (Root's childs)

t = nifi_client.get_template_group_by_name 'test'
puts t

Delete template

puts nifi_client.delete_template t['id']

Create template instance

By id

puts nifi_client.create_template_instance(:id => '43fwe1s-asd2-sdf3-sfq3ev')

Or by name

puts nifi_client.create_template_instance(:name => 'TemplateName')

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/icalvete/nifi_sdk_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Authors:

Israel Calvete Talavera [email protected]

nifi_sdk_ruby's People

Contributors

evge22 avatar icalvete avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.