Skip to content

SQL: IMPORT DATABASE fails for CSV #1061

Closed

Description

@gramian

ArcadeDB Version: ArcadeDB Server v23.3.1 (build da609e4/1680693032550/main)

JDK Version: Running on Mac OS X 12.6.4 - OpenJDK 64-Bit Server VM Homebrew

Expected behavior

A type with properties a, b, c.

Actual behavior

Details Error on parsing source 'null'
2023-05-01 07:20:29.654 INFO  [SourceDiscovery] <ArcadeDB_0> Analyzing url: file:///path/to/test.csv...
2023-05-01 07:20:29.656 INFO  [CSVImporterFormat] <ArcadeDB_0> Reading header from 1st line in data file: [a, b, c]
2023-05-01 07:20:29.658 INFO  [SourceDiscovery] <ArcadeDB_0> Recognized format CSV (parsingLimitBytes=9,54MB parsingLimitEntries=0)
2023-05-01 07:20:29.659 INFO  [Importer] <ArcadeDB_0> Checking schema...- Status update: parsed 0 (0/sec) - 0 documents (0/sec) - 0 vertices (0/sec) - 0 edges (0/sec) - 0 skipped edges - 0 linked edges (0/sec - 0%)
<ArcadeDB_0> Error on command execution (PostCommandHandler)
com.arcadedb.exception.CommandExecutionException: Error on importing database
	at com.arcadedb.query.sql.parser.ImportDatabaseStatement.executeSimple(ImportDatabaseStatement.java:69)
	at com.arcadedb.query.sql.executor.SingleOpExecutionPlan.executeInternal(SingleOpExecutionPlan.java:91)
	at com.arcadedb.query.sql.parser.SimpleExecStatement.execute(SimpleExecStatement.java:63)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:85)
	at com.arcadedb.query.sql.parser.Statement.execute(Statement.java:69)
	at com.arcadedb.query.sql.SQLQueryEngine.command(SQLQueryEngine.java:97)
	at com.arcadedb.database.EmbeddedDatabase.command(EmbeddedDatabase.java:1264)
	at com.arcadedb.server.ServerDatabase.command(ServerDatabase.java:421)
	at com.arcadedb.server.http.handler.PostCommandHandler.executeCommand(PostCommandHandler.java:127)
	at com.arcadedb.server.http.handler.PostCommandHandler.execute(PostCommandHandler.java:88)
	at com.arcadedb.server.http.handler.DatabaseAbstractHandler.execute(DatabaseAbstractHandler.java:92)
	at com.arcadedb.server.http.handler.AbstractHandler.handleRequest(AbstractHandler.java:127)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:393)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:859)
	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
	at org.xnio.XnioWorker$WorkerThreadFactory$1$1.run(XnioWorker.java:1282)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: com.arcadedb.integration.importer.ImportException: Error on parsing source 'null'
	at com.arcadedb.integration.importer.Importer.load(Importer.java:63)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.arcadedb.query.sql.parser.ImportDatabaseStatement.executeSimple(ImportDatabaseStatement.java:61)
	... 18 more
Caused by: java.lang.IllegalArgumentException: Record type 'DATABASE' is not supported
	at com.arcadedb.integration.importer.AbstractImporter.updateDatabaseSchema(AbstractImporter.java:252)
	at com.arcadedb.integration.importer.Importer.loadFromSource(Importer.java:87)
	at com.arcadedb.integration.importer.Importer.load(Importer.java:54)
	... 23 more

Steps to reproduce

Given a simple test.csv file like:

a,b,c
1,2,3
4,5,6
7,8,9

the following command causes this error:

IMPORT DATABASE file:///path/to/test.csv

Tested in studio using an absolute path to the CSV.

Activity

  1. ZachMurray commented on May 22, 2023

    @ZachMurray

    I think I'm having the same issue on Windows.

  2. self-assigned this
    on Jun 12, 2023
  3. lvca commented on Jun 12, 2023

    @lvca
    Member

    Reproduced.

  4. added this to the 23.6.1 milestone on Jun 12, 2023
  5. added a commit that references this issue on Jun 12, 2023
  6. lvca commented on Jun 12, 2023

    @lvca
    Member

    Fixed. Tried with this:

    IMPORT DATABASE <file-path> with documentType = Doc

    The documentType setting tells with Document type to use, otherwise "Document" is used.

  7. gramian commented on Jun 12, 2023

    @gramian
    CollaboratorAuthor

    Works for me. Very cool!

    @ZachMurray & @mmoselerhcfs it would be great if you could test, too.

  8. added a commit that references this issue on Jun 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions