Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> HSQLDB issue with null strings


Copy link to this message
-
Re: HSQLDB issue with null strings
I'm glad to hear that the problem was solved! Would you mind sharing what compatibility mode has worked for you? It might be useful for other users following this mailing list.

Jarcec

On Fri, Nov 22, 2013 at 03:41:13PM -0800, redshift-etl-user wrote:
> Thanks, Jarek! Was able to fix the problem by upgrading HSQLDB and setting
> the DB compatibility mode in the connection string.
>
> Thanks again.
>
>
> On Fri, Nov 22, 2013 at 11:24 AM, Jarek Jarcec Cecho <[EMAIL PROTECTED]>wrote:
>
> > Hi sir,
> > it seems that HSQLDB is reporting the column "STRING" as type CLOB. The
> > parameters --(input-)null-(non-)string are working only for a string based
> > columns (CHAR, VARCHAR, NCHAR, ...) and not for a CLOB. You might be able
> > to overcome this by using --map-column-java parameter and force it's type
> > to String (and not a CLOB):
> >
> >   sqoop import --map-column-java STRING=String ...
> >
> > You can find more details about type mapping in Sqoop User Guide:
> >
> >
> > http://sqoop.apache.org/docs/1.4.4/SqoopUserGuide.html#_controlling_type_mapping
> >
> > Jarcec
> >
> > On Thu, Nov 21, 2013 at 09:56:15PM -0800, redshift-etl-user wrote:
> > > Jarek - class included below. Thanks!
> > >
> > >
> > > // ORM class for table 'null'
> > > // WARNING: This class is AUTO-GENERATED. Modify at your own risk.
> > > //
> > > // Debug information:
> > > // Generated date: Thu Nov 21 21:52:32 PST 2013
> > > // For connector: org.apache.sqoop.manager.GenericJdbcManager
> > > import org.apache.hadoop.io.BytesWritable;
> > > import org.apache.hadoop.io.Text;
> > > import org.apache.hadoop.io.Writable;
> > > import org.apache.hadoop.mapred.lib.db.DBWritable;
> > > import com.cloudera.sqoop.lib.JdbcWritableBridge;
> > > import com.cloudera.sqoop.lib.DelimiterSet;
> > > import com.cloudera.sqoop.lib.FieldFormatter;
> > > import com.cloudera.sqoop.lib.RecordParser;
> > > import com.cloudera.sqoop.lib.BooleanParser;
> > > import com.cloudera.sqoop.lib.BlobRef;
> > > import com.cloudera.sqoop.lib.ClobRef;
> > > import com.cloudera.sqoop.lib.LargeObjectLoader;
> > > import com.cloudera.sqoop.lib.SqoopRecord;
> > > import java.sql.PreparedStatement;
> > > import java.sql.ResultSet;
> > > import java.sql.SQLException;
> > > import java.io.DataInput;
> > > import java.io.DataOutput;
> > > import java.io.IOException;
> > > import java.nio.ByteBuffer;
> > > import java.nio.CharBuffer;
> > > import java.sql.Date;
> > > import java.sql.Time;
> > > import java.sql.Timestamp;
> > > import java.util.Arrays;
> > > import java.util.Iterator;
> > > import java.util.List;
> > > import java.util.Map;
> > > import java.util.TreeMap;
> > >
> > > public class gXoTNYSfULokaKs extends SqoopRecord  implements DBWritable,
> > > Writable {
> > >   private final int PROTOCOL_VERSION = 3;
> > >   public int getClassFormatVersion() { return PROTOCOL_VERSION; }
> > >   protected ResultSet __cur_result_set;
> > >   private Integer ID;
> > >   public Integer get_ID() {
> > >     return ID;
> > >   }
> > >   public void set_ID(Integer ID) {
> > >     this.ID = ID;
> > >   }
> > >   public gXoTNYSfULokaKs with_ID(Integer ID) {
> > >     this.ID = ID;
> > >     return this;
> > >   }
> > >   private com.cloudera.sqoop.lib.ClobRef STRING;
> > >   public com.cloudera.sqoop.lib.ClobRef get_STRING() {
> > >     return STRING;
> > >   }
> > >   public void set_STRING(com.cloudera.sqoop.lib.ClobRef STRING) {
> > >     this.STRING = STRING;
> > >   }
> > >   public gXoTNYSfULokaKs with_STRING(com.cloudera.sqoop.lib.ClobRef
> > STRING)
> > > {
> > >     this.STRING = STRING;
> > >     return this;
> > >   }
> > >   public boolean equals(Object o) {
> > >     if (this == o) {
> > >       return true;
> > >     }
> > >     if (!(o instanceof gXoTNYSfULokaKs)) {
> > >       return false;
> > >     }
> > >     gXoTNYSfULokaKs that = (gXoTNYSfULokaKs) o;
> > >     boolean equal = true;
> > >     equal = equal && (this.ID == null ? that.ID == null :
> > > this.ID.equals(that.ID));
> > >     equal = equal && (this.STRING == null ? that.STRING == null :
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB