Skip to content

Commit

Permalink
NiFi: updated ann_manager script.
Browse files Browse the repository at this point in the history
  • Loading branch information
vladd-bit committed Feb 20, 2024
1 parent 6caaaed commit ccc607c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nifi/user-scripts/annotation_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def main():
output_stream["content"].append(record)

elif OPERATION_MODE == "insert":
query = "INSERT INTO annotations (elasticsearch_id) VALUES (" + '"' + str(record["meta.docid"]) + "_" + str(record["nlp.id"]) + '"' + ")"
query = "INSERT INTO annotations (elasticsearch_id) VALUES (" + '"' + str(record["meta." + DOCUMENT_ID_FIELD_NAME]) + "_" + str(record["nlp.id"]) + '"' + ")"
result = connect_and_query(query, db_file_path, sql_script_mode=True)

if len(result) == 0:
Expand Down

0 comments on commit ccc607c

Please sign in to comment.