When selecting data from MongoDB table using MongoDB connector (Qlik ODBC Connector package), some fields are not recognized by the connector. These fields do exist in certain documents of the table, but does not show up in the "Select data to load" wizard.
This happens when loading the whole table. When separating the sample problematic entries to a new MongoDB collection, the issue does not happen.
For better performance, Qlik MongoDB does not scan all documents in the source table to build up table metadata. Instead, it follows a sampling strategy to pick up a sample set of documents. Default sampling strategy is to take the first 100 documents.
If a filed does not appear in the sampled documents, it will not be captured in metadata of the table in and thus does't show up in "Select data to load"
- Qlik OBDC Connector Package all versions
Check if the missing fields exists within the first 100 documents of the source table.
If it is not, configure the following Advanced parameters appropriately to make sure at least one document containing the missing fields is captured in the samples.
- Default value: 100
- The maximum number of records that the driver can sample to generate a temporary schema definition.
- When this option is set to 0, the driver samples every document in the database.
- Default value : Forward
- This options specifies how the driver samples data when generating a temporary schema definition.
- Possible values:
- Forward: The driver samples data starting from the first record in the database, then samples the next record, and so on.
- Backwards: The driver samples data starting from the last record in the database, then samples the preceding record, and so on.
- Random: The driver selects sample records from the data source at random until the sampling limit is reached.
Note: The random sampling strategy is only supported by MongoDB Server 3.2 or higher.
- Default Value : 1
- The interval at which the driver samples records when scanning through the database to generate a temporary schema definition. For example, if you set this option to 2, then the driver samples every second record in the database.
- If the Sampling Method is set to Random, this setting is ignored.
You can find more details about advanced parameters in Simba' help site (the third party provider for Qlik ODBC Connector package) at https://www.simba.com/products/MongoDB/doc/ODBC_InstallGuide/win/content/odbc/m2/options/options-schema.htm