Define Schema for a Collection
You can modify and define the schema for a collection that you want to import as source or target object in Informatica Cloud.
1. Open the ODBC Data Source Administrator.
2. Select the Informatica MongoDB ODBC Driver DSN.
3. Click Configure.
4. Click Schema Definition.
The Schema Definition dialog box appears.
5. Click Browse and select a schema definition file.
You can also enter a file name in the file selection dialog box to create and use a new schema definition file.
6. Choose one of the following collection export options to the schema definition file:
- - Export all the collections in the MongoDB database.
- - Export the tables that are missing from the schema definition file and available in the MongoDB database.
- - Select a particular collection in the MongoDB database. Optionally, you can enter a JSON filter statement to filter records.
7. Click Launch Schema Editor.
The Schema Editor application appears.
8. Select a collection and define the schema in the Schema Editor according to the requirement.
9. Close the schema editor after you save the changes.
You can also save the schema changes to a different schema definition file.
10. Select whether to store the metadata in the MongoDB database or in a local file.
11. Click Import File to store metadata definition from the schema definition file.
If you read the metadata from a file instead of the MongoDB database, place the schema definition file in the same folder as the metadata file.
Updating the Schema File for Changes in MongoDB Schema
You can update the schema file to reflect metadata changes in the MongoDB database or make changes in the imported metadata.
1. Open the schema definition by using the Informatica MongoDB ODBC Driver DSN.
2. Click Browse and select a schema definition file.
You can also enter a file name in the file selection dialog box to create and use a new schema definition file.
3. Export the metadata to the SSD file.
- a. To export the metadata imported by using the MongoDB ODBC driver, click Export Existing.
- b. To export metadata sampled from the MongoDB database, click Generate All.
- c. To export any missing tables and add metadata, click Generate Missing.
4. From the Database source table list, select the table to be updated.
5. Click Generate Table to update the schema of the table from the database.
6. Click Edit Schema File to open the schema file that you exported.
7. In the Schema Editor, make the required modifications in the schema file to reflect the metadata changes.
Note: When you update metadata, press Enter and then click Save to ensure that the changes to the metadata are saved.
8. Save the schema file and close the Schema Editor dialog box.
9. In the Schema Definition dialog box, click Update Metadata to replace the metadata with the metadata from the SSD file.