-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
🐛 Source Marketo: improve field conversion to conform schema #8483
Conversation
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
/test connector=connectors/source-marketo
|
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk <[email protected]>
/test connector=connectors/source-marketo
|
@@ -37,8 +37,15 @@ def clean_string(string: str) -> str: | |||
"updatedat" -> "updatedat" | |||
""" | |||
|
|||
abbreviations = ("URL", "GUID", "IP") | |||
if any(map(lambda w: w in string, abbreviations)): | |||
fix = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have unit tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have added more cases for this unit_test 'test_clean_string'
Signed-off-by: Sergey Chvalyuk <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Please publish your changes
/test connector=connectors/source-marketo
|
Signed-off-by: Sergey Chvalyuk <[email protected]>
/test connector=connectors/source-marketo
|
/publish connector=connectors/source-marketo
|
This reverts commit 52fc276.
Signed-off-by: Sergey Chvalyuk <[email protected]>
…hq#8483) * normalize_datetime added, better parse_response * clean_string updated * get_json_schema updated * bump version 0.1.1 -> 0.1.2 Signed-off-by: Sergey Chvalyuk <[email protected]>
Signed-off-by: Sergey Chvalyuk [email protected]
What
Describe what the change is solving
It helps to add screenshots if it affects the frontend.
How
def normalize_datetime
- I propose make date-time normalization more explicit than just trim chars.MarketoExportBase.parse_response
- improved to be more robust for cases like in (3).3 . For new stream
activities_new_lead
we get different field names ondiscover
andread
steps WE NEED TO FIX IT!!!Tthis happened because discover and read return different names ( which probaly need to be normalized to the same name)
Current implementation of
utils.clean_string
pretty 'magic' and can give ugly-looking results:'Step ID' -> 'step_i_d'
"Campaign Run ID" -> 'campaign_run_i_d'
"SFDC Type" -> "s_f_d_c_type"
"Webpage ID" -> "webpage_i_d"
but we can live with it
I think we can to get rid of
utils.clean_string
and just uses.lower().replace(' ', '_')
Recommended reading order
x.java
y.python
🚨 User Impact 🚨
Are there any breaking changes? What is the end result perceived by the user? If yes, please merge this PR with the 🚨🚨 emoji so changelog authors can further highlight this if needed.
Pre-merge Checklist
Expand the relevant checklist and delete the others.
Updating a connector
Community member or Airbyter
airbyte_secret
./gradlew :airbyte-integrations:connectors:<name>:integrationTest
.README.md
bootstrap.md
. See description and examplesdocs/integrations/<source or destination>/<name>.md
including changelog. See changelog exampleAirbyter
If this is a community PR, the Airbyte engineer reviewing this PR is responsible for the below items.
/test connector=connectors/<name>
command is passing./publish
command described here