Can not render POIs using view


#1

Hello, I have created a view that connects two tables. There are only 4 records in the main table.

MapD Immerse’s POINTMAP can render POIs using the main table(testTable) but could not render the same POIs using the view(testView). When adding a chart on new dashboard, after selecting
lon and lat, MapD Immerse had no response and waited for a long time.

My SQL was wrong?

My SQL was the following.
Thank you.

create table testTable (
data_type integer,
name text encoding dict,
lat float,
lon float
);

create table testDataType (
data_type integer,
type_name text encoding dict
);

insert into testTable values (1, ‘Tokyo’, 35.681188, 139.767266);
insert into testTable values (1, ‘Shinjyuku’, 35.689713, 139.700401);
insert into testTable values (1, ‘Shibuya’, 35.658674, 139.701227);
insert into testTable values (1, ‘Shinagawa’, 35.628486, 139.739317);

insert into testDataType values (1, ‘Station’);

create view testView as select type_name, name, lon, lat, testTable.rowid
from testTable join testDataType on testTable.data_type=testDataType.data_type;

$ mapdql -v
MapDQL Version: 3.3.0-20171026-ed76a7a


#2

Hi @kiuchi,

I followed these exact instructions and had no issues rendering this data on a pointmap. Can you describe exactly the configuration you are using to make the pointmap? Were you able to render other tables or views successfully?

Note I am using 3.3.1 so if possible you might try upgrading to that version.

Regards


#3

Hi, @darwin, thank you for your reply.

I tested once more using 3.3.0.

  1. Create table and view.

[mapd@localhost test]$ mapdql -v
MapDQL Version: 3.3.0-20171026-ed76a7a

[mapd@localhost test]$ cat test.sql
drop view testView;
drop table testTable;
drop table testDataType;

create table testTable (
data_type integer,
name text encoding dict,
lat float,
lon float
);

create table testDataType (
data_type integer,
name text encoding dict
);

insert into testTable values (1, ‘Tokyo’, 35.681188, 139.767266);
insert into testTable values (1, ‘Shinjyuku’, 35.689713, 139.700401);
insert into testTable values (1, ‘Shibuya’, 35.658674, 139.701227);
insert into testTable values (1, ‘Shinagawa’, 35.628486, 139.739317);

insert into testDataType values (1, ‘Station’);

create view testView as select tdt.name as data_type, tt.name as name, tt.lon, tt.lat, tt.rowid
from testTable tt, testDataType tdt
where tt.data_type=tdt.data_type;

[mapd@localhost test]$ mapdql -u mapd -p mapd < test.sql
User mapd connected to database mapd
User mapd disconnected from database mapd

[mapd@localhost test]$ mapdql -u mapd -p mapd
User mapd connected to database mapd
mapdql> select * from testTable;
data_type|name|lat|lon
1|Tokyo|35.681187|139.767273
1|Shinjyuku|35.689713|139.700394
1|Shibuya|35.658672|139.701233
1|Shinagawa|35.628487|139.739319
mapdql> select * from testView;
data_type|name|lon|lat
Station|Tokyo|139.767273|35.681187
Station|Shinjyuku|139.700394|35.689713
Station|Shibuya|139.701233|35.658672
Station|Shinagawa|139.739319|35.628487
mapdql> select * from testDataType;
data_type|name
1|Station

  1. Open MapD Immerse Dashboard.
  2. Click “New Dashboard”, then “Data Manager” will open.
  3. Select “testTable”.
  4. Click “Connect to Table”.
  5. Click “+ Add Chart”.
  6. Click “POINTMAP”, then select “lon” for Lon and “lat” for Lat, then POIs were rendered on map.
  7. Next, check if view is ok or not. Click “DASHBOARDS”.
  8. Click “New Dashboard”.
  9. Click “Connect to Table”.
  10. Click “+ Add Chart”.
  11. Click “POINTMAP”, then select “lon” for Lon and “lat” for Lat, the circle indicating processing is forever displayed, and POIs never rendered.

Were you able to render other tables or views successfully?

No, I could not render all of the linked views and linked tables(←Vega process).
I’ll try to check 3.3.1 soon.

Thank you.


#4

Hi, @darwin thank you for checking 3.3.1.
I checked 3.3.1 also, I found that this problem was solved, but another problem was found.

[mapd@localhost test]$ mapdql -v
MapDQL Version: 3.3.1-20171108-32e7bcc
[mapd@localhost test]$ mapdql -u mapd -p mapd < test.sql
User mapd connected to database mapd
User mapd disconnected from database mapd
[mapd@localhost test]$
  1. When creating POINTMAP of testView, POIs were rendered successfully.

  2. Set data_type as Color, and add data_type in POPUP BOX.

  1. Click “Apply”, move mouse pointer on one of stations.
    The tooltip should be “Station”, but the result was “1”,

  2. When scroll the map, then no response.

Regards