Sunday, June 30, 2019

doc


1.       INTRODUCTION

This Document Describes the historical loading process of payments files. Historical payments load process  automated using shell and python scripts


2.       PROCESS FLOW
Payments loading process is a two-step process in general
1.       Standardization
2.       SAS Loading
     Standardization :
It’s a process of converting payments files into parquet files and applying pre check evaluation that is required to process any payment file. Pre checks are carried out using Unix Scripts and parquet file creation is done by spark code.  
   SAS Loading:
SAS Load is the loading of  parquet file to SAS_ALL_PAYMENT  using spark code.
This automated Payment loading is also two-step process as mentioned above.
                                                                                                                                                                           
3.       SCRIPT DETAILS

Sunday, June 16, 2019

Py count thread

import threading
import time


class mythread(threading.Thread):
    def __init__(self, i):
        threading.Thread.__init__(self)
        self.h = i
        # Script will call the function
    def run(self):
        time.sleep(1)
        print("Value send ", self.h)


f = open('C:\Senthil\SenStudy\Python\Date.txt').readlines()
num = threading.activeCount()
x=2for i in f:
    print("Active threads are ", num)
    time.sleep(1)
    if x <= 3:
        thread1 = mythread(i)
        thread1.start()
        x += 1
    else:
        print("Number of Threads are More than 5 .. going to sleep state for 1 mint ..." , threading.activeCount())
        time.sleep(1)