[Mondrian] Infobright Distinct Count

Julian Hyde jhyde at pentaho.com
Wed Feb 9 14:00:57 EST 2011


I enabled bulk-loading for infobright because the community edition didn't
support INSERT.

Looks like I didn't deal with double-quotes correctly. I don't know why this
worked in previous versions.

Can you change MondrianFoodMartLoader so that the load statement is

LOAD DATA INFILE <filename> INTO TABLE account
  FIELDS TERMINATED BY ','
  OPTIONALLY ENCLOSED BY '"'
  ESCAPED BY '\\'

And the code to generate the temporary CSV file should be

    fileOutput.write(
       massagedLine.toString().replaceAll("\"", "\\\"")
           .replace('\'', '"').trim());

Hence that line in the CSV file would be

3100,3000,"Gross
Sales","Income","+","LookUpCube(\"[Sales]\",\"(Measures.[Store
Sales],\"+time.currentmember.UniqueName+\",\"+Store.currentmember.UniqueName
+\")\")" 

Julian




More information about the Mondrian mailing list