Skip to content

Commit

Permalink
Fixing review comments
Browse files Browse the repository at this point in the history
Former-commit-id: 4e9bc30
  • Loading branch information
Abhilasha Narendra committed Jun 25, 2021
1 parent 6ab82d2 commit bf15ec2
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 101 deletions.
10 changes: 10 additions & 0 deletions product_docs/docs/mongo_data_adapter/5.2.9/01_whats_new.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "What’s New"
---

<div id="whats_new" class="registered_link"></div>

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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol
dnf install edb-as<xx>-mongo_fdw
```

where `xx` is the server version number.
where `xx` is the server version number.


<div id="rhel7" class="registered_link"></div>
Expand Down Expand Up @@ -108,7 +108,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol
dnf install edb-as<xx>-mongo_fdw
```

where `xx` is the server version number.
where `xx` is the server version number.



Expand Down Expand Up @@ -184,9 +184,7 @@ You can install the MongoDB Foreign Data Wrapper using an RPM package on the fol
dnf install edb-as<xx>-mongo_fdw
```

where `xx` is the server version number.


where `xx` is the server version number.


<div id="centos8" class="registered_link"></div>
Expand Down Expand Up @@ -290,4 +288,4 @@ The following steps will walk you through using the EDB apt repository to instal
apt-get install edb-as<xx>-mongo-fdw
```

where `xx` is the server version number.
where `xx` is the server version number.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: "Updating the MongoDB Foreign Data Wrapper"

<div id="updating_the_mongo_data_adapter" class="registered_link"></div>

**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:

Expand Down Expand Up @@ -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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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") }
Expand All @@ -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";
Expand Down
Loading

0 comments on commit bf15ec2

Please sign in to comment.