GoodData-MongoDB BI Connector Integration Details
When setting up direct data distribution from your MongoDB database through the MongoDB Connector for BI, pay attention to the considerations and best practices listed in this article.
This article is applicable to all use cases of GoodData and MySQL integration:
- Integrate a Data Source for a Data Warehouse (a getting-started guide based on sample data)
- Integrate Data Warehouses Directly to GoodData based on an Existing LDM
Contents:
Ports Used
You can use any port from within the range of 1024-65535.
User Access Rights
We recommend that you grant the following access rights to the user who is referenced in Data Sources:
The following template can used to create a user:
db.createUser(
{
user: "<username>",
pwd: "<password>",
roles: [ { role: "read", db: "<dbname>" } ]
}
)
The following template can be used to update a user:
db.grantRolesToUser(
"<username>",
[ { role: "read", db: "<dbname>" } ]
)
Data Types
When generating the GoodData logical data model (LDM), your MongoDB Connector for BI automatically converts your data to a type that is supported by your connector. This data is then converted to a format that the LDM supports. If you want to prevent automatic changes, update the schema manually. For more information on MongoDB BI Connector file formats, see the MongoDB documentation for their Document Relational Definition Language.
MongoDB
MongoDB BI MySQL Data Type
GoodData LDM Data Type
NUMERIC
NUMERIC
DECIMAL(12,2)
DATES
TIMESTAMP
DATE
TIMESTAMPS
NULL
-
OBJECTID
VARCHAR
VARCHAR
UUID
VARCHAR
VARCHAR
Heterogeneous Fields
BI Connector uses the most frequently sampled type.
GoodData uses and converts the data type the BI Connector selects according to the information in this table.
Other field types not specified (for example BOOLEAN, FLOAT)
Refer to MongoDB documentation.
Transforms according to MYSQL data types.
GoodData system columns have the following format:
GoodData System Columns | MongoDB | MySQL Data Types |
---|---|---|
x__timestamp | DATETIME | TIMESTAMP |
x__deleted | BOOLEAN, CHAR, VARCHAR, TEXT | BOOLEAN, CHAR, VARCHAR, TEXT |
x__client_id | CHAR, VARCHAR, TEXT | CHAR, VARCHAR, TEXT |
Please consider the following information when preparing your MongoDB data for integration with GoodData:
- The MongoDB Connector for BI transforms complex MongoDB documents into one parent object with many related objects. All objects (parent and related) use the same IDs from the parent Mongo document, but related objects have an additional ID that is based on their order number in the parent document.
- If you have more than one client’s data that you are trying to read through the MongoDB Connector for BI, you must assign a
x__client_id
to that data. For more information, see Automated Data Distribution v2 for Data Warehouses.
Limitations
We do not support the following versions of MongoDB:
- MongoDB 3.2
- MongoDB 3.4
- MongoDB 3.6