Bug description

I tried to use deck.gl GeoJSON chart to display a maps of point or polyline. The original table contains a column geometry (postgresql) with a Lambert 93 (2145) projection. After some research and tests, I tried to create a view to transform this column to GeoJSON format :

st_asgeojson(st_transform(ggevent.geometry, 4326)) AS geometry

So I test this column with deck.gl GeoJSON chart but the mapbox is empty : Image I updated the viewport like my geometry values for information.

Screenshots/recordings

No response

Superset version

5.0.0

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Comment From: dosubot[bot]

For Deck.gl GeoJSON charts in Superset, the geometry column must contain valid GeoJSON Features or a FeatureCollection—not just raw geometry objects. For example, instead of outputting only a Polygon or Point, your SQL should produce something like:

{
  "type": "Feature",
  "geometry": { "type": "Polygon", "coordinates": [...] },
  "properties": {}
}

or for multiple features:

{
  "type": "FeatureCollection",
  "features": [
    { "type": "Feature", "geometry": { ... }, "properties": {} },
    ...
  ]
}

If you use st_asgeojson(...) directly, it returns only the geometry, not a full Feature. To fix this, wrap your geometry in a Feature using SQL, for example:

jsonb_build_object(
  'type', 'Feature',
  'geometry', st_asgeojson(st_transform(geometry, 4326))::jsonb,
  'properties', jsonb_build_object()
) AS geometry

Then, in Superset, make sure to select this column as the "GeoJson Column" in the chart controls.

Also, avoid naming your column 'Polygon' or 'polygon', as this can cause rendering errors in Superset 5.0.0—use a different name like 'geom' or 'shape' instead details details.

If the map is still empty, double-check that your column contains valid JSON, that you selected the correct column in the chart, and check the browser console or Superset logs for errors. Let me know if you see any specific error messages!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

Ok I update my view like this, but I have the same problem :

Image

I have several errors inside the console :

Image

Image

Comment From: dosubot[bot]

You have two separate issues:

  1. The 401 Unauthorized and CORS errors from Mapbox mean your Mapbox API key is missing or invalid. To fix this, set a valid Mapbox access token in your Superset config. You can do this by adding MAPBOX_API_KEY = 'your_token' to your superset_config.py or by setting the MAPBOX_API_KEY environment variable. See the docs for details on where to set this and how Superset uses it for map rendering (docs, config.py).

  2. Your query result screenshot shows 0 rows returned. Deck.gl charts require at least one row with valid GeoJSON Features in the selected column. If your view/query returns no rows, the chart will be empty and deck.gl may throw TypeErrors when it tries to process undefined data (viz.py). Double-check your SQL/view and filters to ensure you are actually returning data, and make sure you have selected the correct GeoJSON column in the chart controls.

Once you have a valid Mapbox token and your query returns rows, the map and data should display. If you still see issues after fixing both, let me know what errors remain.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

Ok I added the MAPBOX_API_KEY and the map is displayed.

Nevertheless, I don't know how there is 0 rows returned, I see at the bottom the result list, it isn't empty. Is the GeoJSON format not good ? I put some example of the results like my previous screenshot :

{"type": "Feature", "geometry": {"type": "Point", "coordinates": [2.920868769, 47.383006885]}, "properties": {}}
{"type": "Feature", "geometry": {"type": "Point", "coordinates": [2.921370949, 47.383381063]}, "properties": {}}
{"type": "Feature", "geometry": {"type": "Point", "coordinates": [2.921371407, 47.383407648]}, "properties": {}}

Comment From: dosubot[bot]

Your GeoJSON format is correct, but if the Deck.gl GeoJSON chart still shows 0 rows, here are the most common causes:

  1. Make sure you have selected the correct GeoJSON column in the chart controls. The column name must match exactly (case-sensitive) what you defined in your SQL/view and what you select in the "GeoJson Column" control (details).
  2. The GeoJSON column should be of type TEXT (or cast to string if it's JSON/JSONB in PostgreSQL). If it's not, Superset may not interpret it correctly and the DataFrame will be empty, resulting in 0 rows (details).
  3. Check for any filters or chart settings that might be excluding all rows.
  4. Avoid naming your column "Polygon" or "polygon"—this can cause rendering errors in Superset 5.0.0. Use a different name like "geom" or "shape" (details).
  5. Compare the row count in SQL Lab/Explore with the chart. If they differ, it's almost always a column selection, data type, or filter issue.

If you still see 0 rows, double-check the raw SQL output and dataset column definitions for mismatches or data type issues. If every row contains a valid GeoJSON Feature string and the column is selected and typed correctly, the chart should display your data.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

I think that all these points are respected, but maybe I missed something :

  1. The column name is "geometry", I test with "geom" just in case but it produces the same result.
  2. The "geometry" column has a type "TEXTT"
  3. There is no filter on datas
  4. Column name is "geometry"
  5. In SQL Lab I have results

Image

Image

Image

Image

Everything seems correct no ?

Comment From: dosubot[bot]

The column type 'TEXTT' is likely the root cause—Superset expects the GeoJSON column to be recognized as 'TEXT' (or equivalent string type) in both your database/view and the Superset dataset definition. If the type is misspelled or unrecognized, Superset may not parse the data correctly, resulting in 0 rows in the chart even though SQL Lab shows results.

To fix this: update your view or table so the column type is 'TEXT', then refresh (sync) the dataset schema in Superset so it picks up the correct type. After syncing, re-select the GeoJSON column in the chart controls. This should resolve the issue and allow your data to display as expected. Superset is case-sensitive with column names, so make sure the spelling matches exactly in both the dataset and chart controls. If you still see 0 rows, check for backend/server log errors and confirm there are no filters or row limits excluding data.

More details on how Superset handles column types and schema sync can be found here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

I misspelled in my previous post, it is not "TEXTT" But "TEXT" like my second capture shows it.

Comment From: dosubot[bot]

Thanks for clarifying—the column type being "TEXT" is correct. Given that, the most common reasons for 0 rows in the Deck.gl GeoJSON chart are: the dataset schema in Superset not being refreshed after changes, a mismatch in column name or case between your database/view and the chart controls, or a parsing error due to a single malformed or NULL value in the GeoJSON column. Superset's backend is strict—any mismatch or invalid value can cause the chart to show 0 rows, even if SQL Lab displays results.

Try syncing (refreshing) your dataset schema in Superset, double-check the selected column name in the chart controls, and test with a minimal dataset (just a few rows, only the GeoJSON column) to rule out data-specific issues. If the problem persists, check the Superset backend logs for errors when loading the chart—any parsing or schema mismatch will usually show up there. More details on the backend flow and strict requirements are here.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

I tried this, displaying only 10 elements but there are always 0 rows displayed. I don't find any log file on containers, can you specify where I can find this file ? With admin account, I found the "Action Log" UI but I don't find any error in logs.

Image

Comment From: dosubot[bot]

Superset logs are sent to stdout/stderr by default when running in containers (like Docker). You can view these logs using docker logs <container_name>. No log files are created inside the container unless you explicitly enable file-based logging in your Superset config.

If you want Superset to write logs to a file (for example, for easier searching or archiving), you can add these settings to your superset_config.py or config.py:

LOG_LEVEL = logging.DEBUG
ENABLE_TIME_ROTATE = True
TIME_ROTATE_LOG_LEVEL = logging.DEBUG
FILENAME = os.path.join(DATA_DIR, "superset.log")
ROLLOVER = "midnight"
INTERVAL = 1
BACKUP_COUNT = 30

By default, the log file will be at ~/.superset/superset.log unless you set the SUPERSET_HOME environment variable to change the data directory. In Docker, unless you mount a volume for logs, you’ll still want to use docker logs for troubleshooting. The Action Log UI only shows user actions and audit events, not backend errors—backend errors and warnings are found in the container logs or the log file if you configure one (config.py reference).

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: aklein-1s

Ok thanks I check the log with a general docker compose logs -f I don't see any error :

superset_app          | 172.18.0.1 - - [20/Aug/2025:07:20:02 +0000] "GET /api/v1/me/ HTTP/1.0" 200 207 "https://rou-d-devops.1spatial.fr/explore/?form_data_key=Tcg-np3S0aw&slice_id=742" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0"
superset_app          | 2025-08-20 07:20:03,967:WARNING:superset.views.base:Superset.explore_json This API endpoint is deprecated and will be removed in version 5.0.0
superset_app          | 2025-08-20 07:20:03,975:INFO:superset.viz:Cache key: 86c6269b9a9c8545b8e5b0697c52749e
superset_app          | 2025-08-20 07:20:03,977:INFO:superset.viz:Serving from cache
superset_app          | 172.18.0.1 - - [20/Aug/2025:07:20:03 +0000] "POST /superset/explore_json/?form_data=%7B%22slice_id%22%3A742%7D HTTP/1.0" 200 1013 "https://rou-d-devops.1spatial.fr/explore/?form_data_key=Tcg-np3S0aw&slice_id=742" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0"
superset_app          | 2025-08-20 07:20:04,054:WARNING:superset.views.base:Superset.explore_json This API endpoint is deprecated and will be removed in version 5.0.0
superset_app          | 2025-08-20 07:20:04,062:INFO:superset.viz:Cache key: 86c6269b9a9c8545b8e5b0697c52749e
superset_app          | 2025-08-20 07:20:04,064:INFO:superset.viz:Serving from cache
superset_app          | 172.18.0.1 - - [20/Aug/2025:07:20:04 +0000] "POST /superset/explore_json/?form_data=%7B%22slice_id%22%3A742%7D&results=true HTTP/1.0" 200 280 "https://rou-d-devops.1spatial.fr/explore/?form_data_key=Tcg-np3S0aw&slice_id=742" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0"
superset_app          | 172.18.0.1 - - [20/Aug/2025:07:20:05 +0000] "PUT /api/v1/explore/form_data/Tcg-np3S0aw?tab_id=5 HTTP/1.0" 200 27 "https://rou-d-devops.1spatial.fr/explore/?form_data_key=Tcg-np3S0aw&slice_id=742" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0"
superset_app          | 172.18.0.1 - - [20/Aug/2025:07:20:05 +0000] "POST /superset/log/?explode=events HTTP/1.0" 200 9 "https://rou-d-devops.1spatial.fr/explore/?form_data_key=Tcg-np3S0aw&slice_id=742" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:141.0) Gecko/20100101 Firefox/141.0"

Comment From: rusackas

Can you give us a SQL query the generates the data in the same shape you're seeing it, so we can test with that as a sample?