Giter Club home page Giter Club logo

filepublication.file.distribution.tools's Introduction

File Distribution Tools

File Publication Tool (Python)

This tool is used for File Distribution Publisher publishing a file into File Distribution system. The picture below will show you what this tool does when you execute it on your local machine.

Prerequisites

File Publication Tool requires python v3.8.8 to run. Install the python and python libraries and start the run script

  1. Install Python v3.8.8
  2. Run command to install python libraries
python -m pip install -r requirements.txt
  1. Prepare your bucket and package in File Distribution

  2. Go to folder name file_dist_tools and open file golbal.ini and specify all information

    4.1 [RDP] section specify your RDP credentials (If you don't know information please contact https://developers.refinitiv.com)

    4.2 [CFS_GLOBAL] section specify your bucketName and packageId

Field name Description Example
bucketName Required This is a virtual bucket, similar to S3 buckets/folders. myBucket
packageName Required Package ID that associated with bulk package ID 4fa7-3bea-c36e534c-8105-a203c69568d9
contentFrom Optional Earliest date/time of the content within the file. 2022-03-20T11:47:11Z
contentTo Optional Latest date/time of the content within the file. 2022-12-25T11:47:11Z
attributes Optional Custom file attributes that can be used for query filters if indexed. name=value,DayOfWeek=4,Product=CFS
  1. Run Program please check Tool Description section

Tools Description

  1. Help command or see Help Command Description
python3 publishFile.py -h 
  1. Publish a single file
python publishFile.py -fs <file-set name> -fn <file name> -s3url <s3url>

Example:

python publishFile.py -fs MyFileSetName -fn ExampleFile -s3url https://s3.amazonaws.com/bucket/ExampleFile.csv

Note: This command publish a file with required arguments only, you see more argument and command description in [Help Command Description]

  1. Publish a single file with full detail
python publishFile.py -fs <file-set name> -fn <file name> -s3url <s3url> -a <attributes> -cf <content from> -ct <content to> -af <available from> -at <available to> -fd <file description> -sb <file size in bytes>

Example:

python publishFile.py -fs MyFileSetName -fn ExampleFile -s3url https://s3.amazonaws.com/bucket/ExampleFile.csv -a example=publish,product=publishtools,extra=fulloptions -cf "2022-03-20T11:47:11Z" -ct "2032-03-20T11:47:11Z" -af "2022-03-21T11:47:11Z" -at "2023-03-21T11:47:11Z" -fd "Example Description" -sb 999

Note: This command publish a file with required and optional arguments, you see more argument and command description in [Help Command Description]

  1. Publish a single file with file access role arn
python publishFile.py -fs <file-set name> -fn <file name> -s3url <s3url> -rn <rolearn>

Example:

python publishFile.py -fs MyFileSetName -fn ExampleFile -s3url https://s3.amazonaws.com/bucket/ExampleFile.csv -rn arn:aws:iam::123456789012:role/EdsCfsS3Access_role

Note: Please reference ROLE-Based permission section of CFS User Guide for detail of rolearn usage

  1. Publish multiple files
python publishFile.py -c config.ini

Note: config.ini, currently this tools support maximum 10 files.

Help Command Description

Full Arguments Arguments Field name Type Description Example
--filesetname -fs filesetName Required User-friendly name for this file set. Must be unique within the associated Bucket. Limitation: minLength: 1, maxLength: 256 myfilesetname
--filename -fn fileName Required Name of the file including the path Limitation: minLength: 1, maxLength: 256 my-file
--s3url -s3url s3url Required The AWS Encoded S3 Object URL to the associated File https://s3.amazonaws.com/bucket/key.json
--rolearn -rn roleArn Optional The IAM Role arn to allow S3 File access for CFS arn:aws:iam::1234567890123:role/EdsCfsS3AccessRole
--attributes -a attributes Optional Custom file attributes that can be used for query filters if indexed. name=value,DayOfWeek=4,Product=CFS
--contentfrom -cf contentFrom Optional Earliest date/time of the content within the file. 2022-03-20T11:47:11Z
--contentto -ct contentTo Optional Latest date/time of the content within the file. 2032-03-20T11:47:11Z
--availablefrom -af availableFrom Optional The date/time the content becomes available for customers. Future dates are supported. 2022-03-21T11:47:11Z
--availableto -at availableTo Optional The date/time the content will no longer be available for customers. 2023-03-21T11:47:11Z
--description -fd description Optional Description of the file and it's contents. File Publication from example tools
--filesizeinbytes -sb fileSizeInBytes Optional File size in bytes. 999

filepublication.file.distribution.tools's People

Contributors

jirapongse-refinitiv avatar pugkung avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.