'ValueError' Upon SQL Cell Execution

Running Datalore On-Prem, Docker-Compose

Upon execution of a SQL Cell, ValueError is thrown.

Begin Traceback Block:

Traceback (most recent call last):
  at block 2, line 1
  at block 3, line 7, in _datalore_internal_python_execute_sql_query(sql_query, database_id, user_id, parameters)
  at /opt/anaconda3/envs/minimal/lib/python3.8/site-packages/pandas/core/frame.pyline 694, in __init__(self, data, index, columns, dtype, copy)
  at /opt/anaconda3/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.pyline 483, in nested_data_to_arrays(data, columns, index, dtype)
  at /opt/anaconda3/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.pyline 807, in to_arrays(data, columns, dtype)
  at /opt/anaconda3/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.pyline 909, in _finalize_columns_and_data(content, columns, dtype)
ValueError: 13 columns passed, passed data had 12 columns

I have ruled out the query, as it executes fine on DBBeaver & DBForge. I have attempted simplistic queries that don’t involve as many join statements. However, same error is thrown.

Has anyone else had this issue?

It could be a bug on our side. Does it happen when working with a MySQL database? Please send me DESCRIBE output for this table and, if possible, dump or some sample data (via DM) to reproduce the issue.

Thank you!

Igor

Hi igro,

I encounter the same issue.
I can simply take the following steps to reproduce it:

  • create a SQL cell
  • select the connection with a clickhouse db
  • run SQL “select count(1)”
    and then the error popup:
Traceback (most recent call last):
  at block 4, line 1
  at block 4, line 9, in _datalore_internal_python_execute_sql_query(sql_query, database_id, user_id, parameters)
  at /opt/python/envs/minimal/lib/python3.8/site-packages/pandas/core/frame.py, line 694, in __init__(self, data, index, columns, dtype, copy)
  at /opt/python/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.py, line 483, in nested_data_to_arrays(data, columns, index, dtype)
  at /opt/python/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.py, line 807, in to_arrays(data, columns, dtype)
  at /opt/python/envs/minimal/lib/python3.8/site-packages/pandas/core/internals/construction.py, line 909, in _finalize_columns_and_data(content, columns, dtype)
ValueError: 1 columns passed, passed data had 0 columns

below is the screenshot:

@leonli, thank you for the report!

I managed to reproduce this error locally – it seems there is an issue with the Clickhouse driver. Forwarded this report to the dev team, will keep you posted!

Best regards,
Igor

1 Like

We found an issue with the returned types (String comes as a Numeric sql type). We added a proper support for this behavior at our side - it is already implemented at our cloud instance (datalore.jetbrains.com) and the fix will be also included into the next planned Enterprise release (2023.2, mid April).

Thanks again for the report!