title: Apache Mahout Database to Sequence File
body: <p>I am currently trying to play around with mahout. I purchased the book Mahout in Action.
  The whole process is understood and with simple test data sets I was already successful.</p>
  
  <p>Now I have a classification problem that I would like to solve.</p>
  
  <p>the target variable is found, which I call - for now - x.
  The existing data in our database has already been classified with -1, 0 and +1.</p>
  
  <p>We defined several predictor variables which we select with an SQL query.</p>
  
  <p>These are the product's attributes: language, country, category (of the shop), title, description.</p>
  
  <p>Now I want them to directly be written in a SequenceFile, for which I wrote a little helper class that will append to the sequence file each time a new row of the SQL resultset has been processed:</p>
  
  <pre><code>public void appendToFile(String classification, String databaseID, String language, String country, String vertical, String title, String description) {
      int count = 0;
      Text key = new Text();
      Text value = new Text();
  
      key.set("/" + classification + "/" + databaseID);
      //??value.set(message);
      try {
          this.writer.append(key, value);
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>If I only had the title or so, I could simply store it in the value - but how do I store mutiple values like country, lang, and so on, in that particular key?</p>
  
  <p>Thanks for any help!</p>