Bug description

How to reproduce the bug

  1. CSV upload file test_null.csv

Image

  1. CSV upload file test_null.csv. Configure the settings as shown in the screenshot

Image Image

Screenshots/recordings

No response

Superset version

4.1.1

Python version

3.9

Node version

I don't know

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

@KlyapkoV Hello! I'm here to help you with any bugs, questions, or contributions you have in mind. I'm an expert bot named Dosu, and I'm ready to assist you while you wait for a human maintainer.

To resolve the error when loading data from a CSV file with empty values in Superset version 4.1.1, ensure that the null_values field is correctly configured to treat "null" and "N/A" as null values. You can specify these values in the null_values field as follows:

null_values = ["null", "N/A"]

Additionally, make sure to select the appropriate options for null values in the Superset UI. Superset provides a nullValuesOptions configuration where you can select "null" and "N/A" as null values. Ensure these options are selected when setting up the CSV import in Superset. This will ensure that the specified strings are treated as null values during the data loading process [1][2][3].

Note that the append operation is not supported in the current implementation, and attempting to use it will raise a SupersetException [4].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

Comment From: sadpandajoe

@KlyapkoV do you have logs for the errors?

Comment From: KlyapkoV

@sadpandajoe, thanks for your answer.

Image

Image

Comment From: sadpandajoe

@KlyapkoV what is the database you are trying to upload the csv into? This works when you don't have nulls i'm assuming.

Comment From: KlyapkoV

@sadpandajoe, I'm trying to upload a CSV file to a Postgre database.

This works if there are no nulls values. But the error is reproduced when there are empty values.

Comment From: rusackas

Does the "skip blank lines" switch work? Not sure if you need those null values. Not saying there's no bug here, but it might be a workaround for the moment.

Comment From: rusackas

Wondering if this issue still exists in 5.0.0 or on master. Please let us know if it needs to remain open.