I have a mongodb on a server 122.xxx.xxx.xxx. The mongodb version is 3.4.1. I was asked to pool the real-time data from MongoDB to the superset BI to create various dashboards.
I have tried the following way:
Use a Foreign Data Wrapper mongodb + multicorn + yam_fdw o create a foreign table in postgresql
In Postgresql console:
CREATE EXTENSION multicorn;
CREATE SERVER mongodb_proxy_server FOREIGN DATA WRAPPER multicorn OPTIONS (wrapper 'yam_fdw.Yamfdw');
CREATE FOREIGN TABLE event_warnings (
"_id" varchar OPTIONS (type 'ObjectId'),
"ID" varchar, "Point" varchar,
"Start_Time" timestamptz, "Stop_Time" timestamptz, "Area" varchar,
"Value" float, "Station" varchar, "Device" varchar, "Warning_Type" varchar,
"Warning_Upper_Limit" float, "Warning_Lower_Limit" float,
"Warning_Method" int
)
SERVER mongodb_proxy_server OPTIONS (
db 'XXX', collection 'event_warnings',
host '122.XXX.XXX.XXX', port '27017', user 'username', password 'password'
);
In superset
But the foreign table only appears in the slices section. In the SQL lab tab,
Anyone knows how to make the foreign table appears in the SQL lab tab ?
OS: Mac 64 bit