I have mongodb on server 122.xxx.xxx.xxx. The version of mongodb is 3.4.1. I was asked to combine real-time data from MongoDB into a super-set of BI to create various dashboards.
I tried as follows:
Using an external data wrapper mongodb + multicorn + yam_fdw o create an external table in postgresql
In the 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
Successfully upload data
But the external table appears only in the section section. On the SQL Labs tab
Missing external table
Does anyone know how to make an external table appear on the SQL Lab tab?
OS: Mac 64 bit
source
share