Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

transformer-js

  • Clone with SSH
  • Clone with HTTPS
  • Meiners, Fritz's avatar
    Meiners, Fritz authored
    e4695bf7
    History

    transforming js

    Microservice for transforming data in a pipe.

    The service is based on the piveau-pipe-connector library. Any configuration applicable for the pipe-connector can also be used for this service.

    Table of Contents

    1. Build
    2. Run
    3. Configuration
      1. Pipe
      2. Environment
    4. License

    Build

    Requirements:

    • Git
    • Docker
    $ git clone <repo-uri>
    $ cd <repo>
    $ docker build -t piveau/<service-name> .

    Run

    $ docker run -it -p 8080:8080 piveau/<service-name>

    Configuration

    Pipe

    The transformer can be configured through the config object as part of the segment body of the pipe. It allows the configuration of either embedding the script directly in the config object or passing a reference to a git repository:

    mandatory

    • scriptType

      • embedded Field script contains the scripts directly.
      • localFile Field path points to a local file inside the scripts folder containing the script.
      • repository Field path points to the file containing the script in Git.

    Example:

    {
      "scriptType": "repository",
      "path": "path/in/git"
    }

    Environment

    Variable Description Default Value
    PIVEAU_PIPE_ENDPOINT_PORT Port at which the service accepts requests. 8080
    GIT_URI The Git repository URL -
    GIT_USER_NAME The Git user name -
    GIT_TOKEN The Git access token -
    GIT_BRANCH The default branch to use when not specified in the pipe configuration master

    License

    Apache License, Version 2.0