Begin implementing Apache Druid

This commit is contained in:
2022-09-08 07:20:30 +01:00
parent 0eb4a04b89
commit fd90c233c2
3 changed files with 198 additions and 33 deletions

12
db.py
View File

@@ -72,7 +72,8 @@ def store_message(msg):
# print(body_post)
try:
# Bulk index operations
api_response = api_instance.bulk(body_post) # , async_req=True
print("FAKE POST")
#api_response = api_instance.bulk(body_post) # , async_req=True
# print(api_response)
except ApiException as e:
print("Exception when calling IndexApi->bulk: %s\n" % e)
@@ -124,8 +125,9 @@ def store_message_bulk(data):
# print(body_post)
try:
# Bulk index operations
api_response = api_instance.bulk(body_post) # , async_req=True
print(api_response)
print("FAKE POST")
#api_response = api_instance.bulk(body_post) # , async_req=True
#print(api_response)
except ApiException as e:
print("Exception when calling IndexApi->bulk: %s\n" % e)
print("ATTEMPT", body_post)
@@ -152,5 +154,5 @@ def create_index(api_client):
util_instance.sql(create_query)
create_index(api_client)
update_schema()
#create_index(api_client)
#update_schema()