Hello, In jaspersoft server I have created a new data source connecting to a mongo database however when i am trying to create a domain it does not list the datasource so i can create a domain.
Am i missing soemthing ?
Jaspersoft support for MongoDB uses a custom data source. Domains do not work with custom data sources.
However, as for 5.6 release you can use VDS (Virtual Data Source) to create domains. For that, you need to:
- Create a MongoDB Data Source (make sure you also include schema DDL in the Schema field. Sample below)
- Create a VDS Data Source, use the MongoDB DS you've created before.
- Create a domain using the VDS data source.
The Schema DDL is important, and you may run into issues if not properly defined. So before creating the MongoDB Data Source make sure you've mapped your MongoDB collection/documment to a SQL DDL, as the one below which uses MongoDB Zips dataset.
CREATE FOREIGN TABLE zips ( id integer PRIMARY KEY, city varchar(255), population integer, state varchar(128) ) OPTIONS(UPDATABLE 'TRUE'); CREATE FOREIGN TABLE location ( id integer PRIMARY KEY, latitude varchar(64), longitude varchar(64), FOREIGN KEY (id) REFERENCES zips (id) ) OPTIONS (UPDATABLE 'TRUE', "teiid_mongo:MERGE" 'Zips');
Hi there -
If you created and successfully tested the data source, then it should be available from the pop up where you browse the repository when initalizing the Domain file. You might want to double-check the save location. It should be listed in the pop up. Are you getting an error of any sort?
Let us know.