Fix/recipe duplicates last line of csv apis#64
Open
alexbourret wants to merge 7 commits intofeature/sniffing-csv-dialectfrom
Open
Fix/recipe duplicates last line of csv apis#64alexbourret wants to merge 7 commits intofeature/sniffing-csv-dialectfrom
alexbourret wants to merge 7 commits intofeature/sniffing-csv-dialectfrom
Conversation
Ellana42
requested changes
Apr 14, 2026
Contributor
Ellana42
left a comment
There was a problem hiding this comment.
The first comment is my biggest issue - otherwise works great
| # Todo: check api_response key is free and add something overwise | ||
| base_row = copy.deepcopy(metadata) | ||
| if is_raw_output: | ||
| assert_json(json_response) |
Contributor
| json_response = decode_csv_data(json_response) | ||
| for row in json_response: | ||
| decoded_csv_data = decode_csv_data(json_response) | ||
| is_api_returning_dict = False |
Contributor
There was a problem hiding this comment.
This breaks compatibility too but I believe this whole functionnality was introduced in an alpha for a client so probably not problematic
Comment on lines
+133
to
+138
| decoded_csv_data = [ | ||
| { | ||
| DKUConstants.API_RESPONSE_KEY: "{}".format( | ||
| decode_bytes(json_response) | ||
| ) | ||
| } |
Contributor
There was a problem hiding this comment.
Suggested change
| decoded_csv_data = [ | |
| { | |
| DKUConstants.API_RESPONSE_KEY: "{}".format( | |
| decode_bytes(json_response) | |
| ) | |
| } | |
| decoded_csv_data = [ | |
| { | |
| DKUConstants.API_RESPONSE_KEY: decode_bytes(json_response) | |
| } |
| ## [Version 1.2.7](https://github.com/dataiku/dss-plugin-api-connect/releases/tag/v1.2.7) - Feature - 2026-02-18 | ||
|
|
||
| - Detecting dialect for better csv decoding | ||
| - Fixing duplication of last line in csv APIs using the recipe |
Contributor
There was a problem hiding this comment.
Missing mention of the new string dump
| def assert_json(variable_to_check): | ||
| if isinstance(variable_to_check, dict) or isinstance(variable_to_check, list): | ||
| return | ||
| raise Exception("Returned data is not JSON format. Try again with 'Raw JSON output' un-checked.") |
Contributor
There was a problem hiding this comment.
nit: A more specific exception might be better
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

https://app.shortcut.com/dataiku/story/308025