Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for FieldHistoryArchive #101

Merged
merged 1 commit into from Mar 22, 2021

Conversation

luandy64
Copy link
Contributor

Long commit message

The tap encountered

BIG_OBJECT_UNSUPPORTED_OPERATION: Filters may not have any gaps within the composite key

The current shape of the WHERE + ORDER BY clauses:

WHERE replication_key >= some_date ORDER BY replication_key ASC

But FieldHistoryArchive seems to need something along these lines (note
CreatedDate is the replication key)

WHERE FieldHistoryType = 'ACCOUNT'
WHERE FieldHistoryType = 'ACCOUNT' AND CreatedDate >= 2020-01-01T00:00:00Z
WHERE FieldHistoryType = 'ACCOUNT' AND CreatedDate >= 2019-01-01T00:00:00Z
ORDER BY FieldHistoryType ASC, CreatedDate DESC
  • Note the DESC here

Description of change

This PR adds FieldHistoryArchive to the list of streams we don't support because it needs a different WHERE clause than the one we generate.

QA steps

  • automated tests passing
  • manual qa steps passing (list below)
    • Ran the tap with and without this commit, verifying that FieldHistoryArchive does not show up in the catalog with this commit

Risks

  • Does removing support for a stream count as a breaking change? Maybe not in this case because it was never working for anyone

Rollback steps

  • revert this branch

The tap encountered `InvalidBatch: Failed to process query:
BIG_OBJECT_UNSUPPORTED_OPERATION: Filters may not have any gaps within the
composite key` for this stream.

The current shape of the WHERE + ORDER BY clauses:

```
WHERE replication_key >= some_date ORDER BY replication_key ASC
```

But `FieldHistoryArchive` seems to need something along these lines (note
CreatedDate is the replication key)

```
WHERE FieldHistoryType = 'ACCOUNT'
```

```
WHERE FieldHistoryType = 'ACCOUNT' AND CreatedDate >= 2020-01-01T00:00:00Z
```

```
WHERE FieldHistoryType = 'ACCOUNT' AND CreatedDate >= 2019-01-01T00:00:00Z
ORDER BY FieldHistoryType ASC, CreatedDate DESC
```
- Note the `DESC` here
@luandy64 luandy64 merged commit 98c019a into master Mar 22, 2021
@luandy64 luandy64 deleted the unsupport-field-history-archive branch March 22, 2021 18:51
@luandy64 luandy64 mentioned this pull request Mar 22, 2021
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants