Writing type 'Timestamp' causing error


#1

I’m writing from Apache Spark to MapD. I have 5 columns, here are their schemas:

root
|-- _id: string (nullable = true)
|-- eventId: string (nullable = true)
|-- venueId: string (nullable = true)
|-- start: timestamp (nullable = false)
|-- end: timestamp (nullable = false)

When I write _id, eventId, and venueId, there are no problems. When I attempt to write all 5 columns, including the two timestamp columns (start, end), I get this error:

java.sql.SQLException: Query failed : Syntax error at: end sql was 'CREATE TABLE eventOccurrences ( _id TEXT , eventId TEXT , venueId TEXT , start TIMESTAMP NOT NULL, end TIMESTAMP NOT NULL) '

Any ideas of what I need to change? Thanks


#2

Hi,

I think it does not like your column names. I don’t think we support _ as a start character. I would also recommend against column names like start and end.

Regards


#3

Ah, it was the column names “start” and “end” that did it. I switched those and it worked. Thanks!!