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

Delimiter not working for special characters in COPY command from CQLSH

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.16, 2.0.7, 2.1 beta2
    • None
    • Low

    Description

      COPY command from CQLSH which can be used to load data from CSV files is not working with option delimiter='\t'

      cqlsh>CREATE TABLE airplanes (
      name text PRIMARY KEY,
      manufacturer ascii,
      year int,
      mach float
      );

      cqlsh>INSERT INTO airplanes (name, manufacturer, year, mach) VALUES ('P38-Lightning', 'Lockheed', 1937, 7);

      cqlsh> SELECT * FROM airplanes;
      name | mach | manufacturer | year
      -----------------------------+-----
      P38-Lightning | 0.7 | Lockheed | 1937

      cqlsh> COPY airplanes (name, manufacturer, year, mach) TO 'temp.tsv' WITH DELIMITER = '\t';
      "delimiter" must be an 1-character string

      cqlsh> COPY airplanes (name, manufacturer, year, mach) FROM 'temp.csv' WITH DELIMITER = '\t';
      "delimiter" must be an 1-character string

      Attachments

        1. trunk-6773.txt
          0.6 kB
          Shiti Saxena

        Activity

          People

            Shiti Shiti Saxena
            Shiti Shiti Saxena
            Shiti Saxena
            Mikhail Stepura
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: