question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when run query from SQL Lab using json_agg/json_build_object

See original GitHub issue

A clear and concise description of what the bug is. I need to run some query using json_agg/json_build_object in Postgres database, but I got an error pyarrow.lib.ArrowNotImplementedError: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64>

My query:

SELECT id, json_agg(json_build_object(‘table_name’,table_name,‘database_id’,database_id)) FROM (SELECT * FROM tables) AS tables GROUP BY id

Error details:

ERROR:superset.sql_lab:Query 11: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64> Traceback (most recent call last): File “/app/superset/sql_lab.py”, line 170, in get_sql_results log_params=log_params, File “/app/superset/sql_lab.py”, line 391, in execute_sql_statements expand_data, File “/app/superset/sql_lab.py”, line 291, in _serialize_and_expand_data df = result_set.to_pandas_df() File “/app/superset/result_set.py”, line 152, in to_pandas_df return self.convert_table_to_df(self.table) File “/app/superset/result_set.py”, line 129, in convert_table_to_df return table.to_pandas(integer_object_nulls=True) File “pyarrow/array.pxi”, line 468, in pyarrow.lib._PandasConvertible.to_pandas File “pyarrow/table.pxi”, line 1238, in pyarrow.lib.Table._to_pandas File “/usr/local/lib/python3.6/site-packages/pyarrow/pandas_compat.py”, line 704, in table_to_blockmanager blocks = _table_to_blocks(options, table, categories) File “/usr/local/lib/python3.6/site-packages/pyarrow/pandas_compat.py”, line 976, in _table_to_blocks result = pa.lib.table_to_blocks(options, block_table, categories) File “pyarrow/table.pxi”, line 780, in pyarrow.lib.table_to_blocks File “pyarrow/error.pxi”, line 86, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Not implemented type for list in DataFrameBlock: struct<table_name: string, database_id: int64>

Screenshots

image

Environment

(please complete the following information):

  • superset version: master branch
  • python version: 3.6.9
  • node.js version: 10
  • npm version: 6.13.4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
graceguo-supercatcommented, Jan 28, 2020

@lxhoang97 #9007 fixed an issue for a nested type ARRAY<MAP<STRING,STRING>>. Do you want to test it in your environment. thanks!

0reactions
stale[bot]commented, Mar 29, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when run query from SQL Lab using json_agg ... - GitHub
A clear and concise description of what the bug is. I need to run some query using json_agg/json_build_object in Postgres database, ...
Read more >
Unable to run queries in SQL Lab in Apache Superset
Resolved this one by looking through dev tools for exact exceptions. This one has to do with the Signal alarms. Since superset is...
Read more >
FIX: Error when you run a query that contains "Use ...
Cause. This issue occurs because Azure SQL Database does not support the "use" command. Resolution. Cumulative Update information.
Read more >
Common SQL syntax errors and how to resolve them
In this article, we are going to describe some of the most common SQL syntax errors, and explains how you can resolve these...
Read more >
SQL Exercises, Practice, Solution - w3resource
And from this sql prompt only you may run all the sql queries. Yoy may exit the shell using "\q". If you find...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found