Skip to content

Commit 6597e3c

Browse files
committed
Remove approx ddb timestamp.
1 parent d37c36f commit 6597e3c

File tree

3 files changed

+1
-15
lines changed

3 files changed

+1
-15
lines changed

src/from/dynamodb.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ export const fromDynamodb = (event, {
3535
type: `${calculateEventTypePrefix(record, { skFn, discriminatorFn, eventTypePrefix })}-${calculateEventTypeSuffix(record)}`,
3636
partitionKey: record.dynamodb.Keys[pkFn].S,
3737
timestamp: deriveTimestamp(record),
38-
approximateCreationTimestamp: ddbApproximateCreationTimestamp(record),
3938
tags: {
4039
region: record.awsRegion,
4140
},
@@ -92,7 +91,7 @@ const calculateEventTypeSuffix = (record) => {
9291
const deriveTimestamp = (record) =>
9392
parseInt(record.dynamodb.NewImage?.timestamp?.N, 10) || ddbApproximateCreationTimestamp(record);
9493

95-
const ddbApproximateCreationTimestamp = (record) => record.dynamodb.ApproximateCreationDateTime * 1000;
94+
export const ddbApproximateCreationTimestamp = (record) => record.dynamodb.ApproximateCreationDateTime * 1000;
9695

9796
//--------------------------------------------
9897
// global table support - version: 2017.11.29

test/unit/from/dynamodb.test.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ describe('from/dynamodb.js', () => {
9393
type: 'thing-created',
9494
partitionKey: '1',
9595
timestamp: 1572832690000,
96-
approximateCreationTimestamp: 1572832690000,
9796
tags: {
9897
region: 'us-west-2',
9998
},
@@ -203,7 +202,6 @@ describe('from/dynamodb.js', () => {
203202
type: 'thing-created',
204203
partitionKey: '1',
205204
timestamp: 1572832690001,
206-
approximateCreationTimestamp: 1572832690000,
207205
tags: {
208206
region: 'us-west-2',
209207
},
@@ -340,7 +338,6 @@ describe('from/dynamodb.js', () => {
340338
type: 'thing-updated',
341339
partitionKey: '1',
342340
timestamp: 1572832690000,
343-
approximateCreationTimestamp: 1572832690000,
344341
tags: {
345342
region: 'us-west-2',
346343
},
@@ -447,7 +444,6 @@ describe('from/dynamodb.js', () => {
447444
type: 'thing-deleted',
448445
partitionKey: '1',
449446
timestamp: 1572832690000,
450-
approximateCreationTimestamp: 1572832690000,
451447
tags: {
452448
region: 'us-west-2',
453449
},
@@ -557,7 +553,6 @@ describe('from/dynamodb.js', () => {
557553
type: 'thing-deleted',
558554
partitionKey: '1',
559555
timestamp: 1572832690000,
560-
approximateCreationTimestamp: 1572832690000,
561556
tags: {
562557
region: 'us-west-2',
563558
},
@@ -682,7 +677,6 @@ describe('from/dynamodb.js', () => {
682677
type: 'thing-undeleted',
683678
partitionKey: '1',
684679
timestamp: 1572832690000,
685-
approximateCreationTimestamp: 1572832690000,
686680
tags: {
687681
region: 'us-west-2',
688682
},
@@ -781,7 +775,6 @@ describe('from/dynamodb.js', () => {
781775
type: 'thing-deleted',
782776
partitionKey: '1',
783777
timestamp: 1573005490000,
784-
approximateCreationTimestamp: 1573005490000,
785778
tags: {
786779
region: 'us-west-2',
787780
},
@@ -959,7 +952,6 @@ describe('from/dynamodb.js', () => {
959952
type: 'thing-updated',
960953
partitionKey: '1',
961954
timestamp: 1572832690000,
962-
approximateCreationTimestamp: 1572832690000,
963955
tags: {
964956
region: 'us-west-2',
965957
},
@@ -1041,7 +1033,6 @@ describe('from/dynamodb.js', () => {
10411033
type: 'thing-updated',
10421034
partitionKey: '1',
10431035
timestamp: 1572832990000,
1044-
approximateCreationTimestamp: 1572832990000,
10451036
tags: {
10461037
region: 'us-east-1',
10471038
},

test/unit/utils/encryption.test.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ describe('utils/encryption.js', () => {
6262
type: 'thing-created',
6363
partitionKey: '1',
6464
timestamp: 1572832690000,
65-
approximateCreationTimestamp: 1572832690000,
6665
tags: {
6766
region: 'us-west-2',
6867
},
@@ -395,7 +394,6 @@ describe('utils/encryption.js', () => {
395394
type: 'thing-created',
396395
partitionKey: '1',
397396
timestamp: 1572832690000,
398-
approximateCreationTimestamp: 1572832690000,
399397
tags: {
400398
region: 'us-west-2',
401399
},
@@ -477,7 +475,6 @@ describe('utils/encryption.js', () => {
477475
type: 'thing-updated',
478476
partitionKey: '1',
479477
timestamp: 1572832690000,
480-
approximateCreationTimestamp: 1572832690000,
481478
tags: {
482479
region: 'us-west-2',
483480
},
@@ -548,7 +545,6 @@ describe('utils/encryption.js', () => {
548545
type: 'thing-deleted',
549546
partitionKey: '1',
550547
timestamp: 1572832690000,
551-
approximateCreationTimestamp: 1572832690000,
552548
tags: {
553549
region: 'us-west-2',
554550
},

0 commit comments

Comments
 (0)