Search code examples
cratedb

CrateDB 3.3 - Can't get COPY FROM to import a CSV file in Windows


I'm getting errors attempting to import a csv on Windows, can someone provide the correct syntax?

I'm trying this: copy checking from 'file://C:\Users\jdoe\Downloads\testfile.csv' return summary;

and variations and get a 'SQLActionException[SQLParseException: Illegal character in authority at index 7: file://C:\Users\jdoe\Downloads\testfile.csv]

Thanks, Mark


Solution

  • I think you need to add backslash and forward slash (and change others to forward slashes) after drive letter as per this documentation. So something along the lines of copy checking from 'file://C:\/Users/jdoe/Downloads/testfile.csv' return summary