Help with Data Ingestion

Currently, I am having issues using the Copy From statement to import data into CrateDB. I have created a table already in CrateDB with the correct data types and naming scheme. Then I attempted the following code:

Copy testimport From ‘file:///C:/CrateIO/crate-4.7.1/TestData/testimport.csv’ WITH (FORMAT = ‘CSV’)

After I run the query I get a return statement saying “COPY OK, 0 records affected.” The mock data (testimport.csv) should add 10 rows of data, but no matter what I try I am unable to import the data. This issue still exists when the file format is switched to JSON from CSV. Is there something I am missing?

I am running the Windows 4.7.1 version of CrateDB

Hi @phomuth,

the COPY command is not very verbose by default in regards to error messages. Can you try please to append RETURN SUMMARY? That should give a hint on what the issue is.

Copy testimport From 'file:///C:/CrateIO/crate-4.7.1/TestData/testimport.csv' WITH (FORMAT = 'CSV') RETURN SUMMARY;


I have tried the return summary. It gives a similar return message of “COPY OK, 1 Row Affected.” It then shows the summary below. Is there a way to get more detail on the error count?

Thank you!

@phomuth “errors” column is an object with details nested insight. Either uncheck “Format results” to see the full json object or click on “> Object” to open the object