Skip to content

use custom field name instead of key and evaluate enum field value#100

Open
tarsisazevedo wants to merge 4 commits intosinger-io:masterfrom
tarsisazevedo:master
Open

use custom field name instead of key and evaluate enum field value#100
tarsisazevedo wants to merge 4 commits intosinger-io:masterfrom
tarsisazevedo:master

Conversation

@tarsisazevedo
Copy link
Copy Markdown

Description of change

Pipedrive allows users to add custom fields to some Types, like deals, products, and organizations. Those custom field keys appear as base64 string, which causes some trouble when we pipe it with big query target, for example.

To solve this, my approach is to check if the property key has some non-alphabet character, and if true, use name slugified and replacing - to _, just to maintain the same pattern of other fields' key.

If you agree with this approach I can add tests. Also, if you guys think it should not be the default behavior, I can add a config to allow this.

PS: My IDE has python black as code formatter, so some changes are because of that. I can revert it if you want to.

Manual QA steps

  • Install this branch and connect to a Pipedrive account that has some custom fields. Then run a tap-pipedrive -c config.json --discover and check if custom fields are loaded as their name.

Risks

  • None

Rollback steps

  • revert this branch

@cmerrick
Copy link
Copy Markdown
Contributor

Hi @tarsisazevedo, 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.

@cmerrick
Copy link
Copy Markdown
Contributor

You did it @tarsisazevedo!

Thank you for signing the Singer Contribution License Agreement.

@tarsisazevedo
Copy link
Copy Markdown
Author

tarsisazevedo commented Jun 25, 2021

Just find out a better way to identify a custom field, so I will adapt this PR to that. Also, find out the tap is not saving data from the custom field when I run a stream command, I imagine that it cannot find the proper field name. I am working in a fix for that.

@tarsisazevedo
Copy link
Copy Markdown
Author

I just finished the code to handle custom fields properly. Working now to add tests.

@tarsisazevedo tarsisazevedo changed the title use custom field name instead of key. use custom field name instead of key and evaluate enum field value Jun 29, 2021
@tarsisazevedo
Copy link
Copy Markdown
Author

Just add support to enum evaluation

@Gabrieldlramos
Copy link
Copy Markdown

Hey guys, this would really help us a lot, is there anyone able to review this code?

Kind Regards

@jtilala
Copy link
Copy Markdown

jtilala commented Jun 27, 2022

Hi @tarsisazevedo, Can you please revert this branch (to remove code formatter's changes), so we can quickly review this PR.

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