Inserting NaN or Null values into a text file processed by MySqlBulkLoader
Posted by: NOT_FOUND NOT_FOUND
Date: December 06, 2016 03:45PM

Hello,

I am creating a text file for MySqlBulkLoader to process. The table is simple:

CREATE TABLE VariableData (
ExperimentID INTEGER UNSIGNED NOT NULL,
VariableID INTEGER UNSIGNED NOT NULL,
ordinal INTEGER UNSIGNED NOT NULL,
value DOUBLE NULL,
PRIMARY KEY(ExperimentID, VariableID, ordinal)
);

Sometimes the 'value' value is NaN. What do I need to write in the text file that BulkLoader processes in order to insert either NaN or a Null into the table? I've tried these two strings:

stmt = idExperimentStr + ',' + idVariableStr + ',' + str(ordinal) + ',NaN\r'
stmt = idExperimentStr + ',' + idVariableStr + ',' + str(ordinal) + ',\r'

but '0' gets written as the 'value' in both statements.

Options: ReplyQuote


Subject
Written By
Posted
Inserting NaN or Null values into a text file processed by MySqlBulkLoader
December 06, 2016 03:45PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.