We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58cf2b2 commit 48093d5Copy full SHA for 48093d5
cdk/data_ingestion/src/main.py
@@ -67,7 +67,7 @@ def parse_s3_file_path(document_key):
67
# Assuming the file path is of the format: {category_id}/{document_name}.{document_type}
68
try:
69
category_id, documentname_with_ext = document_key.split('/')
70
- document_name, document_type = documentname_with_ext.split('.')
+ document_name, document_type = documentname_with_ext.rsplit('.', 1) # Split on the last period
71
return category_id, document_name, document_type
72
except Exception as e:
73
logger.error(f"Error parsing S3 document path: {e}")
0 commit comments