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

Refactored 7 more streams #72

Merged
merged 79 commits into from
Mar 22, 2022
Merged

Conversation

DownstreamDataTeam
Copy link
Contributor

Description of change

Refactored the following streams:

  • Communications
  • Deposit Transactions
  • Groups
  • Index Rate Sources
  • Installments
  • Loan Transactions
  • Tasks

Manual QA steps

  • Compared output before & after for each stream when extracting from a sandbox environment
  • Ran unit tests
  • Ran tap tester

Risks

Rollback steps

  • revert this branch

Radu Marinoiu and others added 30 commits February 14, 2022 09:05
Pull changes from Stitch

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!32
release/37 changes, squashed

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!37
…e/38'

[ECDDC-575] Refactor Clients stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!40
…ream'

# Conflicts:
#   tap_mambu/sync.py
#   tap_mambu/tap_mambu_refactor/main.py
…e/38'

[ECDDC-555] Refactor centres stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!39
…ream' into 'release/38'

[ECDDC-604] Added field "assigned_branch_key" to clients stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!42
… into 'release/38'

[ECDDC-607] Changed readme file to correct tap_config.json into config.json

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!44
…elease/38'

[ECDDC-601] Add code scanning with sonar

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!43
Radu Marinoiu and others added 18 commits March 15, 2022 09:54
…actions_stream'

# Conflicts:
#   tap_mambu/sync.py
…to 'release/39'

[ECDDC-589] Refactor loan transactions stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!57
…sources-stream

# Conflicts:
#	tap_mambu/sync.py
…nsactions

# Conflicts:
#	tap_mambu/sync.py
…release/39'

[ECDDC-584] Refactored deposit transactions stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!50
…-sources-stream'

# Conflicts:
#   tap_mambu/sync.py
#   tap_mambu/tap_mambu_refactor/main.py
…eam'

# Conflicts:
#   tap_mambu/sync.py
#   tap_mambu/tap_mambu_refactor/main.py
…nto 'release/39'

[ECDDC-586] Refactor index rate sources stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!51
…eam'

# Conflicts:
#   tap_mambu/sync.py
#   tap_mambu/tap_mambu_refactor/main.py
…/39'

[ECDDC-585] Refactored groups stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!53
…s-stream

# Conflicts:
#	tap_mambu/sync.py
#	tap_mambu/tap_mambu_refactor/main.py
…elease/39'

[ECDDC-587] Refactor installments stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!54
… generic so we can reuse it for any stream exhibiting this behaviour
[ECDDC-590] Refactored tasks stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!58
@cmerrick
Copy link
Contributor

Hi @DownstreamDataTeam, thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes.

…nto 'release/39'

[ECDDC-586] Bugfix for streams ignoring pagination (index_rate_sources), but more generic

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!59
@DownstreamDataTeam DownstreamDataTeam marked this pull request as ready for review March 16, 2022 07:49
Copy link
Contributor

@dmosorast dmosorast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @DownstreamDataTeam! The automatic fields test is failing for tasks when trying to get encoded_key from the record in the processor.

The rest of the tests passed so should this field be marked as "inclusion": "automatic"? Looks like the pk is listed as ID from discovery, so I'm not quite sure what the issue is here: whether the PK should be encoded_key, if the processor is looking for the wrong field, or if encoded_key should be marked as automatic in the tasks stream.

2022-03-18 15:05:21,005Z    tap - INFO replicated 1 records from "tasks" endpoint
2022-03-18 15:05:21,005Z    tap - CRITICAL 'encoded_key'
2022-03-18 15:05:21,005Z    tap - Traceback (most recent call last):
2022-03-18 15:05:21,005Z    tap -   File "/usr/local/share/virtualenvs/tap-mambu/bin/tap-mambu", line 33, in <module>
2022-03-18 15:05:21,006Z    tap -     sys.exit(load_entry_point('tap-mambu', 'console_scripts', 'tap-mambu')())
2022-03-18 15:05:21,006Z    tap -   File "/usr/local/share/virtualenvs/tap-mambu/lib/python3.8/site-packages/singer/utils.py", line 229, in wrapped
2022-03-18 15:05:21,006Z    tap -     return fnc(*args, **kwargs)
2022-03-18 15:05:21,006Z    tap -   File "/opt/code/tap-mambu/tap_mambu/__init__.py", line 50, in main
2022-03-18 15:05:21,006Z    tap -     sync(client=client,
2022-03-18 15:05:21,006Z    tap -   File "/opt/code/tap-mambu/tap_mambu/sync.py", line 922, in sync
2022-03-18 15:05:21,006Z    tap -     total_records = sync_endpoint_refactor(
2022-03-18 15:05:21,006Z    tap -   File "/opt/code/tap-mambu/tap_mambu/tap_mambu_refactor/main.py", line 71, in sync_endpoint_refactor
2022-03-18 15:05:21,007Z    tap -     return processor.process_streams_from_generators()
2022-03-18 15:05:21,007Z    tap -   File "/opt/code/tap-mambu/tap_mambu/tap_mambu_refactor/tap_processors/processor.py", line 111, in process_streams_from_generators
2022-03-18 15:05:21,007Z    tap -     if min_record_value == self.generator_values[iterator][self.endpoint_deduplication_key]:
2022-03-18 15:05:21,007Z    tap - KeyError: 'encoded_key'

Otherwise I just have one question on this PR, seems good.

Alexandru Rosca added 2 commits March 21, 2022 16:21
…' into 'release/39'

[ECDDC-651] Bugfix: changed deduplication key for tasks stream

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!66
@dmosorast dmosorast merged commit 9a7b680 into singer-io:master Mar 22, 2022
DownstreamDataTeam pushed a commit to DownstreamDataTeam/tap-mambu that referenced this pull request Mar 23, 2022
Refactored 7 more streams (singer-io#72)

See merge request mambucom/product/ecosystem/mambu-marketplace/connectors/singer/tap-mambu!71
@singer-bot
Copy link

You did it @DownstreamDataTeam!

Thank you for signing the Singer Contribution License Agreement.

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.

4 participants