Skip to content

Commit

Permalink
modified lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
mimopa committed Mar 6, 2018
1 parent eb34449 commit f550cb6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"python.pythonPath": "C:\\Users\\msc\\Anaconda3\\envs\\env\\python.exe"
"python.pythonPath": "C:\\Users\\terauchi\\Anaconda3\\envs\\tensorflow\\python.exe",
"python.linting.enabled": false
}
59 changes: 59 additions & 0 deletions kibana/mapping_twitter.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
DELETE sensordata
DELETE tweet

PUT sensordata
{
"mappings": {
"sensordata_type": {
"properties": {
"at": {
"type": "date",
"format": "YYYY-MM-dd HH:mm:ss"
},
"farm_uuid": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"geometry": {
"properties": {
"coordinates": {
"type": "geo_point"
}
}
},
"id": {
"type": "float"
},
"latitude": {
"type": "float"
},
"longitude": {
"type": "float"
}
}
}
}
}

PUT tweet
{
"mappings": {
"tweet": {
"properties": {
"created_at": {
"type": "date",
"format": "YYYY-MM-dd HH:mm:ss"
},
"text" : {
"type" : "text"
}
}
}
}
}

4 changes: 4 additions & 0 deletions kibana/twitter_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"created_at": "2018-03-05 09:40:00",
"text": "’r‘Ü‚à‰J‚Ђǂ¢‚â‚ñ‚¯"
}
2 changes: 1 addition & 1 deletion lambda/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def make_EVS_request(params=None,root_dir=EVS_ROOT_URL):
params = {}
# POSTリクエスト作成(固定部分)
params['keep'] = 'true'
params['limit'] = 2000
params['limit'] = 500
params['format'] = 'JSON'
params['from'] = '2017-12-28 15:00:00 UTC'
params['to'] = '2018-03-31 23:10:00 UTC'
Expand Down

0 comments on commit f550cb6

Please sign in to comment.