Writing type 'Timestamp' causing error


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

|-- _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



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.



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