NULL values during CSV import to mySQL database

I have a mySQL database with some columns having NULL as default value. When importing rows with 17 columns, my CSV file will look like this:

,"B","C","D","E",,"G","H","I",,,"L","M","N","O",,

Let's say I have NULL as default for the 16th column. When this CSV is imported, it will show as a blank cell (as in none) for cells that do not have a value.

It is important that some of this missing values should be NULL in the database especially in columns where NULL is the default. My ideal CSV import file should look like this:

,"B","C","D","E",,"G","H","I",,,"L","M","N","O",NULL,

How do I set the "Missing Value Pattern" (which can be used to set missing values to NULL) in CSV Writer to work only in one particular column (where the database has NULL as default)? Or is there a way that missing values can be treated differently even prior to the CSV writer node.

Hi Marcellus,

The missing value pattern of the CSV Writer can only be set for the whole table. However, you can use a Missing Value node prior to writing the CSV. There, you can select Fix Value as replacement method for your column and use NULL as value.

Cheers,

Roland