Skip to content

Commit fca19f4

Browse files
Fix opensearch mapping update error (#2195)
Co-authored-by: jaidisido <[email protected]>
1 parent 68e0470 commit fca19f4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/unit/test_opensearch.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff 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")

0 commit comments

Comments
 (0)