From 64f934df152aae0fad51494a91f5dc6b276061bf Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Wed, 16 Jun 2021 11:49:08 +0530 Subject: [PATCH 01/13] Copying the previous release content Former-commit-id: 4eaec5bd8b7fece755fe4582548a18e51912e201 --- .../mongo_data_adapter/5.2.9/01_whats_new.mdx | 10 + .../5.2.9/02_requirements_overview.mdx | 23 + .../5.2.9/03_architecture_overview.mdx | 9 + .../04_installing_the_mongo_data_adapter.mdx | 338 ++++++++++++++ .../05_updating_the_mongo_data_adapter.mdx | 37 ++ .../5.2.9/06_features_of_mongo_fdw.mdx | 71 +++ .../07_configuring_the_mongo_data_adapter.mdx | 437 ++++++++++++++++++ ...8_example_using_the_mongo_data_adapter.mdx | 113 +++++ .../09_identifying_data_adapter_version.mdx | 19 + .../5.2.9/10_limitations.mdx | 11 + ...11_uninstalling_the_mongo_data_adapter.mdx | 27 ++ .../5.2.9/images/EDB_logo.png | 3 + .../ambari_administrative_interface.png | 3 + .../5.2.9/images/edb_logo.svg | 19 + .../5.2.9/images/installation_complete.png | 3 + .../installation_wizard_welcome_screen.png | 3 + .../images/mongo_server_with_postgres.png | 3 + .../progress_as_the_servers_restart.png | 3 + .../5.2.9/images/restart_the_server.png | 3 + .../5.2.9/images/setup_wizard_ready.png | 3 + .../specify_an_installation_directory.png | 3 + ...the_installation_wizard_welcome_screen.png | 3 + .../docs/mongo_data_adapter/5.2.9/index.mdx | 15 + 23 files changed, 1159 insertions(+) create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/02_requirements_overview.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/03_architecture_overview.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/08_example_using_the_mongo_data_adapter.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/09_identifying_data_adapter_version.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/10_limitations.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/images/EDB_logo.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/ambari_administrative_interface.png create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/images/edb_logo.svg create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/installation_complete.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/installation_wizard_welcome_screen.png create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/images/mongo_server_with_postgres.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/progress_as_the_servers_restart.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/restart_the_server.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/setup_wizard_ready.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/specify_an_installation_directory.png create mode 100755 product_docs/docs/mongo_data_adapter/5.2.9/images/the_installation_wizard_welcome_screen.png create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/index.mdx diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx new file mode 100644 index 00000000000..864a831e6ff --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx @@ -0,0 +1,10 @@ +--- +title: "What’s New" +--- + + + +The following features are added to create MongoDB Foreign Data Wrapper `5.2.8`: + +- Support for EDB Postgres Advanced Server 13. +- Support for Ubuntu 20.04 LTS platform. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/02_requirements_overview.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/02_requirements_overview.mdx new file mode 100644 index 00000000000..6078203da1c --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/02_requirements_overview.mdx @@ -0,0 +1,23 @@ +--- +title: "Requirements Overview" +--- + +## Supported Versions + +The MongoDB Foreign Data Wrapper is certified with EDB Postgres Advanced Server 9.6 and above. + +## Supported Platforms + +The MongoDB Foreign Data Wrapper is supported on the following platforms: + +**Linux x86-64** + +> - RHEL 8.x/7.x +> - CentOS 8.x/7.x +> - OL 8.x/7.x +> - Ubuntu 20.04/18.04 LTS +> - Debian 10.x/9.x + +**Linux on IBM Power8/9 (LE)** + +> - RHEL 7.x diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/03_architecture_overview.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/03_architecture_overview.mdx new file mode 100644 index 00000000000..3e48035f7a0 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/03_architecture_overview.mdx @@ -0,0 +1,9 @@ +--- +title: "Architecture Overview" +--- + + + +The MongoDB data wrapper provides an interface between a MongoDB server and a Postgres database. It transforms a Postgres statement (`SELECT`/`INSERT`/`DELETE`/`UPDATE`) into a query that is understood by the MongoDB database. + +![Using MongoDB FDW with Postgres](images/mongo_server_with_postgres.png) diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx new file mode 100644 index 00000000000..b1450a6c26c --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx @@ -0,0 +1,338 @@ +--- +title: "Installing the MongoDB Foreign Data Wrapper" +--- + + + +The MongoDB Foreign Data Wrapper can be installed with an RPM package. During the installation process, the installer will satisfy software prerequisites. + + + +## Installing the MongoDB Foreign Data Wrapper using an RPM Package + +You can install the MongoDB Foreign Data Wrapper using an RPM package on the following platforms: + +- [RHEL 7](#rhel7) +- [RHEL 8](#rhel8) +- [CentOS 7](#centos7) +- [CentOS 8](#centos8) + + + +### On RHEL 7 + +Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: + +Install the `epel-release` package: + + ```text + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + ``` + +Enable the optional, extras, and HA repositories: + + ```text + subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" + ``` + +You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + + + +After receiving your repository credentials: + +1. Create the repository configuration file. +2. Modify the file, providing your user name and password. +3. Install `edb-as-mongo_fdw`. + +**Creating a Repository Configuration File** + +To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` + +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + +**Modifying the file to provide your user name and password** + +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. + + ```text + [edb] + name=EnterpriseDB RPMs $releasever - $basearch + baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch + enabled=1 + gpgcheck=1 + repo_gpgcheck=1 + gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY + ``` + +**Installing the MongoDB Foreign Data Wrapper** + +After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + + ``` + yum install edb-as-mongo_fdw + ``` + +where `xx` is the server version number. + +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + + + +### On RHEL 8 + +Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: + +Install the `epel-release` package: + + ```text + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + ``` + +Enable the `codeready-builder-for-rhel-8-\*-rpms` repository: + + ```text + ARCH=$( /bin/arch ) + subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms" + ``` + +You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + + + +After receiving your repository credentials: + +1. Create the repository configuration file. +2. Modify the file, providing your user name and password. +3. Install `edb-as-mongo_fdw`. + +**Creating a Repository Configuration File** + +To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + dnf -y https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` + +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + +**Modifying the file to provide your user name and password** + +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. + + ```text + [edb] + name=EnterpriseDB RPMs $releasever - $basearch + baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch + enabled=1 + gpgcheck=1 + repo_gpgcheck=1 + gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY + ``` + +**Installing the MongoDB Foreign Data Wrapper** + +After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + + ```text + dnf install edb-as-mongo_fdw + ``` + +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + + + +### On CentOS 7 + +Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: + +Install the `epel-release` package: + + ```text + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + ``` + +!!! Note + You may need to enable the `[extras]` repository definition in the `CentOS-Base.repo` file (located in `/etc/yum.repos.d`). + +You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + + + +After receiving your repository credentials you can: + +1. Create the repository configuration file. +2. Modify the file, providing your user name and password. +3. Install `edb-as-mongo_fdw`. + +**Creating a Repository Configuration File** + +To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` + +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + +**Modifying the file to provide your user name and password** + +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. + + ```text + [edb] + name=EnterpriseDB RPMs $releasever - $basearch + baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch + enabled=1 + gpgcheck=1 + repo_gpgcheck=1 + gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY + ``` + +**Installing the MongoDB Foreign Data Wrapper** + +After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + + ```text + yum install edb-as-mongo_fdw + ``` + +where `xx` is the server version number. + +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + + + +### On CentOS 8 + +Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: + +Install the `epel-release` package: + + ```text + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + ``` + +Enable the `PowerTools` repository: + + ```text + dnf config-manager --set-enabled PowerTools + ``` + +You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + + + +After receiving your repository credentials: + +1. Create the repository configuration file. +2. Modify the file, providing your user name and password. +3. Install `edb-as-mongo_fdw`. + +**Creating a Repository Configuration File** + +To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` + +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + +**Modifying the file to provide your user name and password** + +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. + + ```text + [edb] + name=EnterpriseDB RPMs $releasever - $basearch + baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch + enabled=1 + gpgcheck=1 + repo_gpgcheck=1 + gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY + ``` + +**Installing the MongoDB Foreign Data Wrapper** + +After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + + ```text + dnf install edb-as-mongo_fdw + ``` + +where `xx` is the server version number. + +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + +## Installing the MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host + +To install the MongoDB Foreign Data Wrapper on a Debian or Ubuntu host, you must have credentials that allow access to the EDB repository. To request credentials for the repository, visit the [EDB website](https://www.enterprisedb.com/repository-access-request/). + +The following steps will walk you through using the EDB apt repository to install a Debian package. When using the commands, replace the `username` and `password` with the credentials provided by EDB. + +1. Assume superuser privileges: + + ```text + sudo su – + ``` + +2. Configure the EDB repository: + + On Debian 9 and Ubuntu: + + ```text + sh -c 'echo "deb https://username:password@apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list' + ``` + + On Debian 10: + + 1. Set up the EDB repository: + + ```text + sh -c 'echo "deb [arch=amd64] https://apt.enterprisedb.com/$(lsb_release -cs)-edb/ $(lsb_release -cs) main" > /etc/apt/sources.list.d/edb-$(lsb_release -cs).list' + ``` + + 1. Substitute your EDB credentials for the `username` and `password` in the following command: + + ```text + sh -c 'echo "machine apt.enterprisedb.com login password " > /etc/apt/auth.conf.d/edb.conf' + ``` + +3. Add support to your system for secure APT repositories: + + ```text + apt-get install apt-transport-https + ``` + +4. Add the EDB signing key: + + ```text + wget -q -O - https://:@apt.enterprisedb.com/edb-deb.gpg.key | apt-key add - + ``` + +5. Update the repository metadata: + + ```text + apt-get update + ``` + +6. Install the Debian package: + + ```text + apt-get install edb-as-mongo-fdw + ``` + +where `xx` is the server version number. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx new file mode 100644 index 00000000000..aa29e7403f9 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx @@ -0,0 +1,37 @@ +--- +title: "Updating the MongoDB Foreign Data Wrapper" +--- + + + +**Updating an RPM Installation** + +If you have an existing RPM installation of MongoDB Foreign Data Wrapper, you can use yum or dnf to upgrade your repository configuration file and update to a more recent product version. To update the `edb.repo` file, assume superuser privileges and enter: + +- On RHEL or CentOS 7: + + > `yum upgrade edb-repo` + +- On RHEL or CentOS 8: + + > `dnf upgrade edb-repo` + +yum or dnf will update the `edb.repo` file to enable access to the current EDB repository, configured to connect with the credentials specified in your `edb.repo` file. Then, you can use yum or dnf to upgrade any installed packages: + +- On RHEL or CentOS 7: + + > `yum upgrade edb-as-mongo_fdw` + +- On RHEL or CentOS 8: + + > `dnf upgrade edb-as-mongo_fdw` + + where `xx` is the server version number. + +**Updating MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host** + +To update MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host, use the following command: + +> `apt-get --only-upgrade install edb-as-mongo-fdw edb-libmongoc` +> +> where `xx` is the server version number. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx new file mode 100644 index 00000000000..aec81845037 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx @@ -0,0 +1,71 @@ +--- +title: "Features of the MongoDB Foreign Data Wrapper" +--- + + + +The key features of the MongoDB Foreign Data Wrapper are listed below: + +## Writable FDW + +The MongoDB Foreign Data Wrapper allows you to modify data on a MongoDB server. Users can `INSERT`, `UPDATE` and `DELETE` data in the remote MongoDB collections by inserting, updating and deleting data locally in foreign tables. See also: + +[Example: Using the MongoDB Foreign Data Wrapper](08_example_using_the_mongo_data_adapter/#example_using_the_mongo_data_adapter) + +[Data Type Mappings](07_configuring_the_mongo_data_adapter/#data-type-mappings) + +## Where Clause Push-down + +MongoDB Foreign Data Wrapper allows the push-down of `WHERE` clause only when clauses include comparison expressions that have a column and a constant as arguments. WHERE clause push-down is not supported where constant is an array. + +## Connection Pooling + +Mongo_FDW establishes a connection to a foreign server during the first query that uses a foreign table associated with the foreign server. This connection is kept and reused for subsequent queries in the same session. + +## Automated Cleanup + +The MongoDB Foreign Data Wrapper allows the cleanup of foreign tables in a single operation using the `DROP EXTENSION` command. This feature is especially useful when a foreign table has been created for a temporary purpose. The syntax of a `DROP EXTENSION` command is: + +> `DROP EXTENSION mongo_fdw CASCADE;` + +For more information, see [DROP EXTENSION](https://www.postgresql.org/docs/current/sql-dropextension.html). + +## Full Document Retrieval + +This feature allows to retrieve documents along with all their fields from collection without any knowledge of the fields in BSON document available in MongoDB's collection. Those retrieved documents are in the JSON format. + +You can retrieve all available fields in a collection residing in MongoDB Foreign Data Wrapper as explained in the following example: + +**Example**: + +The collection in MongoDB Foreign Data Wrapper: + +```text +> db.warehouse.find(); +{ "_id" : ObjectId("58a1ebbaf543ec0b90545859"), "warehouse_id" : 1, "warehouse_name" : "UPS", "warehouse_created" : ISODate("2014-12-12T07:12:10Z") } +{ "_id" : ObjectId("58a1ebbaf543ec0b9054585a"), "warehouse_id" : 2, "warehouse_name" : "Laptop", "warehouse_created" : ISODate("2015-11-11T08:13:10Z") } +``` + +Steps for retrieving the document: + +1. Create foreign table with a column name `__doc`. The type of the column could be json, jsonb, text or varchar. + +```text +CREATE FOREIGN TABLE test_json(__doc json) SERVER mongo_server OPTIONS (database 'testdb', collection 'warehouse'); +``` + +1. Retrieve the document. + +```text +SELECT * FROM test_json ORDER BY __doc::text COLLATE "C"; +``` + +The output: + +```text +edb=#SELECT * FROM test_json ORDER BY __doc::text COLLATE "C"; + __doc --------------------------------------------------------------------------------------------------------------------------------------------------------- +{ "_id" : { "$oid" : "58a1ebbaf543ec0b90545859" }, "warehouse_id" : 1, "warehouse_name" : "UPS", "warehouse_created" : { "$date" : 1418368330000 } } +{ "_id" : { "$oid" : "58a1ebbaf543ec0b9054585a" }, "warehouse_id" : 2, "warehouse_name" : "Laptop", "warehouse_created" : { "$date" : 1447229590000 } } +(2 rows) +``` diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx new file mode 100644 index 00000000000..b04ccf9e345 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx @@ -0,0 +1,437 @@ +--- +title: "Configuring the MongoDB Foreign Data Wrapper" +--- + + + +Before using the MongoDB Foreign Data Wrapper, you must: + +> 1. Use the [CREATE EXTENSION](#create-extension) command to create the MongoDB Foreign Data Wrapper extension on the Postgres host. +> 2. Use the [CREATE SERVER](#create-server) command to define a connection to the MongoDB server. +> 3. Use the [CREATE USER MAPPING](#create-user-mapping) command to define a mapping that associates a Postgres role with the server. +> 4. Use the [CREATE FOREIGN TABLE](#create-foreign-table) command to define a table in the Postgres database that corresponds to a database that resides on the MongoDB cluster. + + + +## CREATE EXTENSION + +Use the `CREATE EXTENSION` command to create the `mongo_fdw` extension. To invoke the command, use your client of choice (for example, psql) to connect to the Postgres database from which you will be querying the MongoDB server, and invoke the command: + +```text +CREATE EXTENSION [IF NOT EXISTS] mongo_fdw [WITH] [SCHEMA schema_name]; +``` + +**Parameters** + +`IF NOT EXISTS` + +> Include the `IF NOT EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the same name already exists. + +`schema_name` + +> Optionally specify the name of the schema in which to install the extension's objects. + +**Example** + +The following command installs the MongoDB foreign data wrapper: + +> `CREATE EXTENSION mongo_fdw;` + +For more information about using the foreign data wrapper `CREATE EXTENSION` command, see: + +> . + + + +## CREATE SERVER + +Use the `CREATE SERVER` command to define a connection to a foreign server. The syntax is: + +```text +CREATE SERVER server_name FOREIGN DATA WRAPPER mongo_fdw + [OPTIONS (option 'value' [, ...])] +``` + +The role that defines the server is the owner of the server; use the `ALTER SERVER` command to reassign ownership of a foreign server. To create a foreign server, you must have `USAGE` privilege on the foreign-data wrapper specified in the `CREATE SERVER` command. + +**Parameters** + +`server_name` + +> Use `server_name` to specify a name for the foreign server. The server name must be unique within the database. + +`FOREIGN_DATA_WRAPPER` + +> Include the `FOREIGN_DATA_WRAPPER` clause to specify that the server should use the `mongo_fdw` foreign data wrapper when connecting to the cluster. + +`OPTIONS` + +> Use the `OPTIONS` clause of the `CREATE SERVER` command to specify connection information for the foreign server object. You can include: + +| **Option** | **Description** | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| address | The address or hostname of the Mongo server. The default value is `127.0.0.1`. | +| port | The port number of the Mongo Server. Valid range is 0 to 65535. The default value is `27017`. | +| authentication_database | The database against which user will be authenticated. This option is only valid with password based authentication. | +| ssl | Requests an authenticated, encrypted SSL connection. By default, the value is set to `false`. Set the value to `true` to enable ssl. See to understand the options. | +| pem_file | SSL option | +| pem_pwd | SSL option. | +| ca_file | SSL option | +| ca_dir | SSL option | +| crl_file | SSL option | +| weak_cert_validation | SSL option | + +**Example** + +The following command creates a foreign server named `mongo_server` that uses the `mongo_fdw` foreign data wrapper to connect to a host with an IP address of `127.0.0.1`: + +```text +CREATE SERVER mongo_server FOREIGN DATA WRAPPER mongo_fdw OPTIONS (host '127.0.0.1', port '27017'); +``` + +The foreign server uses the default port (`27017`) for the connection to the client on the MongoDB cluster. + +For more information about using the `CREATE SERVER` command, see: + +> + + + +## CREATE USER MAPPING + +Use the `CREATE USER MAPPING` command to define a mapping that associates a Postgres role with a foreign server: + +```text +CREATE USER MAPPING FOR role_name SERVER server_name + [OPTIONS (option 'value' [, ...])]; +``` + +You must be the owner of the foreign server to create a user mapping for that server. + +**Parameters** + +`role_name` + +> Use `role_name` to specify the role that will be associated with the foreign server. + +`server_name` + +> Use `server_name` to specify the name of the server that defines a connection to the MongoDB cluster. + +`OPTIONS` + +> Use the `OPTIONS` clause to specify connection information for the foreign server. +> +> `username`: the name of the user on the MongoDB server. +> +> `password`: the password associated with the username. + +**Example** + +The following command creates a user mapping for a role named `enterprisedb`; the mapping is associated with a server named `mongo_server`: + +> `CREATE USER MAPPING FOR enterprisedb SERVER mongo_server;` + +If the database host uses secure authentication, provide connection credentials when creating the user mapping: + +```text +CREATE USER MAPPING FOR enterprisedb SERVER mongo_server OPTIONS (username 'mongo_user', password 'mongo_pass'); +``` + +The command creates a user mapping for a role named `enterprisedb` that is associated with a server named `mongo_server`. When connecting to the MongoDB server, the server will authenticate as `mongo_user`, and provide a password of `mongo_pass`. + +For detailed information about the `CREATE USER MAPPING` command, see: + +> + + + +## CREATE FOREIGN TABLE + +A foreign table is a pointer to a table that resides on the MongoDB host. Before creating a foreign table definition on the Postgres server, connect to the MongoDB server and create a collection; the columns in the table will map to columns in a table on the Postgres server. Then, use the `CREATE FOREIGN TABLE` command to define a table on the Postgres server with columns that correspond to the collection that resides on the MongoDB host. The syntax is: + +```text +CREATE FOREIGN TABLE [ IF NOT EXISTS ] table_name ( [ + { column_name data_type [ OPTIONS ( option 'value' [, ... ] ) ] [ COLLATE collation ] [ column_constraint [ ... ] ] + | table_constraint } + [, ... ] +] ) +[ INHERITS ( parent_table [, ... ] ) ] + SERVER server_name [ OPTIONS ( option 'value' [, ... ] ) ] +``` + +where `column_constraint` is: + +```text +[ CONSTRAINT constraint_name ] +{ NOT NULL | NULL | CHECK (expr) [ NO INHERIT ] | DEFAULT default_expr } +``` + +and `table_constraint` is: + +```text +[ CONSTRAINT constraint_name ] CHECK (expr) [ NO INHERIT ] +``` + +**Parameters** + +`table_name` + +> Specifies the name of the foreign table; include a schema name to specify the schema in which the foreign table should reside. + +`IF NOT EXISTS` + +> Include the `IF NOT EXISTS` clause to instruct the server to not throw an error if a table with the same name already exists; if a table with the same name exists, the server will issue a notice. + +`column_name` + +> Specifies the name of a column in the new table; each column should correspond to a column described on the MongoDB server. + +`data_type` + +> Specifies the data type of the column; when possible, specify the same data type for each column on the Postgres server and the MongoDB server. If a data type with the same name is not available, the Postgres server will attempt to cast the data type to a type compatible with the MongoDB server. If the server cannot identify a compatible data type, it will return an error. + +`COLLATE collation` + +> Include the `COLLATE` clause to assign a collation to the column; if not specified, the column data type's default collation is used. + +`INHERITS (parent_table [, ... ])` + +> Include the `INHERITS` clause to specify a list of tables from which the new foreign table automatically inherits all columns. Parent tables can be plain tables or foreign tables. + +`CONSTRAINT constraint_name` + +> Specify an optional name for a column or table constraint; if not specified, the server will generate a constraint name. + +`NOT NULL` + +> Include the `NOT NULL` keywords to indicate that the column is not allowed to contain null values. + +`NULL` + +> Include the `NULL` keywords to indicate that the column is allowed to contain null values. This is the default. + +`CHECK (expr) [NO INHERIT]` + +> Use the `CHECK` clause to specify an expression that produces a Boolean result that each row in the table must satisfy. A check constraint specified as a column constraint should reference that column's value only, while an expression appearing in a table constraint can reference multiple columns. +> +> A `CHECK` expression cannot contain subqueries or refer to variables other than columns of the current row. +> +> Include the `NO INHERIT` keywords to specify that a constraint should not propagate to child tables. + +`DEFAULT default_expr` + +> Include the `DEFAULT` clause to specify a default data value for the column whose column definition it appears within. The data type of the default expression must match the data type of the column. + +`SERVER server_name [OPTIONS (option 'value' [, ... ] ) ]` + +> To create a foreign table that will allow you to query a table that resides on a MongoDB file system, include the `SERVER` clause and specify the `server_name` of the foreign server that uses the MongoDB data adapter. +> +> Use the `OPTIONS` clause to specify the following `options` and their corresponding values: + +| option | value | +| ---------- | --------------------------------------------------------------------------------- | +| database | The name of the database to query. The default value is `test`. | +| collection | The name of the collection to query. The default value is the foreign table name. | + +**Example** + +To use data that is stored on MongoDB server, you must create a table on the Postgres host that maps the columns of a MongoDB collection to the columns of a Postgres table. For example, for a MongoDB collection with the following definition: + +```text +db.warehouse.find +( + { + "warehouse_id" : 1 + } +).pretty() +{ + "_id" : ObjectId("53720b1904864dc1f5a571a0"), + "warehouse_id" : 1, + "warehouse_name" : "UPS", + "warehouse_created" : ISODate("2014-12-12T07:12:10Z") +} +``` + +You should execute a command on the Postgres server that creates a comparable table on the Postgres server: + +```text +CREATE FOREIGN TABLE warehouse +( + _id NAME, + warehouse_id INT, + warehouse_name TEXT, + warehouse_created TIMESTAMPZ +) +SERVER mongo_server +OPTIONS (database 'db', collection 'warehouse'); +``` + +The first column of the table must be `_id` of the type `name`. + +Include the `SERVER` clause to specify the name of the database stored on the MongoDB server and the name of the table (`warehouse`) that corresponds to the table on the Postgres server. + +For more information about using the `CREATE FOREIGN TABLE` command, see: + +> + +!!! Note + MongoDB foreign data wrapper supports the write capability feature. + + + +### Data Type Mappings + +When using the foreign data wrapper, you must create a table on the Postgres server that mirrors the table that resides on the MongoDB server. The MongoDB data wrapper will automatically convert the following MongoDB data types to the target Postgres type: + +| **MongoDB (BSON Type)** | **Postgres** | +| ---------------------------- | ---------------------------------------- | +| ARRAY JSON BOOL BOOL | | +| BINARY BYTE | A | +| DATE_TIME DATE DOCUMENT JSON | /TIMESTAMP/TIMESTAMPTZ | +| DOUBLE FLOA | T/FLOAT4/FLOAT8/DOUBLE PRECISION/NUMERIC | +| INT32 SMAL | LINT/INT2/INT/INTEGER/INT4 | +| INT64 BIGI OID NAME | NT/INT8 | +| UTF8 BPCH | AR/VARCHAR/CHARCTER VARYING/TEXT | + +## DROP EXTENSION + +Use the `DROP EXTENSION` command to remove an extension. To invoke the command, use your client of choice (for example, psql) to connect to the Postgres database from which you will be dropping the MongoDB server, and run the command: + +```text +DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]; +``` + +**Parameters** + +`IF EXISTS` + +> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the specified name doesn't exists. + +`name` + +> Specify the name of the installed extension. It is optional. +> +> `CASCADE` +> +> Automatically drop objects that depend on the extension. It drops all the other dependent objects too. +> +> `RESTRICT` +> +> Do not allow to drop extension if any objects, other than its member objects and extensions listed in the same DROP command are dependent on it. + +**Example** + +The following command removes the extension from the existing database: + +> `DROP EXTENSION mongo_fdw;` + +For more information about using the foreign data wrapper `DROP EXTENSION` command, see: + +> . + +## DROP SERVER + +Use the `DROP SERVER` command to remove a connection to a foreign server. The syntax is: + +```text +DROP SERVER [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] +``` + +The role that drops the server is the owner of the server; use the `ALTER SERVER` command to reassign ownership of a foreign server. To drop a foreign server, you must have `USAGE` privilege on the foreign-data wrapper specified in the `DROP SERVER` command. + +**Parameters** + +`IF EXISTS` + +> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if a server with the specified name doesn't exists. + +`name` + +> Specify the name of the installed server. It is optional. +> +> `CASCADE` +> +> Automatically drop objects that depend on the server. It should drop all the other dependent objects too. +> +> `RESTRICT` +> +> Do not allow to drop the server if any objects are dependent on it. + +**Example** + +The following command removes a foreign server named `mongo_server`: + +> `DROP SERVER mongo_server;` + +For more information about using the `DROP SERVER` command, see: + +> + +## DROP USER MAPPING + +Use the `DROP USER MAPPING` command to remove a mapping that associates a Postgres role with a foreign server. You must be the owner of the foreign server to remove a user mapping for that server. + +```text +DROP USER MAPPING [ IF EXISTS ] FOR { user_name | USER | CURRENT_USER | PUBLIC } SERVER server_name; +``` + +**Parameters** + +`IF EXISTS` + +> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the user mapping doesn't exist. + +`user_name` + +> Specify the user name of the mapping. + +`server_name` + +> Specify the name of the server that defines a connection to the MongoDB cluster. + +**Example** + +The following command drops a user mapping for a role named `enterprisedb`; the mapping is associated with a server named `mongo_server`: + +> `DROP USER MAPPING FOR enterprisedb SERVER mongo_server;` + +For detailed information about the `DROP USER MAPPING` command, see: + +> + +## DROP FOREIGN TABLE + +A foreign table is a pointer to a table that resides on the MongoDB host. Use the `DROP FOREIGN TABLE` command to remove a foreign table. Only the owner of the foreign table can drop it. + +```text +DROP FOREIGN TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] +``` + +**Parameters** + +`IF EXISTS` + +> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the foreign table with the specified name doesn't exists. + +`name` + +> Specify the name of the foreign table. + +`CASCADE` + +> Automatically drop objects that depend on the foreign table. It should drop all the other dependent objects too. + +`RESTRICT` + +> Do not allow to drop foreign table if any objects are dependent on it. + +**Example** + +```text +DROP FOREIGN TABLE warehouse; +``` + +For more information about using the `DROP FOREIGN TABLE` command, see: + +> diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/08_example_using_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/08_example_using_the_mongo_data_adapter.mdx new file mode 100644 index 00000000000..38f2f35b122 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/08_example_using_the_mongo_data_adapter.mdx @@ -0,0 +1,113 @@ +--- +title: "Example: Using the MongoDB Foreign Data Wrapper" +--- + + + +Before using the MongoDB foreign data wrapper, you must connect to your database with a client application. The following examples demonstrate using the wrapper with the psql client. After connecting to psql, you can follow the steps in the example below: + +```text +-- load extension first time after install +CREATE EXTENSION mongo_fdw; + +-- create server object +CREATE SERVER mongo_server + FOREIGN DATA WRAPPER mongo_fdw + OPTIONS (address '127.0.0.1', port '27017'); + +-- create user mapping +CREATE USER MAPPING FOR enterprisedb + SERVER mongo_server + OPTIONS (username 'mongo_user', password 'mongo_pass'); + +-- create foreign table +CREATE FOREIGN TABLE warehouse + ( + _id name, + warehouse_id int, + warehouse_name text, + warehouse_created timestamptz + ) + SERVER mongo_server + OPTIONS (database 'db', collection 'warehouse'); + +-- Note: first column of the table must be "_id" of type "name". + +-- select from table +SELECT * FROM warehouse WHERE warehouse_id = 1; + _id | warehouse_id | warehouse_name | warehouse_created +--------------------------+--------------+----------------+--------------------------- + 53720b1904864dc1f5a571a0 | 1 | UPS | 2014-12-12 12:42:10+05:30 +(1 row) + +db.warehouse.find +( + { + "warehouse_id" : 1 + } +).pretty() +{ + "_id" : ObjectId("53720b1904864dc1f5a571a0"), + "warehouse_id" : 1, + "warehouse_name" : "UPS", + "warehouse_created" : ISODate("2014-12-12T07:12:10Z") +} + +-- insert row in table +INSERT INTO warehouse VALUES (0, 2, 'Laptop', '2015-11-11T08:13:10Z'); + +db.warehouse.insert +( + { + "warehouse_id" : NumberInt(2), + "warehouse_name" : "Laptop", + "warehouse_created" : ISODate("2015-11-11T08:13:10Z") + } +) + +-- delete row from table +DELETE FROM warehouse WHERE warehouse_id = 2; + +db.warehouse.remove +( + { + "warehouse_id" : 2 + } +) + +-- update a row of table +UPDATE warehouse SET warehouse_name = 'UPS_NEW' WHERE warehouse_id = 1; + +db.warehouse.update +( + { + "warehouse_id" : 1 + }, + { + "warehouse_id" : 1, + "warehouse_name" : "UPS_NEW", + "warehouse_created" : ISODate("2014-12-12T07:12:10Z") + } +) + +-- explain a table +EXPLAIN SELECT * FROM warehouse WHERE warehouse_id = 1; + QUERY PLAN +----------------------------------------------------------------- + Foreign Scan on warehouse (cost=0.00..0.00 rows=1000 width=84) + Filter: (warehouse_id = 1) + Foreign Namespace: db.warehouse +(3 rows) + +-- collect data distribution statistics +ANALYZE warehouse; + +-- drop foreign table +DROP FOREIGN TABLE warehouse; + +-- drop user mapping +DROP USER MAPPING FOR enterprisedb SERVER mongo_server; + +-- drop server +DROP SERVER mongo_server; +``` diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/09_identifying_data_adapter_version.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/09_identifying_data_adapter_version.mdx new file mode 100644 index 00000000000..b1d0564acc4 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/09_identifying_data_adapter_version.mdx @@ -0,0 +1,19 @@ +--- +title: "Identifying the MongoDB Foreign Data Wrapper Version" +--- + + + +The MongoDB Foreign Data Wrapper includes a function that you can use to identify the currently installed version of the `.so` file for the data wrapper. To use the function, connect to the Postgres server, and enter: + +```text +SELECT mongo_fdw_version(); +``` + +The function returns the version number: + +```text +mongo_fdw_version +----------------- + +``` diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/10_limitations.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/10_limitations.mdx new file mode 100644 index 00000000000..acdd2f2383c --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/10_limitations.mdx @@ -0,0 +1,11 @@ +--- +title: "Limitations" +--- + + + +The following limitations apply to MongoDB Foreign Data Wrapper: + +- If the BSON document key contains uppercase letters or occurs within a nested document, MongoDB Foreign Data Wrapper requires the corresponding column names to be declared in double quotes. +- PostgreSQL limits column names to 63 characters by default. You can increase the `NAMEDATALEN` constant in `src/include/pg_config_manual.h`, compile, and re-install when column names extend beyond 63 characters. +- MongoDB Foreign Data Wrapper errors out on BSON field which is not listed in the known types (For example: byte, arrays). It throws an error: `Cannot convert BSON type to column type`. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx new file mode 100644 index 00000000000..8313284a962 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx @@ -0,0 +1,27 @@ +--- +title: "Uninstalling the MongoDB Foreign Data Wrapper" +--- + + + +**Uninstalling an RPM Package** + +You can use the `yum remove` or `dnf remove` command to remove a package installed by `yum` or `dnf`. To remove a package, open a terminal window, assume superuser privileges, and enter the command: + +- On RHEL or CentOS 7: + + `yum remove edb-as-mongo_fdw` + +- On RHEL or CentOS 8: + + `dnf remove edb-as-mongo_fdw` + +Where `xx` is the server version number. + +**Uninstalling MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host** + +- To uninstall MongoDB Foreign Data Wrapper on a Debian or Ubuntu host, invoke the following command. + + `apt-get remove edb-as-mongo-fdw` + +Where `xx` is the server version number. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/EDB_logo.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/EDB_logo.png new file mode 100644 index 00000000000..f4a93cf57f5 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/EDB_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:07423b012a855204780fe5a2a5a1e33607304a5c3020ae4acbf3d575691dedd6 +size 12136 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/ambari_administrative_interface.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/ambari_administrative_interface.png new file mode 100755 index 00000000000..d44e42a740e --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/ambari_administrative_interface.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4acb08665b6a1df9494f91f9ab64a8f4d0979f61947e19162f419d134e351ea +size 150222 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/edb_logo.svg b/product_docs/docs/mongo_data_adapter/5.2.9/images/edb_logo.svg new file mode 100644 index 00000000000..f24d1dfefee --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/edb_logo.svg @@ -0,0 +1,19 @@ + + + edb-logo-disc-dark + + + + \ No newline at end of file diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_complete.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_complete.png new file mode 100755 index 00000000000..311d632a71e --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_complete.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e52a4437577b7a64d7f36c4f837b9a0fab90b163b201055bd817f0e3cbaf112a +size 39463 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_wizard_welcome_screen.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_wizard_welcome_screen.png new file mode 100755 index 00000000000..aaf582bc781 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/installation_wizard_welcome_screen.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:85ea24919ac97d6f8ebb882da665c22e4d5c0942b8491faa5e07be8b93007b60 +size 38341 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/mongo_server_with_postgres.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/mongo_server_with_postgres.png new file mode 100644 index 00000000000..76915580c4c --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/mongo_server_with_postgres.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:480cdbe86e1f31a6fd03d26a86425a25d681e515e747217c0c3961cb0a36027c +size 49128 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/progress_as_the_servers_restart.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/progress_as_the_servers_restart.png new file mode 100755 index 00000000000..43523c7d1ad --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/progress_as_the_servers_restart.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46a0feaf37642c3aa87fe8267259687dfa9c9571f1c2663297159ef98356e2fd +size 85080 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/restart_the_server.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/restart_the_server.png new file mode 100755 index 00000000000..2518b46d46d --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/restart_the_server.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e612201379d56b4dffcfb4222ceb765532ca5d097504c1dbabdc6a812afaba9 +size 33996 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/setup_wizard_ready.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/setup_wizard_ready.png new file mode 100755 index 00000000000..922e318868d --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/setup_wizard_ready.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3ba6a1a88fe8a91b94571b57a36077fce7b3346e850a38f9bf015166ace93e36 +size 16833 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/specify_an_installation_directory.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/specify_an_installation_directory.png new file mode 100755 index 00000000000..208c85c46af --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/specify_an_installation_directory.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dae28ab7f567617da49816514a3fa5eb6161e611c416295cfe2f829cd941f98e +size 20596 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/images/the_installation_wizard_welcome_screen.png b/product_docs/docs/mongo_data_adapter/5.2.9/images/the_installation_wizard_welcome_screen.png new file mode 100755 index 00000000000..2da19033b0e --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/images/the_installation_wizard_welcome_screen.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7fd52b490dd37c86dca15975a7dbc9bdd47c7ae4ab0912d1bf570d785c521f79 +size 33097 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx new file mode 100644 index 00000000000..5117f306aad --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx @@ -0,0 +1,15 @@ +--- +title: "MongoDB Foreign Data Wrapper Guide" +--- + +The MongoDB Foreign Data Wrapper (`mongo_fdw`) is a Postgres extension that allows you to access data that resides on a MongoDB database from EDB Postgres Advanced Server. It is a writable foreign data wrapper that you can use with Postgres functions and utilities, or in conjunction with other data that resides on a Postgres host. + +The MongoDB Foreign Data Wrapper can be installed with an RPM package. You can download an installer from the [EDB website](https://www.enterprisedb.com/software-downloads-postgres/). + +This guide uses the term `Postgres` to refer to an instance of EDB Postgres Advanced Server. + +
+ +whats_new requirements_overview architecture_overview installing_the_mongo_data_adapter updating_the_mongo_data_adapter features_of_mongo_fdw configuring_the_mongo_data_adapter example_using_the_mongo_data_adapter identifying_data_adapter_version limitations uninstalling_the_mongo_data_adapter conclusion + +
From 2135350fc33d59cb891523cee491dca81462be55 Mon Sep 17 00:00:00 2001 From: Josh Heyer <63653723+josh-heyer@users.noreply.github.com> Date: Mon, 21 Jun 2021 16:58:32 +0000 Subject: [PATCH 02/13] Deploy to test site Former-commit-id: 78ce3aced68a4eef183a9d57ee87a788a3c88d64 --- .../workflows/deploy-mongo-da-test-branch.yml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/deploy-mongo-da-test-branch.yml diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml new file mode 100644 index 00000000000..f9d51b47693 --- /dev/null +++ b/.github/workflows/deploy-mongo-da-test-branch.yml @@ -0,0 +1,60 @@ +name: Deploy MongoDB Data Adapter upcoming release branch to Netlify +on: + push: + branches: + - content/mongo-data-adapter/5-2-9/upcoming-release +jobs: + build-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: content/mongo-data-adapter/5-2-9/upcoming-release + fetch-depth: 0 # fetch whole repo so git-restore-mtime can work + - name: Update submodules + run: git submodule update --init --remote + - name: Adjust file watchers limit + run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: Install yarn + run: sudo npm -g install yarn + - name: Yarn install + run: yarn install --immutable + env: + NODE_ENV: ${{ secrets.NODE_ENV }} + + - name: Checking Gatsby cache + id: gatsby-cache-build + uses: actions/cache@v2 + with: + path: | + public + .cache + key: ${{ runner.os }}-gatsby-build-develop-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-gatsby-build-develop- + + - name: Fix mtimes + run: yarn fix-mtimes --force + - name: Gatsby build + run: yarn build + env: + APP_ENV: staging + NODE_ENV: ${{ secrets.NODE_ENV }} + NODE_OPTIONS: --max-old-space-size=4096 + ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} + ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} + ALGOLIA_INDEX_NAME: edb-docs-staging + INDEX_ON_BUILD: false + + - name: Netlify deploy + run: | + sudo yarn global add netlify-cli + netlify deploy --dir=public --prod + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WIP2_SITE_ID }} + From 3d270ed6a0fbf6726a32b00aefe41f343f00fd8e Mon Sep 17 00:00:00 2001 From: Josh Heyer <63653723+josh-heyer@users.noreply.github.com> Date: Mon, 21 Jun 2021 17:31:48 +0000 Subject: [PATCH 03/13] trigger run Former-commit-id: 1bc411c8714cce8fa9c72c0faacd3ff3d0d4d663 --- .github/workflows/deploy-mongo-da-test-branch.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml index f9d51b47693..bdd5b477603 100644 --- a/.github/workflows/deploy-mongo-da-test-branch.yml +++ b/.github/workflows/deploy-mongo-da-test-branch.yml @@ -57,4 +57,3 @@ jobs: env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WIP2_SITE_ID }} - From 8e3b3d4211d1bf29c8cc3bc1f5e23921a0f8c655 Mon Sep 17 00:00:00 2001 From: Josh Heyer <63653723+josh-heyer@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:48:05 +0000 Subject: [PATCH 04/13] poke it again Former-commit-id: 4c1e66ef74a8f6ee7b58a6606cef0ef3d54495d7 --- .github/workflows/deploy-mongo-da-test-branch.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml index bdd5b477603..14fa73dc6e7 100644 --- a/.github/workflows/deploy-mongo-da-test-branch.yml +++ b/.github/workflows/deploy-mongo-da-test-branch.yml @@ -1,4 +1,4 @@ -name: Deploy MongoDB Data Adapter upcoming release branch to Netlify +name: Deploy MongoDB FDW upcoming release branch to Netlify on: push: branches: From 16f82ff0767d772c6fd6ec4041eb7fb71fd83d89 Mon Sep 17 00:00:00 2001 From: Josh Heyer <63653723+josh-heyer@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:51:22 +0000 Subject: [PATCH 05/13] The sad bit is, this is at least the 3rd time I've made this exact error Former-commit-id: 2bd1fc03e8e496e31598f172e86bc5e1ca9981e5 --- .github/workflows/deploy-mongo-da-test-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml index 14fa73dc6e7..1e3d6648d0f 100644 --- a/.github/workflows/deploy-mongo-da-test-branch.yml +++ b/.github/workflows/deploy-mongo-da-test-branch.yml @@ -2,14 +2,14 @@ name: Deploy MongoDB FDW upcoming release branch to Netlify on: push: branches: - - content/mongo-data-adapter/5-2-9/upcoming-release + - content/mongo-data-adapter/5.2.9/upcoming-release jobs: build-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: - ref: content/mongo-data-adapter/5-2-9/upcoming-release + ref: content/mongo-data-adapter/5.2.9/upcoming-release fetch-depth: 0 # fetch whole repo so git-restore-mtime can work - name: Update submodules run: git submodule update --init --remote From fc73e4928e90c6af95d0bb3eb7ab9153f1919ff9 Mon Sep 17 00:00:00 2001 From: Josh Heyer <63653723+josh-heyer@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:53:05 +0000 Subject: [PATCH 06/13] just copy-paste the name Former-commit-id: 1bf94979ed93bb4aff3b37e85b8b22844fdee893 --- .github/workflows/deploy-mongo-da-test-branch.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml index 1e3d6648d0f..f4581292586 100644 --- a/.github/workflows/deploy-mongo-da-test-branch.yml +++ b/.github/workflows/deploy-mongo-da-test-branch.yml @@ -2,14 +2,14 @@ name: Deploy MongoDB FDW upcoming release branch to Netlify on: push: branches: - - content/mongo-data-adapter/5.2.9/upcoming-release + - content/mongo_data_adapter/5.2.9/upcoming_release jobs: build-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: - ref: content/mongo-data-adapter/5.2.9/upcoming-release + ref: content/mongo_data_adapter/5.2.9/upcoming_release fetch-depth: 0 # fetch whole repo so git-restore-mtime can work - name: Update submodules run: git submodule update --init --remote From b715750e2e179357022dfe69c6c4db2cb3f7b82f Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Tue, 22 Jun 2021 10:02:50 +0530 Subject: [PATCH 07/13] Deleted What's New section Former-commit-id: fb99a0dedfa8abe67ddfd790728bf3775cb62636 --- .../docs/mongo_data_adapter/5.2.9/01_whats_new.mdx | 10 ---------- product_docs/docs/mongo_data_adapter/5.2.9/index.mdx | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx deleted file mode 100644 index 864a831e6ff..00000000000 --- a/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: "What’s New" ---- - - - -The following features are added to create MongoDB Foreign Data Wrapper `5.2.8`: - -- Support for EDB Postgres Advanced Server 13. -- Support for Ubuntu 20.04 LTS platform. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx index 5117f306aad..ab14a10bd26 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx @@ -10,6 +10,6 @@ This guide uses the term `Postgres` to refer to an instance of EDB Postgres Adva
-whats_new requirements_overview architecture_overview installing_the_mongo_data_adapter updating_the_mongo_data_adapter features_of_mongo_fdw configuring_the_mongo_data_adapter example_using_the_mongo_data_adapter identifying_data_adapter_version limitations uninstalling_the_mongo_data_adapter conclusion +requirements_overview architecture_overview installing_the_mongo_data_adapter updating_the_mongo_data_adapter features_of_mongo_fdw configuring_the_mongo_data_adapter example_using_the_mongo_data_adapter identifying_data_adapter_version limitations uninstalling_the_mongo_data_adapter conclusion
From 9362feb8645d57e6c7bf5edbf417ea2fea1bdc8c Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Wed, 23 Jun 2021 11:17:10 +0530 Subject: [PATCH 08/13] Update for FDW-348 Former-commit-id: fc2e5fb4d6c9d4e8ed2bfd97c4bb64329ed008f9 --- .../05_updating_the_mongo_data_adapter.mdx | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx index aa29e7403f9..a32e883b0bb 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx @@ -10,21 +10,29 @@ If you have an existing RPM installation of MongoDB Foreign Data Wrapper, you ca - On RHEL or CentOS 7: - > `yum upgrade edb-repo` + `yum upgrade edb-repo` + +- On RHEL or CentOS 7 on PPCLE: + + `yum upgrade edb-repo` - On RHEL or CentOS 8: - > `dnf upgrade edb-repo` + `dnf upgrade edb-repo` yum or dnf will update the `edb.repo` file to enable access to the current EDB repository, configured to connect with the credentials specified in your `edb.repo` file. Then, you can use yum or dnf to upgrade any installed packages: - On RHEL or CentOS 7: - > `yum upgrade edb-as-mongo_fdw` + `yum upgrade edb-as-mongo_fdw edb-libmongoc-libs` + +- On RHEL or CentOS 7 on PPCLE: + + `yum upgrade edb-as-mongo_fdw edb-libmongoc-libs` - On RHEL or CentOS 8: - > `dnf upgrade edb-as-mongo_fdw` + `dnf upgrade edb-as-mongo_fdw` where `xx` is the server version number. @@ -32,6 +40,6 @@ yum or dnf will update the `edb.repo` file to enable access to the current EDB r To update MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host, use the following command: -> `apt-get --only-upgrade install edb-as-mongo-fdw edb-libmongoc` -> -> where `xx` is the server version number. + `apt-get --only-upgrade install edb-as-mongo-fdw edb-libmongoc` + + where `xx` is the server version number. From 490ec90a4491e285441b37ad5bfcffdef41d9557 Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Wed, 23 Jun 2021 14:39:57 +0530 Subject: [PATCH 09/13] Including section for PPCLE Former-commit-id: 4940cdfc99dbb9f5fcb166020e4aea79a8abf328 --- .../04_installing_the_mongo_data_adapter.mdx | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx index b1450a6c26c..a0287d8e886 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx @@ -13,6 +13,7 @@ The MongoDB Foreign Data Wrapper can be installed with an RPM package. During th You can install the MongoDB Foreign Data Wrapper using an RPM package on the following platforms: - [RHEL 7](#rhel7) +- [RHEL 7 PPCLE](#rhel7_PPCLE) - [RHEL 8](#rhel8) - [CentOS 7](#centos7) - [CentOS 8](#centos8) @@ -83,6 +84,87 @@ When you install an RPM package that is signed by a source that is not recognize During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + + +### On RHEL 7 PPCLE + +Before installing the MySQL Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: +1. Use the following commands to install Advance Toolchain: +```text +rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b + +cat > /etc/yum.repos.d/advance-toolchain.repo < + +After receiving your repository credentials you can: + +1. Create the repository configuration file. +2. Modify the file, providing your user name and password. +3. Install the MySQL Foreign Data Wrapper. + +**Creating a Repository Configuration File** + +To create the repository configuration file, assume superuser privileges, and invoke the following command: + +```text +yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm +``` + +The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + +**Modifying the file, providing your user name and password** + +After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. + +```text +[edb] +name=EnterpriseDB RPMs $releasever - $basearch +baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY +``` + +**Installing MySQL Foreign Data Wrapper** + +After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + + ``` + yum install edb-as-mongo_fdw + ``` + +where `xx` is the server version number. + +When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + +During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. + + + ### On RHEL 8 From 6ab82d282476d541b4691a768038c91579270891 Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Wed, 23 Jun 2021 15:59:06 +0530 Subject: [PATCH 10/13] Restructured the installation sections Former-commit-id: 8f3642339cf8b6de4368b78c28a68c17b97e8c46 --- .../04_installing_the_mongo_data_adapter.mdx | 399 ++++++------------ 1 file changed, 136 insertions(+), 263 deletions(-) diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx index a0287d8e886..9fe2ab8e364 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx @@ -2,9 +2,10 @@ title: "Installing the MongoDB Foreign Data Wrapper" --- - -The MongoDB Foreign Data Wrapper can be installed with an RPM package. During the installation process, the installer will satisfy software prerequisites. + + +The MongoDB Foreign Data Wrapper can be installed with an RPM package. During the installation process, the installer will satisfy software prerequisites. If yum encounters a dependency that it cannot resolve, it will provide a list of the required dependencies that you must manually resolve. @@ -12,156 +13,103 @@ The MongoDB Foreign Data Wrapper can be installed with an RPM package. During th You can install the MongoDB Foreign Data Wrapper using an RPM package on the following platforms: +- [RHEL or CentOS 7 PPCLE](#rhel_centos7_PPCLE) - [RHEL 7](#rhel7) -- [RHEL 7 PPCLE](#rhel7_PPCLE) - [RHEL 8](#rhel8) - [CentOS 7](#centos7) - [CentOS 8](#centos8) - - -### On RHEL 7 - -Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: - -Install the `epel-release` package: - - ```text - yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - ``` + -Enable the optional, extras, and HA repositories: +### On RHEL or CentOS 7 PPCLE - ```text - subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" - ``` +1. Use the following command to create a configuration file and install Advance Toolchain: -You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + ```text + rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b - + cat > /etc/yum.repos.d/advance-toolchain.repo <-mongo_fdw`. + ```text + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` -**Creating a Repository Configuration File** +3. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: -To create the repository configuration file, assume superuser privileges, and invoke the following command: + ```text + sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + ``` - ```text - yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm - ``` +4. Install the EPEL repository: -The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + ```text + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + ``` -**Modifying the file to provide your user name and password** - -After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. - - ```text - [edb] - name=EnterpriseDB RPMs $releasever - $basearch - baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch - enabled=1 - gpgcheck=1 - repo_gpgcheck=1 - gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY - ``` - -**Installing the MongoDB Foreign Data Wrapper** - -After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: - - ``` - yum install edb-as-mongo_fdw - ``` - -where `xx` is the server version number. +5. On RHEL 7 PPCLE, enable the additional repositories to resolve EPEL dependencies: -When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + ```text + subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" + ``` -During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. +6. Install the selected package: - + ```text + dnf install edb-as-mongo_fdw + ``` -### On RHEL 7 PPCLE + where `xx` is the server version number. -Before installing the MySQL Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: -1. Use the following commands to install Advance Toolchain: -```text -rpm --import https://public.dhe.ibm.com/software/server/POWER/Linux/toolchain/at/redhat/RHEL7/gpg-pubkey-6976a827-5164221b -cat > /etc/yum.repos.d/advance-toolchain.repo < - -After receiving your repository credentials you can: - -1. Create the repository configuration file. -2. Modify the file, providing your user name and password. -3. Install the MySQL Foreign Data Wrapper. + -**Creating a Repository Configuration File** +### On RHEL 7 -To create the repository configuration file, assume superuser privileges, and invoke the following command: +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: -```text -yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm -``` + ```text + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` -The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: -**Modifying the file, providing your user name and password** + ```text + sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + ``` -After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. +3. Install the EPEL repository: -```text -[edb] -name=EnterpriseDB RPMs $releasever - $basearch -baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch -enabled=1 -gpgcheck=1 -repo_gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY -``` + ```text + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + ``` -**Installing MySQL Foreign Data Wrapper** +4. Enable the additional repositories to resolve dependencies: -After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: + ```text + subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" + ``` - ``` - yum install edb-as-mongo_fdw - ``` +5. Install the selected package: -where `xx` is the server version number. + ```text + dnf install edb-as-mongo_fdw + ``` -When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + where `xx` is the server version number. -During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. @@ -169,195 +117,120 @@ During the installation, yum may encounter a dependency that it cannot resolve. ### On RHEL 8 -Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: - -Install the `epel-release` package: - - ```text - dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - ``` - -Enable the `codeready-builder-for-rhel-8-\*-rpms` repository: +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` - ```text - ARCH=$( /bin/arch ) - subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms" - ``` +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: -You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + ```text + sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + ``` - +3. Install the EPEL repository: -After receiving your repository credentials: + ```text + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + ``` -1. Create the repository configuration file. -2. Modify the file, providing your user name and password. -3. Install `edb-as-mongo_fdw`. +4. Enable the additional repositories to resolve dependencies: -**Creating a Repository Configuration File** + ```text + ARCH=$( /bin/arch ) subscription-manager repos --enable "codeready-builder-for-rhel-8-${ARCH}-rpms" + ``` -To create the repository configuration file, assume superuser privileges, and invoke the following command: +5. Disable the built-in PostgreSQL module: - ```text - dnf -y https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm - ``` + ```text + dnf -qy module disable postgresql + ``` +6. Install the selected package: + + ```text + dnf install edb-as-mongo_fdw + ``` -The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + where `xx` is the server version number. -**Modifying the file to provide your user name and password** -After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. - - ```text - [edb] - name=EnterpriseDB RPMs $releasever - $basearch - baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch - enabled=1 - gpgcheck=1 - repo_gpgcheck=1 - gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY - ``` - -**Installing the MongoDB Foreign Data Wrapper** - -After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: - - ```text - dnf install edb-as-mongo_fdw - ``` - -When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. - -During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. ### On CentOS 7 -Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: - -Install the `epel-release` package: +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: - ```text - yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm - ``` + ```text + yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` -!!! Note - You may need to enable the `[extras]` repository definition in the `CentOS-Base.repo` file (located in `/etc/yum.repos.d`). +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: -You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: + ```text + sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + ``` - +3. Install the EPEL repository: -After receiving your repository credentials you can: + ```text + yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm + ``` -1. Create the repository configuration file. -2. Modify the file, providing your user name and password. -3. Install `edb-as-mongo_fdw`. +4. Install the selected package: -**Creating a Repository Configuration File** + ```text + dnf install edb-as-mongo_fdw + ``` -To create the repository configuration file, assume superuser privileges, and invoke the following command: + where `xx` is the server version number. - ```text - yum -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm - ``` -The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. -**Modifying the file to provide your user name and password** - -After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. - - ```text - [edb] - name=EnterpriseDB RPMs $releasever - $basearch - baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch - enabled=1 - gpgcheck=1 - repo_gpgcheck=1 - gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY - ``` - -**Installing the MongoDB Foreign Data Wrapper** - -After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: - - ```text - yum install edb-as-mongo_fdw - ``` - -where `xx` is the server version number. - -When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. - -During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. ### On CentOS 8 -Before installing the MongoDB Foreign Data Wrapper, you must install the following prerequisite packages, and request credentials from EDB: - -Install the `epel-release` package: - - ```text - dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - ``` - -Enable the `PowerTools` repository: - - ```text - dnf config-manager --set-enabled PowerTools - ``` - -You must also have credentials that allow access to the EDB repository. For information about requesting credentials, visit: - +1. To create the repository configuration file, assume superuser privileges, and invoke the following command: + + ```text + dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm + ``` -After receiving your repository credentials: +2. Replace ‘USERNAME:PASSWORD’ below with your username and password for the EDB repositories: -1. Create the repository configuration file. -2. Modify the file, providing your user name and password. -3. Install `edb-as-mongo_fdw`. + ```text + sed -i "s@:@USERNAME:PASSWORD@" /etc/yum.repos.d/edb.repo + ``` -**Creating a Repository Configuration File** +3. Install the EPEL repository: -To create the repository configuration file, assume superuser privileges, and invoke the following command: + ```text + dnf -y install epel-release + ``` - ```text - dnf -y install https://yum.enterprisedb.com/edbrepos/edb-repo-latest.noarch.rpm - ``` +4. Enable the additional repositories to resolve dependencies: -The repository configuration file is named `edb.repo`. The file resides in `/etc/yum.repos.d`. + ```text + dnf config-manager --set-enabled PowerTools + ``` -**Modifying the file to provide your user name and password** +5. Disable the built-in PostgreSQL module: -After creating the `edb.repo` file, use your choice of editor to ensure that the value of the `enabled` parameter is `1`, and replace the `username` and `password` placeholders in the `baseurl` specification with the name and password of a registered EDB user. - - ```text - [edb] - name=EnterpriseDB RPMs $releasever - $basearch - baseurl=https://:@yum.enterprisedb.com/edb/redhat/rhel-$releasever-$basearch - enabled=1 - gpgcheck=1 - repo_gpgcheck=1 - gpgkey=file:///etc/pki/rpm-gpg/ENTERPRISEDB-GPG-KEY - ``` - -**Installing the MongoDB Foreign Data Wrapper** - -After saving your changes to the configuration file, use the following command to install the MongoDB Foreign Data Wrapper: - - ```text - dnf install edb-as-mongo_fdw - ``` - -where `xx` is the server version number. + ```text + dnf -qy module disable postgresql + ``` +6. Install the selected package: + + ```text + dnf install edb-as-mongo_fdw + ``` -When you install an RPM package that is signed by a source that is not recognized by your system, yum may ask for your permission to import the key to your local server. If prompted, and you are satisfied that the packages come from a trustworthy source, enter `y`, and press `Return` to continue. + where `xx` is the server version number. -During the installation, yum may encounter a dependency that it cannot resolve. If it does, it will provide a list of the required dependencies that you must manually resolve. ## Installing the MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host From bf15ec2e532a5fcdff0d735a238d9aa99b5e7b7f Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Fri, 25 Jun 2021 15:39:20 +0530 Subject: [PATCH 11/13] Fixing review comments Former-commit-id: 4e9bc30ea69632955685151a5efd73dde0f8d707 --- .../mongo_data_adapter/5.2.9/01_whats_new.mdx | 10 ++ .../04_installing_the_mongo_data_adapter.mdx | 10 +- .../05_updating_the_mongo_data_adapter.mdx | 4 +- .../5.2.9/06_features_of_mongo_fdw.mdx | 24 +-- .../07_configuring_the_mongo_data_adapter.mdx | 158 +++++++++--------- ...11_uninstalling_the_mongo_data_adapter.mdx | 4 +- 6 files changed, 109 insertions(+), 101 deletions(-) create mode 100644 product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx new file mode 100644 index 00000000000..3ba10216617 --- /dev/null +++ b/product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx @@ -0,0 +1,10 @@ +--- +title: "What’s New" +--- + + + +The following features are added to create MongoDB Foreign Data Wrapper `5.2.9`: + +- Updated mongo-c-driver to 1.17.3 +- Updated json-c to 0.15 diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx index 9fe2ab8e364..5f94de4e76f 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/04_installing_the_mongo_data_adapter.mdx @@ -71,7 +71,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol dnf install edb-as-mongo_fdw ``` - where `xx` is the server version number. + where `xx` is the server version number. @@ -108,7 +108,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol dnf install edb-as-mongo_fdw ``` - where `xx` is the server version number. + where `xx` is the server version number. @@ -184,9 +184,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol dnf install edb-as-mongo_fdw ``` - where `xx` is the server version number. - - + where `xx` is the server version number. @@ -290,4 +288,4 @@ The following steps will walk you through using the EDB apt repository to instal apt-get install edb-as-mongo-fdw ``` -where `xx` is the server version number. + where `xx` is the server version number. diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx index a32e883b0bb..63a59b8c5ef 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/05_updating_the_mongo_data_adapter.mdx @@ -4,7 +4,7 @@ title: "Updating the MongoDB Foreign Data Wrapper" -**Updating an RPM Installation** +## Updating an RPM Installation If you have an existing RPM installation of MongoDB Foreign Data Wrapper, you can use yum or dnf to upgrade your repository configuration file and update to a more recent product version. To update the `edb.repo` file, assume superuser privileges and enter: @@ -36,7 +36,7 @@ yum or dnf will update the `edb.repo` file to enable access to the current EDB r where `xx` is the server version number. -**Updating MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host** +## Updating MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host To update MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host, use the following command: diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx index aec81845037..972cdcb480d 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/06_features_of_mongo_fdw.mdx @@ -8,38 +8,38 @@ The key features of the MongoDB Foreign Data Wrapper are listed below: ## Writable FDW -The MongoDB Foreign Data Wrapper allows you to modify data on a MongoDB server. Users can `INSERT`, `UPDATE` and `DELETE` data in the remote MongoDB collections by inserting, updating and deleting data locally in foreign tables. See also: +The MongoDB Foreign Data Wrapper allows you to modify data on a MongoDB server. Users can `INSERT`, `UPDATE` and `DELETE` data in the remote MongoDB collections by inserting, updating and deleting data locally in foreign tables. -[Example: Using the MongoDB Foreign Data Wrapper](08_example_using_the_mongo_data_adapter/#example_using_the_mongo_data_adapter) +See also: -[Data Type Mappings](07_configuring_the_mongo_data_adapter/#data-type-mappings) +- [Example: Using the MongoDB Foreign Data Wrapper](08_example_using_the_mongo_data_adapter/#example_using_the_mongo_data_adapter) -## Where Clause Push-down +- [Data Type Mappings](07_configuring_the_mongo_data_adapter/#data-type-mappings) -MongoDB Foreign Data Wrapper allows the push-down of `WHERE` clause only when clauses include comparison expressions that have a column and a constant as arguments. WHERE clause push-down is not supported where constant is an array. +## WHERE Clause Push-down + +MongoDB Foreign Data Wrapper allows the push-down of the `WHERE` clause only when clauses include the comparison expressions that have a column and a constant as arguments. `WHERE` clause push-down is not supported where the constant is an array. ## Connection Pooling -Mongo_FDW establishes a connection to a foreign server during the first query that uses a foreign table associated with the foreign server. This connection is kept and reused for subsequent queries in the same session. +The MongoDB Foreign Data Wrapper establishes a connection to a foreign server during the first query that uses a foreign table associated with the foreign server. This connection is kept and reused for subsequent queries in the same session. ## Automated Cleanup The MongoDB Foreign Data Wrapper allows the cleanup of foreign tables in a single operation using the `DROP EXTENSION` command. This feature is especially useful when a foreign table has been created for a temporary purpose. The syntax of a `DROP EXTENSION` command is: -> `DROP EXTENSION mongo_fdw CASCADE;` + `DROP EXTENSION mongo_fdw CASCADE;` For more information, see [DROP EXTENSION](https://www.postgresql.org/docs/current/sql-dropextension.html). ## Full Document Retrieval -This feature allows to retrieve documents along with all their fields from collection without any knowledge of the fields in BSON document available in MongoDB's collection. Those retrieved documents are in the JSON format. +This feature allows you to retrieve documents along with all their fields from collection without any knowledge of the fields in the BSON document available in MongoDB's collection. Those retrieved documents are in JSON format. You can retrieve all available fields in a collection residing in MongoDB Foreign Data Wrapper as explained in the following example: **Example**: -The collection in MongoDB Foreign Data Wrapper: - ```text > db.warehouse.find(); { "_id" : ObjectId("58a1ebbaf543ec0b90545859"), "warehouse_id" : 1, "warehouse_name" : "UPS", "warehouse_created" : ISODate("2014-12-12T07:12:10Z") } @@ -48,13 +48,13 @@ The collection in MongoDB Foreign Data Wrapper: Steps for retrieving the document: -1. Create foreign table with a column name `__doc`. The type of the column could be json, jsonb, text or varchar. +1. Create foreign table with a column name `__doc`. The type of the column could be json, jsonb, text, or varchar. ```text CREATE FOREIGN TABLE test_json(__doc json) SERVER mongo_server OPTIONS (database 'testdb', collection 'warehouse'); ``` -1. Retrieve the document. +2. Retrieve the document. ```text SELECT * FROM test_json ORDER BY __doc::text COLLATE "C"; diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx index b04ccf9e345..2a549faa7d5 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/07_configuring_the_mongo_data_adapter.mdx @@ -6,10 +6,10 @@ title: "Configuring the MongoDB Foreign Data Wrapper" Before using the MongoDB Foreign Data Wrapper, you must: -> 1. Use the [CREATE EXTENSION](#create-extension) command to create the MongoDB Foreign Data Wrapper extension on the Postgres host. -> 2. Use the [CREATE SERVER](#create-server) command to define a connection to the MongoDB server. -> 3. Use the [CREATE USER MAPPING](#create-user-mapping) command to define a mapping that associates a Postgres role with the server. -> 4. Use the [CREATE FOREIGN TABLE](#create-foreign-table) command to define a table in the Postgres database that corresponds to a database that resides on the MongoDB cluster. + 1. Use the [CREATE EXTENSION](#create-extension) command to create the MongoDB Foreign Data Wrapper extension on the Postgres host. + 2. Use the [CREATE SERVER](#create-server) command to define a connection to the MongoDB server. + 3. Use the [CREATE USER MAPPING](#create-user-mapping) command to define a mapping that associates a Postgres role with the server. + 4. Use the [CREATE FOREIGN TABLE](#create-foreign-table) command to define a table in the Postgres database that corresponds to a database that resides on the MongoDB cluster. @@ -25,21 +25,21 @@ CREATE EXTENSION [IF NOT EXISTS] mongo_fdw [WITH] [SCHEMA schema_name]; `IF NOT EXISTS` -> Include the `IF NOT EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the same name already exists. + Include the `IF NOT EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the same name already exists. `schema_name` -> Optionally specify the name of the schema in which to install the extension's objects. + Optionally specify the name of the schema in which to install the extension's objects. **Example** The following command installs the MongoDB foreign data wrapper: -> `CREATE EXTENSION mongo_fdw;` + `CREATE EXTENSION mongo_fdw;` For more information about using the foreign data wrapper `CREATE EXTENSION` command, see: -> . + . @@ -58,15 +58,15 @@ The role that defines the server is the owner of the server; use the `ALTER SERV `server_name` -> Use `server_name` to specify a name for the foreign server. The server name must be unique within the database. + Use `server_name` to specify a name for the foreign server. The server name must be unique within the database. `FOREIGN_DATA_WRAPPER` -> Include the `FOREIGN_DATA_WRAPPER` clause to specify that the server should use the `mongo_fdw` foreign data wrapper when connecting to the cluster. + Include the `FOREIGN_DATA_WRAPPER` clause to specify that the server should use the `mongo_fdw` foreign data wrapper when connecting to the cluster. `OPTIONS` -> Use the `OPTIONS` clause of the `CREATE SERVER` command to specify connection information for the foreign server object. You can include: + Use the `OPTIONS` clause of the `CREATE SERVER` command to specify connection information for the foreign server object. You can include: | **Option** | **Description** | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -74,12 +74,12 @@ The role that defines the server is the owner of the server; use the `ALTER SERV | port | The port number of the Mongo Server. Valid range is 0 to 65535. The default value is `27017`. | | authentication_database | The database against which user will be authenticated. This option is only valid with password based authentication. | | ssl | Requests an authenticated, encrypted SSL connection. By default, the value is set to `false`. Set the value to `true` to enable ssl. See to understand the options. | -| pem_file | SSL option | +| pem_file | SSL option. | | pem_pwd | SSL option. | -| ca_file | SSL option | -| ca_dir | SSL option | -| crl_file | SSL option | -| weak_cert_validation | SSL option | +| ca_file | SSL option. | +| ca_dir | SSL option. | +| crl_file | SSL option. | +| weak_cert_validation | SSL option. | **Example** @@ -93,7 +93,7 @@ The foreign server uses the default port (`27017`) for the connection to the cli For more information about using the `CREATE SERVER` command, see: -> + @@ -112,25 +112,25 @@ You must be the owner of the foreign server to create a user mapping for that se `role_name` -> Use `role_name` to specify the role that will be associated with the foreign server. + Use `role_name` to specify the role that will be associated with the foreign server. `server_name` -> Use `server_name` to specify the name of the server that defines a connection to the MongoDB cluster. + Use `server_name` to specify the name of the server that defines a connection to the MongoDB cluster. `OPTIONS` -> Use the `OPTIONS` clause to specify connection information for the foreign server. -> -> `username`: the name of the user on the MongoDB server. -> -> `password`: the password associated with the username. + Use the `OPTIONS` clause to specify connection information for the foreign server. + + `username`: the name of the user on the MongoDB server. + + `password`: the password associated with the username. **Example** The following command creates a user mapping for a role named `enterprisedb`; the mapping is associated with a server named `mongo_server`: -> `CREATE USER MAPPING FOR enterprisedb SERVER mongo_server;` + `CREATE USER MAPPING FOR enterprisedb SERVER mongo_server;` If the database host uses secure authentication, provide connection credentials when creating the user mapping: @@ -142,7 +142,7 @@ The command creates a user mapping for a role named `enterprisedb` that is assoc For detailed information about the `CREATE USER MAPPING` command, see: -> + @@ -177,57 +177,57 @@ and `table_constraint` is: `table_name` -> Specifies the name of the foreign table; include a schema name to specify the schema in which the foreign table should reside. + Specify the name of the foreign table; include a schema name to specify the schema in which the foreign table should reside. `IF NOT EXISTS` -> Include the `IF NOT EXISTS` clause to instruct the server to not throw an error if a table with the same name already exists; if a table with the same name exists, the server will issue a notice. + Include the `IF NOT EXISTS` clause to instruct the server to not throw an error if a table with the same name already exists; if a table with the same name exists, the server will issue a notice. `column_name` -> Specifies the name of a column in the new table; each column should correspond to a column described on the MongoDB server. + Specify the name of a column in the new table; each column should correspond to a column described on the MongoDB server. `data_type` -> Specifies the data type of the column; when possible, specify the same data type for each column on the Postgres server and the MongoDB server. If a data type with the same name is not available, the Postgres server will attempt to cast the data type to a type compatible with the MongoDB server. If the server cannot identify a compatible data type, it will return an error. + Specify the data type of the column; when possible, specify the same data type for each column on the Postgres server and the MongoDB server. If a data type with the same name is not available, the Postgres server will attempt to cast the data type to a type compatible with the MongoDB server. If the server cannot identify a compatible data type, it will return an error. `COLLATE collation` -> Include the `COLLATE` clause to assign a collation to the column; if not specified, the column data type's default collation is used. + Include the `COLLATE` clause to assign a collation to the column; if not specified, the column data type's default collation is used. `INHERITS (parent_table [, ... ])` -> Include the `INHERITS` clause to specify a list of tables from which the new foreign table automatically inherits all columns. Parent tables can be plain tables or foreign tables. + Include the `INHERITS` clause to specify a list of tables from which the new foreign table automatically inherits all columns. Parent tables can be plain tables or foreign tables. `CONSTRAINT constraint_name` -> Specify an optional name for a column or table constraint; if not specified, the server will generate a constraint name. + Specify an optional name for a column or table constraint; if not specified, the server will generate a constraint name. `NOT NULL` -> Include the `NOT NULL` keywords to indicate that the column is not allowed to contain null values. + Include the `NOT NULL` keywords to indicate that the column is not allowed to contain null values. `NULL` -> Include the `NULL` keywords to indicate that the column is allowed to contain null values. This is the default. + Include the `NULL` keywords to indicate that the column is allowed to contain null values. This is the default. `CHECK (expr) [NO INHERIT]` -> Use the `CHECK` clause to specify an expression that produces a Boolean result that each row in the table must satisfy. A check constraint specified as a column constraint should reference that column's value only, while an expression appearing in a table constraint can reference multiple columns. -> -> A `CHECK` expression cannot contain subqueries or refer to variables other than columns of the current row. -> -> Include the `NO INHERIT` keywords to specify that a constraint should not propagate to child tables. + Use the `CHECK` clause to specify an expression that produces a Boolean result that each row in the table must satisfy. A check constraint specified as a column constraint should reference that column's value only, while an expression appearing in a table constraint can reference multiple columns. + + A `CHECK` expression cannot contain subqueries or refer to variables other than columns of the current row. + + Include the `NO INHERIT` keywords to specify that a constraint should not propagate to child tables. `DEFAULT default_expr` -> Include the `DEFAULT` clause to specify a default data value for the column whose column definition it appears within. The data type of the default expression must match the data type of the column. + Include the `DEFAULT` clause to specify a default data value for the column whose column definition it appears within. The data type of the default expression must match the data type of the column. `SERVER server_name [OPTIONS (option 'value' [, ... ] ) ]` -> To create a foreign table that will allow you to query a table that resides on a MongoDB file system, include the `SERVER` clause and specify the `server_name` of the foreign server that uses the MongoDB data adapter. -> -> Use the `OPTIONS` clause to specify the following `options` and their corresponding values: + To create a foreign table that will allow you to query a table that resides on a MongoDB file system, include the `SERVER` clause and specify the `server_name` of the foreign server that uses the MongoDB data adapter. + + Use the `OPTIONS` clause to specify the following `options` and their corresponding values: | option | value | | ---------- | --------------------------------------------------------------------------------- | @@ -273,7 +273,7 @@ Include the `SERVER` clause to specify the name of the database stored on the Mo For more information about using the `CREATE FOREIGN TABLE` command, see: -> + !!! Note MongoDB foreign data wrapper supports the write capability feature. @@ -306,29 +306,29 @@ DROP EXTENSION [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]; `IF EXISTS` -> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the specified name doesn't exists. + Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if an extension with the specified name doesn't exists. `name` -> Specify the name of the installed extension. It is optional. -> -> `CASCADE` -> -> Automatically drop objects that depend on the extension. It drops all the other dependent objects too. -> -> `RESTRICT` -> -> Do not allow to drop extension if any objects, other than its member objects and extensions listed in the same DROP command are dependent on it. + Specify the name of the installed extension. It is optional. + + `CASCADE` + + Automatically drop objects that depend on the extension. It drops all the other dependent objects too. + + `RESTRICT` + + Do not allow to drop extension if any objects, other than its member objects and extensions listed in the same DROP command are dependent on it. **Example** The following command removes the extension from the existing database: -> `DROP EXTENSION mongo_fdw;` + `DROP EXTENSION mongo_fdw;` For more information about using the foreign data wrapper `DROP EXTENSION` command, see: -> . + . ## DROP SERVER @@ -344,29 +344,29 @@ The role that drops the server is the owner of the server; use the `ALTER SERVER `IF EXISTS` -> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if a server with the specified name doesn't exists. + Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if a server with the specified name doesn't exists. `name` -> Specify the name of the installed server. It is optional. -> -> `CASCADE` -> -> Automatically drop objects that depend on the server. It should drop all the other dependent objects too. -> -> `RESTRICT` -> -> Do not allow to drop the server if any objects are dependent on it. + Specify the name of the installed server. It is optional. + + `CASCADE` + + Automatically drop objects that depend on the server. It should drop all the other dependent objects too. + + `RESTRICT` + + Do not allow to drop the server if any objects are dependent on it. **Example** The following command removes a foreign server named `mongo_server`: -> `DROP SERVER mongo_server;` + `DROP SERVER mongo_server;` For more information about using the `DROP SERVER` command, see: -> + ## DROP USER MAPPING @@ -380,25 +380,25 @@ DROP USER MAPPING [ IF EXISTS ] FOR { user_name | USER | CURRENT_USER | PUBLIC } `IF EXISTS` -> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the user mapping doesn't exist. + Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the user mapping doesn't exist. `user_name` -> Specify the user name of the mapping. + Specify the user name of the mapping. `server_name` -> Specify the name of the server that defines a connection to the MongoDB cluster. + Specify the name of the server that defines a connection to the MongoDB cluster. **Example** The following command drops a user mapping for a role named `enterprisedb`; the mapping is associated with a server named `mongo_server`: -> `DROP USER MAPPING FOR enterprisedb SERVER mongo_server;` + `DROP USER MAPPING FOR enterprisedb SERVER mongo_server;` For detailed information about the `DROP USER MAPPING` command, see: -> + ## DROP FOREIGN TABLE @@ -412,19 +412,19 @@ DROP FOREIGN TABLE [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ] `IF EXISTS` -> Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the foreign table with the specified name doesn't exists. + Include the `IF EXISTS` clause to instruct the server to issue a notice instead of throwing an error if the foreign table with the specified name doesn't exists. `name` -> Specify the name of the foreign table. + Specify the name of the foreign table. `CASCADE` -> Automatically drop objects that depend on the foreign table. It should drop all the other dependent objects too. + Automatically drop objects that depend on the foreign table. It should drop all the other dependent objects too. `RESTRICT` -> Do not allow to drop foreign table if any objects are dependent on it. + Do not allow to drop foreign table if any objects are dependent on it. **Example** @@ -434,4 +434,4 @@ DROP FOREIGN TABLE warehouse; For more information about using the `DROP FOREIGN TABLE` command, see: -> + diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx index 8313284a962..d0d4f05040a 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/11_uninstalling_the_mongo_data_adapter.mdx @@ -4,7 +4,7 @@ title: "Uninstalling the MongoDB Foreign Data Wrapper" -**Uninstalling an RPM Package** +## Uninstalling an RPM Package You can use the `yum remove` or `dnf remove` command to remove a package installed by `yum` or `dnf`. To remove a package, open a terminal window, assume superuser privileges, and enter the command: @@ -18,7 +18,7 @@ You can use the `yum remove` or `dnf remove` command to remove a package install Where `xx` is the server version number. -**Uninstalling MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host** +## Uninstalling MongoDB Foreign Data Wrapper on a Debian or Ubuntu Host - To uninstall MongoDB Foreign Data Wrapper on a Debian or Ubuntu host, invoke the following command. From 9a93e2ba8324b9bf6dd32b07a11b0e95ddaa09b4 Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra Date: Fri, 25 Jun 2021 17:06:47 +0530 Subject: [PATCH 12/13] Adding What's New section Former-commit-id: 1535e5c311a8c4c46e8b0758c4eb7d6b15c1b01a --- product_docs/docs/mongo_data_adapter/5.2.9/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx index ab14a10bd26..640c3591f3f 100644 --- a/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx +++ b/product_docs/docs/mongo_data_adapter/5.2.9/index.mdx @@ -10,6 +10,6 @@ This guide uses the term `Postgres` to refer to an instance of EDB Postgres Adva
-requirements_overview architecture_overview installing_the_mongo_data_adapter updating_the_mongo_data_adapter features_of_mongo_fdw configuring_the_mongo_data_adapter example_using_the_mongo_data_adapter identifying_data_adapter_version limitations uninstalling_the_mongo_data_adapter conclusion +whats_new requirements_overview architecture_overview installing_the_mongo_data_adapter updating_the_mongo_data_adapter features_of_mongo_fdw configuring_the_mongo_data_adapter example_using_the_mongo_data_adapter identifying_data_adapter_version limitations uninstalling_the_mongo_data_adapter conclusion
From 4df411f9b80b93c2dfe63c34bd4711832ab5ef43 Mon Sep 17 00:00:00 2001 From: Abhilasha Narendra <53602601+abhilasha-narendra@users.noreply.github.com> Date: Fri, 25 Jun 2021 18:04:22 +0530 Subject: [PATCH 13/13] Delete deploy-mongo-da-test-branch.yml Former-commit-id: 415940749c354c8bf541c74fa777e8de5eede172 --- .../workflows/deploy-mongo-da-test-branch.yml | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 .github/workflows/deploy-mongo-da-test-branch.yml diff --git a/.github/workflows/deploy-mongo-da-test-branch.yml b/.github/workflows/deploy-mongo-da-test-branch.yml deleted file mode 100644 index f4581292586..00000000000 --- a/.github/workflows/deploy-mongo-da-test-branch.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Deploy MongoDB FDW upcoming release branch to Netlify -on: - push: - branches: - - content/mongo_data_adapter/5.2.9/upcoming_release -jobs: - build-deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - ref: content/mongo_data_adapter/5.2.9/upcoming_release - fetch-depth: 0 # fetch whole repo so git-restore-mtime can work - - name: Update submodules - run: git submodule update --init --remote - - name: Adjust file watchers limit - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - - - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - name: Install yarn - run: sudo npm -g install yarn - - name: Yarn install - run: yarn install --immutable - env: - NODE_ENV: ${{ secrets.NODE_ENV }} - - - name: Checking Gatsby cache - id: gatsby-cache-build - uses: actions/cache@v2 - with: - path: | - public - .cache - key: ${{ runner.os }}-gatsby-build-develop-${{ github.run_id }} - restore-keys: | - ${{ runner.os }}-gatsby-build-develop- - - - name: Fix mtimes - run: yarn fix-mtimes --force - - name: Gatsby build - run: yarn build - env: - APP_ENV: staging - NODE_ENV: ${{ secrets.NODE_ENV }} - NODE_OPTIONS: --max-old-space-size=4096 - ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }} - ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} - ALGOLIA_INDEX_NAME: edb-docs-staging - INDEX_ON_BUILD: false - - - name: Netlify deploy - run: | - sudo yarn global add netlify-cli - netlify deploy --dir=public --prod - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_WIP2_SITE_ID }}