File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed
lambdas/csv_to_glue_catalog Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -152,16 +152,13 @@ def create_glue_table(
152152 logger .info (f"Table { table_name } does not exist, creating new one" )
153153 except Exception as e :
154154 logger .warning (f"Error checking/deleting table { table_name } : { e } " )
155- # Continue to create table anyway
156155
157156 # Extract directory path from S3 key
158157 # For s3://bucket/parking/user/file.csv, we want s3://bucket/parking/user/
159- # This allows the table to read the CSV file directly
160158 s3_path_parts = s3_key .rsplit ("/" , 1 )
161159 s3_directory = f"{ s3_path_parts [0 ]} /" if len (s3_path_parts ) > 1 else ""
162160
163161 # Create new table pointing to the user's directory
164- # Since each CSV file is in its own user directory, this works correctly
165162 table_input = {
166163 "Name" : table_name ,
167164 "StorageDescriptor" : {
@@ -272,10 +269,6 @@ def handle_s3_event(event, context):
272269
273270
274271def lambda_handler (event , context ):
275- """
276- Lambda handler entry point.
277- Includes retry logic via Lambda's built-in retry mechanism.
278- """
279272 try :
280273 handle_s3_event (event , context )
281274 return {
You can’t perform that action at this time.
0 commit comments