From f4b2705d7c7f4444b8069afdcc035c2cb6459db3 Mon Sep 17 00:00:00 2001 From: Tzach Shabtay Date: Mon, 1 Aug 2022 12:31:27 -0400 Subject: [PATCH 1/2] Fix uploaded records to ignore header --- aws_s3--0.0.1.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aws_s3--0.0.1.sql b/aws_s3--0.0.1.sql index 93ee6d0..e284954 100644 --- a/aws_s3--0.0.1.sql +++ b/aws_s3--0.0.1.sql @@ -219,6 +219,8 @@ AS $$ size += len(buffer) fd.seek(0) s3.upload_fileobj(fd, bucket, file_path) + if 'HEADER TRUE' in options.upper(): + num_lines -= 1 yield (num_lines, 1, size) $$; From 47ee35614aee778bd30836a2f9036fa9bf7498cf Mon Sep 17 00:00:00 2001 From: Tzach Shabtay Date: Mon, 1 Aug 2022 13:24:06 -0400 Subject: [PATCH 2/2] fix tabs/spaces --- aws_s3--0.0.1.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws_s3--0.0.1.sql b/aws_s3--0.0.1.sql index e284954..cf2ddc3 100644 --- a/aws_s3--0.0.1.sql +++ b/aws_s3--0.0.1.sql @@ -219,8 +219,8 @@ AS $$ size += len(buffer) fd.seek(0) s3.upload_fileobj(fd, bucket, file_path) - if 'HEADER TRUE' in options.upper(): - num_lines -= 1 + if 'HEADER TRUE' in options.upper(): + num_lines -= 1 yield (num_lines, 1, size) $$;