Skip to content

Commit 4fb4e14

Browse files
author
Reijonen Pekka
committed
gitignore testing
1 parent 9a4869c commit 4fb4e14

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

,gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/__pycache__

pipeLine.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,18 @@ def getData():
2222
url = 'http://api.worldbank.org/v2/country/all/indicator/SP.POP.TOTL?format=json'
2323
response = requests.get(url) # task: mock this function. if applicable use with your own data source (URL)
2424
return response
25-
25+
26+
# example skeleton on handling data received to the pipeline
27+
# map is going through data set record by record and calling modification functions
28+
def dataHandlingMain(): # record : [2, 3, 1, "name"]
29+
dataset = getData()
30+
modifiedDataSet = list(map((mapHandlerFunction(recordWhatIsNext)), dataset))
31+
32+
# function to be used inside map to handle data record
33+
def mapHandlerFunction(record):
34+
# here we need to know columns, meaning fields in the record
35+
# record[0]
36+
2637

2738
if __name__ == '__main__':
2839
data = getData()

0 commit comments

Comments
 (0)