Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-5746

No data gets loaded into BLOB column and the value is left NULL

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • 23.02.9, 23.10.2
    • cpimport
    • None
    • 2024-1

    Description

      cpimport is not able to load BLOB values. No data gets loaded into BLOB column and the value is left NULL.

      Repro
      ------
      1. create schema
      CREATE TABLE `lte_call_leg_by_mesh_2_IMSI` ( `MeshID` bigint(20) DEFAULT NULL, `IMSI` blob DEFAULT NULL ) ENGINE=Columnstore DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

      2. create text data and import
      cat data.csv
      1111111,oneoneoneoneoneoneoneone

      cpimport -s ',' test lte_call_leg_by_mesh_2_IMSI data.csv

      MariaDB [test]> select * from lte_call_leg_by_mesh_2_IMSI;
      -------------+

      MeshID IMSI

      -------------+

      1111111 NULL

      -------------+
      1 rows in set (0.030 sec)
      convert the above csv file into a binary file data.bin as follows,

      3. create binary data and import
      python program to create binary file for the above data.csv file>
      import csv
      with open('data.csv', 'r') as csvfile, open('data.bin', 'wb') as binfile:
      reader = csv.reader(csvfile)
      for row in reader:
      binfile.write(bytes(','.join(row), 'utf-8'))

      cpimport -s ',' test lte_call_leg_by_mesh_2_IMSI data.bin

      MariaDB [test]> select * from lte_call_leg_by_mesh_2_IMSI;
      -------------+

      MeshID IMSI

      -------------+

      1111111 NULL
      1111111 NULL

      -------------+
      2 rows in set (0.034 sec)

      Attachments

        Activity

          People

            denis0x0D Denis Khalikov
            susil.behera Susil Behera
            Roman Roman
            Susil Behera Susil Behera
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.