Verify SAS/ACCESS Interface to MongoDB
To verify the connection to MongoDB after the deployment has completed:
- From SAS Studio, edit
and run the following SAS code to verify the SAS/ACCESS Interface
to MongoDB LIBNAME statement:
libname mgo mongo server="MongoDB-host-name" database="Mongodb-database-name" user="user-ID" password="user-password" schema_collection="name-of-MongoDB-collection-for-reuse";If SAS/ACCESS Interface to MongoDB was successfully deployed, the execution of the LIBNAME statement returns results without error.
- From SAS Studio, edit
and run the following SAS code to verify the caslib statement:
caslib mgo datasource=(srctype=" mongodb", server="MongoDB-host-name" database="Mongodb-database-name" user="user-ID" password="user-password" schema_collection="name-of-MongoDB-collection-for-reuse"); proc casutil; list files incaslib="mgo"; run;If the caslib statement was successful, the results are the names of the tables in MongoDB.
If either statement returns an error or if no results are returned, review the SAS/ACCESS README file located at $deploy/sas-bases/examples/data-access/README.md (for Markdown) or $deploy/sas-bases/docs/configuring_sasaccess_and_data_connectors_for_sas_viya_4.htm (for HTML) to determine whether additional configuration steps are required for SAS/ACCESS Interface to MongoDB.