{"id":20632476,"url":"https://github.com/citusdata/mongo_fdw","last_synced_at":"2025-04-07T09:20:02.548Z","repository":{"id":5094366,"uuid":"6257100","full_name":"citusdata/mongo_fdw","owner":"citusdata","description":"DEPRECATED, moved to","archived":false,"fork":false,"pushed_at":"2024-07-11T05:39:43.000Z","size":189,"stargazers_count":153,"open_issues_count":11,"forks_count":108,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-03-31T07:06:27.226Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/EnterpriseDB/mongo_fdw","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"facebook/pop","license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/citusdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-10-17T06:35:40.000Z","updated_at":"2024-11-28T16:30:45.000Z","dependencies_parsed_at":"2025-01-15T05:13:57.722Z","dependency_job_id":"00efaa3f-765c-423a-b0e4-28d2e197f81a","html_url":"https://github.com/citusdata/mongo_fdw","commit_stats":{"total_commits":21,"total_committers":7,"mean_commits":3.0,"dds":0.5238095238095238,"last_synced_commit":"cee374182334f9e6387d8f70871454d7e680d649"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fmongo_fdw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fmongo_fdw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fmongo_fdw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/citusdata%2Fmongo_fdw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/citusdata","download_url":"https://codeload.github.com/citusdata/mongo_fdw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247622983,"owners_count":20968575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T14:16:19.677Z","updated_at":"2025-04-07T09:20:02.527Z","avatar_url":"https://github.com/citusdata.png","language":"C","readme":"**Notice:** Please note this repository has moved to https://github.com/EnterpriseDB/mongo_fdw\n\nMongoDB FDW for PostgreSQL\n==========================\n\nThis PostgreSQL extension implements a Foreign Data Wrapper (FDW) for\n[MongoDB][1]. For an example demonstrating this wrapper's use, see [our blog\npost][2]. Please also note that this version of `mongo_fdw` only works with\nPostgreSQL 9.2 or 9.3.\n\n\nInstallation\n------------\n\nThe MongoDB FDW includes the official MongoDB C Driver version 0.6. When you\ntype `make`, the C driver's source code also gets automatically compiled and\nlinked.\n\nTo build on POSIX-compliant systems (like Linux and OS X), you need to ensure\nthe `pg_config` executable is in your path when you run `make`. This executable\nis typically in your PostgreSQL installation's `bin` directory. For example:\n\n```sh\nPATH=/usr/local/pgsql/bin/:$PATH make\nsudo PATH=/usr/local/pgsql/bin/:$PATH make install\n```\n\nNote that we have tested the `mongo_fdw` extension only on Fedora and Ubuntu\nsystems. If you run into issues on other systems, please [let us know][3].\n\n\nUsage\n-----\n\nThe following parameters can be set on a MongoDB foreign server object:\n\n  * `address`: the address or hostname of the MongoDB server.\n               Defaults to `127.0.0.1`\n  * `port`: the port number of the MongoDB server. Defaults to `27017`\n\nThe following parameters can be set on a MongoDB foreign table object:\n\n  * `database`: the name of the MongoDB database to query. Defaults to `test`\n  * `collection`: the name of the MongoDB collection to query. Defaults to\n                  the foreign table name used in the relevant `CREATE` command\n\nAs an example, the following commands demonstrate loading the `mongo_fdw`\nwrapper, creating a server, and then creating a foreign table associated with\na MongoDB collection. The commands also show specifying option values in the\n`OPTIONS` clause. If an option value isn't provided, the wrapper uses the\ndefault value mentioned above.\n\n`mongo_fdw` can collect data distribution statistics will incorporate them when\nestimating costs for the query execution plan. To see selected execution plans\nfor a query, just run `EXPLAIN`.\n\nWe also currently use the internal PostgreSQL `NAME` type to represent the BSON\nobject identifier type (the `_id` field).\n\n```sql\n-- load extension first time after install\nCREATE EXTENSION mongo_fdw;\n\n-- create server object\nCREATE SERVER mongo_server FOREIGN DATA WRAPPER mongo_fdw\nOPTIONS (address '127.0.0.1', port '27017');\n\n-- create foreign table\nCREATE FOREIGN TABLE customer_reviews\n(\n    _id NAME,\n    customer_id TEXT,\n    review_date TIMESTAMP,\n    review_rating INTEGER,\n    product_id CHAR(10),\n    product_title TEXT,\n    product_group TEXT,\n    product_category TEXT,\n    similar_product_ids CHAR(10)[]\n)\nSERVER mongo_server\nOPTIONS (database 'test', collection 'customer_reviews');\n\n-- collect data distribution statistics\nANALYZE customer_reviews;\n```\n\n\nLimitations\n-----------\n\n  * If the BSON document key contains uppercase letters or occurs within a\n    nested document, `mongo_fdw` requires the corresponding column names to be\n\tdeclared in double quotes. For example, a nested field such as `\"review\": {\n\t\"Votes\": 19 }` should be declared as `\"review.Votes\" INTEGER` in the `CREATE\n\tTABLE` statement.\n\n  * Note that PostgreSQL limits column names to 63 characters by default. If\n    you need column names that are longer, you can increase the `NAMEDATALEN`\n\tconstant in `src/include/pg_config_manual.h`, compile, and reinstall.\n\n\nSupport\n-------\n\nPlease note this repository has moved to https://github.com/EnterpriseDB/mongo_fdw\n\n\nLicense\n-------\n\nCopyright © 2012–2014 Citus Data, Inc.\n\nThis program is free software: you can redistribute it and/or modify it under\nthe terms of the GNU Lesser General Public License as published by the Free\nSoftware Foundation, either version 3 of the License, or (at your option) any\nlater version.\n\nSee the [`LICENSE`][5] file for full details.\n\n[1]: http://www.mongodb.com\n[2]: http://www.citusdata.com/blog/51-run-sql-on-mongodb\n[3]: https://github.com/citusdata/mongo_fdw/issues/new\n[5]: LICENSE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fmongo_fdw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcitusdata%2Fmongo_fdw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcitusdata%2Fmongo_fdw/lists"}