diff --git a/internal/s3events/handler.go b/internal/s3events/handler.go index fd37b67..3228fe7 100644 --- a/internal/s3events/handler.go +++ b/internal/s3events/handler.go @@ -62,7 +62,7 @@ func (h *Handler) processCreated(ctx context.Context, created *s3created.ObjectC } // at the moment we skip snapshot manifests - if manifestPeriod.Snapshot == "" { + if manifestPeriod.Snapshot != "" { log.Ctx(ctx).Info().Str("object", created.Object.Key).Msg("skipped file as it is a snapshot manifest") return []byte(`{"msg": "skipped"}`), nil } @@ -93,7 +93,7 @@ func (h *Handler) processCreated(ctx context.Context, created *s3created.ObjectC // update the hive structure for athena - key := fmt.Sprintf("%s/year=%d/month=%d,day=%d/symlink.txt", manifestPeriod.Prefix, startDate.Year(), startDate.Month(), startDate.Day()) + key := fmt.Sprintf("hive/year=%d/month=%d/symlink.txt", startDate.Year(), startDate.Month()) buf := bytes.NewBufferString(strings.Join(manifest.ReportKeys, "\n")) diff --git a/test.txt b/test.txt deleted file mode 100644 index e69de29..0000000