Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-12174

COPY FROM should raise error for non-existing input files

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 3.10
    • Legacy/Tools

    Description

      Currently the CSV COPY FROM command will not raise any error for non-existing paths. Instead only "0 rows imported" will be shown as result.

      As the COPY FROM command is often used for tutorials and getting started guides, I'd suggest to give a clear error message in case of a missing input file. Without such error it can be confusing for the user to see the command actually finish, without any clues why no rows have been imported.

      CREATE KEYSPACE test
        WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 1 };
      
      USE test;
      
      CREATE TABLE airplanes (
        name text PRIMARY KEY,
        manufacturer ascii,
        year int,
        mach float
      );
      
      COPY airplanes (name, manufacturer, year, mach) FROM '/tmp/1234-doesnotexist';
      Using 3 child processes
      
      Starting copy of test.airplanes with columns [name, manufacturer, year, mach].
      Processed: 0 rows; Rate:       0 rows/s; Avg. rate:       0 rows/s
      0 rows imported from 0 files in 0.216 seconds (0 skipped).
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hnishi Hiroyuki Nishi Assign to me
            spod Stefan Podkowinski
            Hiroyuki Nishi
            Stefania Alborghetti
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment