Skip to content

Fix issues when using tap-zendesk#5

Open
micaelbergeron wants to merge 3 commits intocubedevinc:masterfrom
meltano:fix-zendesk
Open

Fix issues when using tap-zendesk#5
micaelbergeron wants to merge 3 commits intocubedevinc:masterfrom
meltano:fix-zendesk

Conversation

@micaelbergeron
Copy link

This PR fixes two issues when using tap-zendesk alongside this target:

  1. Empty property declaration.

The discovery of tap-zendesk outputs empty property declarations and it caused the flatten_schema function to raise an IndexError. Now we ignore these.

  1. \u0000 character in the CSV payload

In a certain entry, I had a \\u0000 sequence that was being escaped twice by json.dumps. I've simply added some sanitization before sending the CSV line to remove this sequence.

mbergeron added 2 commits September 26, 2018 15:41
  - fix an error when an empty type declaration is found
    i.e. "custom": {}

  - fix a problem in string sanitization for \u0000
elif list(v.values())[0][0]['type'] == 'array':
list(v.values())[0][0]['type'] = ['null', 'array']
items.append((new_key, list(v.values())[0][0]))
property = list(v.values())[0][0]
Copy link
Author

Choose a reason for hiding this comment

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

I think this is more readable and efficient.

Remove a print statement
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.

1 participant