Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
dynamodb has data - testing
Browse files Browse the repository at this point in the history
  • Loading branch information
vggonzal authored and vggonzal committed Aug 16, 2023
1 parent 7c3af19 commit 6d84224
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion hydrocronapi/controllers/db/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ def get_reach_series_by_feature_id(feature_id: str, start_time: datetime, end_ti
response = dynamodb.get_item(
TableName=table_name,
Key={
'feature_id': {'S': '71224100223'}
'feature_id': {'S': feature_id}
}
)
print("get_item")
print(response)
return response


Expand Down
4 changes: 2 additions & 2 deletions hydrocronapi/controllers/timeseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def format_json(results: Generator, feature_id, elapsed_time):
"""
# Fetch all results
results = results['Items']
#results = results['Items']

data = {}

Expand All @@ -90,7 +90,7 @@ def format_json(results: Generator, feature_id, elapsed_time):
i = 0

for res in results:
if res['reach_id'] == feature_id and res['feature_time'] != '-999999999999': # and (res['width'] != '-999999999999')):
if res['feature_id'] == feature_id and res['feature_time'] != '-999999999999': # and (res['width'] != '-999999999999')):
feature = {'properties': {}, 'geometry': {}, 'type': "Feature"}
feature['geometry']['coordinates'] = []
feature_type = ''
Expand Down

0 comments on commit 6d84224

Please sign in to comment.