File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,11 @@ def test_index_csv_local(client):
462462 file_path = f"{ tempfile .gettempdir ()} /inspections.csv"
463463 index = f"test_index_csv_local_{ _get_unique_suffix ()} "
464464 try :
465+ wr .opensearch .create_index (
466+ client = client ,
467+ index = index ,
468+ mappings = {"properties" : {"business_phone_number" : {"type" : "text" }}},
469+ )
465470 df = pd .DataFrame (inspections_documents )
466471 df .to_csv (file_path , index = False )
467472 response = wr .opensearch .index_csv (client , path = file_path , index = index )
@@ -474,6 +479,11 @@ def test_index_csv_s3(client, path):
474479 file_path = f"{ tempfile .gettempdir ()} /inspections.csv"
475480 index = f"test_index_csv_s3_{ _get_unique_suffix ()} "
476481 try :
482+ wr .opensearch .create_index (
483+ client = client ,
484+ index = index ,
485+ mappings = {"properties" : {"business_phone_number" : {"type" : "text" }}},
486+ )
477487 df = pd .DataFrame (inspections_documents )
478488 df .to_csv (file_path , index = False )
479489 s3 = boto3 .client ("s3" )
You can’t perform that action at this time.
0 commit comments