ginorossivn-eng commented on issue #36779:
URL: https://github.com/apache/superset/issues/36779#issuecomment-3881900545

   CREATE OR ALTER VIEW dbo.VW_KET_NOI_BAN_DO
   AS
   SELECT
       d.maTinh,
       d.tenTinh AS name,
   
       -- 🔥 BẮT BUỘC: wrap geometry thành Feature
       JSON_QUERY(
           CONCAT(
               '{"type":"Feature","geometry":',
               b.geojson,
               '}'
           )
       ) AS geojson,
   
       COUNT(f.maFact) AS SoDiemKetNoi
   FROM dbo.DanhMucTinh d
   LEFT JOIN dbo.BanDoTinh b
       ON d.maTinh = b.maTinh
   LEFT JOIN dbo.FACT_KET_NOI f
       ON d.maTinh = f.maTinh
   WHERE b.geojson IS NOT NULL
   GROUP BY
       d.maTinh, d.tenTinh, b.geojson;
   GO
   
   Above is my original code in the SQL, but the map (deck.gl Polygon) only 
show the count (SoDiemKetNoi) when hovering, it didn't show the name of the 
provinces or the provinces' code. How to solve this problem? Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to