PHP code example of carmelosantana / coqui-toolkit-apache-nifi

1. Go to this page and download the library: Download carmelosantana/coqui-toolkit-apache-nifi library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

carmelosantana / coqui-toolkit-apache-nifi example snippets


use CoquiBot\NiFiPipelines\Pipeline;

$pipeline = Pipeline::create('CSV Ingestion')
    ->addProcessor('fetch', 'org.apache.nifi.processors.standard.GetSFTP', [
        'Hostname' => '#{sftp_host}',
        'Remote Path' => '/data/incoming',
    ])
    ->addProcessor('parse', 'org.apache.nifi.processors.standard.ConvertRecord')
    ->addProcessor('store', 'org.apache.nifi.processors.standard.PutDatabaseRecord', [
        'Table Name' => 'inventory',
    ])
    ->connect('fetch', 'parse', ['success'])
    ->connect('parse', 'store', ['success'])
    ->build();