Skip to content

Simple sesam source that fetch CVS file from CIFS share

Notifications You must be signed in to change notification settings

timurgen/sesam-cifs-cvs-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sesam-cifs-cvs-reader

Build Status

Simple sesam source that fetch CVS file from CIFS share

System set up

{
  "_id": "<id>",
  "type": "system:microservice",
  "docker": {
    "environment": {
      "host": "<hostip>",
      "hostname": "<name returned by hostname command on host>",
      "password": "<password>",
      "share": "<share name>",
      "username": "<username>"
    },
    "image": "ohuenno/python-cifs-test",
    "port": 8080
  },
  "verify_ssl": true
}

Pipe set up

{
  "_id": "<id>",
  "type": "pipe",
  "source": {
    "type": "json",
    "system": "<system id>",
    "url": "/use_current_date_filename"
  },
  "transform": {
    "type": "dtl",
    "rules": {
      "default": [
        ["add", "_id",
          ["string",
            ["concat", "_S.maalepunkt", "-", "_S.netteigarmaalarid", "-", "_S.installasjonsid"]
          ]
        ],
        ["copy", "*"]
      ]
    }
  },
  "pump": {
    "cron_expression": "0 7 * * ?"
  }
}

Pipe set up with headers as URL parameters

{
  "_id": "<id>",
  "type": "pipe",
  "source": {
    "type": "json",
    "system": "<system id>",
    "url": "/some-file.csv?headers=header1,header2,header3"
  },
  "transform": {
    "type": "dtl",
    "rules": {
      "default": [
        ["add", "_id",
          ["string",
            ["concat", "_S.header1", "-", "_S.header2", "-", "_S.header3"]
          ]
        ],
        ["copy", "*"]
      ]
    }
  },
  "pump": {
    "cron_expression": "0 7 * * ?"
  }
}

About

Simple sesam source that fetch CVS file from CIFS share

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published