{"id":13705699,"url":"https://github.com/pgspider/dynamodb_fdw","last_synced_at":"2026-01-16T15:09:16.557Z","repository":{"id":45184744,"uuid":"422098159","full_name":"pgspider/dynamodb_fdw","owner":"pgspider","description":"DynamoDB Foreign Data Wrapper for PostgreSQL","archived":false,"fork":false,"pushed_at":"2025-02-10T09:38:16.000Z","size":717,"stargazers_count":34,"open_issues_count":5,"forks_count":8,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-05T16:47:57.533Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgspider.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2021-10-28T06:58:09.000Z","updated_at":"2025-03-29T22:00:38.000Z","dependencies_parsed_at":"2023-12-20T12:28:26.279Z","dependency_job_id":"57c6e502-16b6-416d-a683-20dbf5aabf16","html_url":"https://github.com/pgspider/dynamodb_fdw","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/pgspider/dynamodb_fdw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgspider%2Fdynamodb_fdw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgspider%2Fdynamodb_fdw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgspider%2Fdynamodb_fdw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgspider%2Fdynamodb_fdw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgspider","download_url":"https://codeload.github.com/pgspider/dynamodb_fdw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgspider%2Fdynamodb_fdw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479406,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08-02T22:00:46.321Z","updated_at":"2026-01-16T15:09:16.531Z","avatar_url":"https://github.com/pgspider.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"DynamoDB Foreign Data Wrapper for PostgreSQL\n============================================\n\nThis is a foreign data wrapper (FDW) to connect [PostgreSQL](https://www.postgresql.org/)\nto [DynamoDB](https://aws.amazon.com/dynamodb/).\n\n\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/2/29/Postgresql_elephant.svg\" align=\"center\" height=\"100\" alt=\"PostgreSQL\"/\u003e\t+\t**DynamoDB**\n\nContents\n--------\n\n1. [Features](#features)\n2. [Supported platforms](#supported-platforms)\n3. [Installation](#installation)\n4. [Usage](#usage)\n5. [Functions](#functions)\n6. [Data type mapping](#data-type-mapping)\n7. [Identifier case handling](#identifier-case-handling)\n8. [Generated columns](#generated-columns)\n9. [Character set handling](#character-set-handling)\n10. [Examples](#examples)\n11. [Limitations](#limitations)\n12. [Contributing](#contributing)\n13. [Useful links](#useful-links)\n14. [License](#license)\n\nFeatures\n--------\n### Common features\n\n* Support `SELECT` feature to get data from DynamoDB.\n* DynamoDB FDW supports selecting columns or nested attribute object (using `-\u003e` or `-\u003e\u003e` operator)\n* Support `INSERT` feature.\n* Support `UPDATE` feature using foreign modify.\n* Support `DELETE` feature using foreign modify.\n\n### Pushdowning\n\n#### Common pushdowning\n* Support push down `WHERE` clause (including nested attribute object).\n* Support push down function `SIZE` of DynamoDB.\n* Does not push down `WHERE` condition when it compares array constant.\nFor example: `SELECT * FROM array_test WHERE array_n \u003c '{1232, 5121, 8438, 644, 83}';` is not pushed down.\n* Does not push down `WHERE` condition when it contains text comparison using `\u003c, \u003c=, \u003e=, \u003e` operators.\nFor example: `SELECT * FROM WHERE name \u003e '@#!S';` is not pushed down.\n* Does not push down when selecting multiple attributes with the same name.\nFor example: `SELECT name, friends-\u003e'class_info'-\u003e'name' FROM students;`\n* Does not push down overlap document path. \nFor example: `SELECT friends-\u003e'class_info', friends-\u003e'class_info'-\u003e'name' FROM students;`\n\n#### Comparison operators\n| No | PostgreSQL | Remark |\n|----|------------|--------|\n| 1 | `=` | Equal to |\n| 2 | `\u003c\u003e` or `!=` | Not Equal to |\n| 3 | `\u003e ` | Greater than |\n| 4 | `\u003c ` | Less than |\n| 5 | `\u003e=` | Greater than or equal to |\n| 6 | `\u003c=` | Less than or equal to |\n\n#### Logical operators\n| No | PostgreSQL | Remark |\n|----|------------|--------|\n| 1 | `AND` | `TRUE` if all the conditions separated by `AND` are `TRUE` |\n| 2 | `BETWEEN` | `TRUE` if the operand is within the range of comparisons |\n| 3 | `IN` | Only support `IN` with a list of value. Return `TRUE` if the operand is equal to one of a list of expressions. |\n| 4 | `IS` | Only support `IS NULL`. Return `TRUE` if the operand is NULL. |\n| 5 | `NOT` | Reverses the value of a given Boolean expression |\n| 6 | `OR` | `TRUE` if any of the conditions separated by `OR` are `TRUE` |\n\n#### Dereference operators\n| No | PostgreSQL | Remark |\n|----|------------|--------|\n| 1 | `-\u003e` | Extracts JSON object field with the given key. This mapping will be used when right operand is an attribute name (which is represented as a text constant). |\n| 2 | `-\u003e\u003e` | Extracts JSON object field with the given key, as text. |\n| 3 | `-\u003e` | Extract nested element of List type. This mapping will be used when right operand is a number. |\n\n### Notes about features\n\n* For string set and number set of DynamoDB, the values in the set are sorted from smallest to largest automatically.\nTherefore, if you want to access to the element of array, it will return the different value compared to insert value.\nFor example, you insert `\u003c\u003c3,2,1\u003e\u003e` into DynamoDB. DynamoDB will sort and store it as `\u003c\u003c1,2,3\u003e\u003e`.\nIf you want to select element `[1]` of the set, it will return 1.\n* DynamoDB does not support NULL as element of string set or number set.\nTherefore, when user input NULL as element of array, the default value (0 for number, empty string for text) will be inserted into DynamoDB.\nFor example, user input `array[1,2,null,4]`, the values inserted into DynamoDB will be `[1, 2, 0, 4]`.\nUser input `array['one','two',null,'four']`, the values inserted into DynamoDB will be `['one', 'two', '', 'four']`.\n* If an attribute of Map type does not exist, the condition `xxx IS NULL` will always return false.\n\nAlso see [Limitations](#limitations).\n\nSupported platforms\n-------------------\n\n`dynamodb_fdw` was developed on Linux, and should run on any\nreasonably POSIX-compliant system.\n\n`dynamodb_fdw` is designed to be compatible with PostgreSQL 13 ~ 17.0.\n\nInstallation\n------------\n### Prerequisites\n\n1. AWS C++ SDK\nDynamoDB FDW uses the APIs provided by AWS C++ SDK to connect and execute query on DynamoDB.\nIt requires gcc version 4.9.0 and above to be able to use and compile.\nIt also requires 3rd party libraries: libcurl, openssl, libuuid, pulseaudio-libs. \n2. Java Runtime Environment (JRE) version 8.x or newer\nIf using DynamoDB local, JRE 8.x or newer is required.\n\n### Source installation\n\nThis section describle how to install required library on **CentOS 7**.\n\n1. AWS C++ SDK\n    Download and follow the Amazon developer guide.\n    \u003cpre\u003ehttps://docs.aws.amazon.com/sdk-for-cpp/v1/developer-guide/setup-linux.html\u003c/pre\u003e\n\n2. Java Runtime Environment (JRE) version 8.x or newer\n\t\u003cpre\u003e\n    $ sudo yum install java-1.8.0-openjdk-devel.x86_64\u003c/pre\u003e\n3. Build and install PostgreSQL: from PostgreSQL directory\n    \u003cpre\u003e\n    ./configure\n    $ make\n    $ make install\u003c/pre\u003e\n4. Build and install DynamoDB FDW:\n    clone source code under PostgreSQL/contrib/\n    \u003cpre\u003e\n    $ make\n    $ make install\u003c/pre\u003e\n\nUsage\n-----\n\n## CREATE SERVER options\n\n`dynamodb_fdw` accepts the following options via the `CREATE SERVER` command:\n\n- **endpoint** as *string*, optional, default `http://localhost:8000`\n\n  The URL of the entry point for an AWS web service. It is required for AWS DynamoDB and optional for DynamoDB local.\n\n## CREATE USER MAPPING options\n\n`dynamodb_fdw` accepts the following options via the `CREATE USER MAPPING`\ncommand:\n\n- **user** as *string*, optional, no default\n\n  The user credential to connect to DynamoDB. It is required for AWS DynamoDB and optional for DynamoDB local.\n\n- **password** as *string*, optional, no default\n\n  The password credential to connect to DynamoDB. It is required for AWS DynamoDB and optional for DynamoDB local.\n\n\n## CREATE FOREIGN TABLE options\n\n`dynamodb_fdw` accepts the following table-level options via the\n`CREATE FOREIGN TABLE` command.\n\n- **partition_key** as *string*, optional, no default\n\n  The column name of the partition key of DynamoDB table.\n  \n- **sort_key** as *string*, optional, no default\n  \n  The column name of the sort key of DynamoDB table.\n\n- **table_name** as *string*, optional, default table name of foreign table\n\n  The corresponding table name in DynamoDB.\n\nThe following column-level options are available:\n\n- **column_name** as *string*, optional, default column name of foreign table\n\n  The corresponding column name in DynamoDB.\n\n## IMPORT FOREIGN SCHEMA options\n\n`dynamodb_fdw` **don't support** [IMPORT FOREIGN SCHEMA](https://www.postgresql.org/docs/current/sql-importforeignschema.html) and \n accepts no custom options.\n\n## TRUNCATE support\n\n`dynamodb_fdw` **don't support** the foreign data wrapper `TRUNCATE` API, available\nfrom PostgreSQL 14.\n\nFunctions\n---------\nAs well as the standard `dynamodb_fdw_handler()` and `dynamodb_fdw_validator()`\nfunctions, `dynamodb_fdw` provides the following user-callable utility functions:\nFunctions from this FDW in PostgreSQL catalog are **yet not described**.\n\nData type mapping\n-----------------\n\n| No | PostgreSQL | DynamoDB | Remark |\n|----|------------|----------|--------|\n| 1 | boolean | Boolean | N/A | \n| 2 | bytea | Binary | DynamoDB FDW does not support Binary column in `WHERE` clause. |\n| 3 | JSON/JSONB | Map | N/A |\n| 4 | NULL | Null | N/A |\n| 5 | smallint, integer, bigint, numeric, real, double precision | Number | N/A |\n| 6 | smallint\\[\\], integer\\[\\], bigint\\[\\], numeric\\[\\], real\\[\\], double precision\\[\\] | Number Set | N/A |\n| 7 | text character varying(n)\\[\\], varchar(n)\\[\\], character(n)\\[\\], char(n) \\[\\], text\\[\\] | String Set | N/A |\n| 8 | text character varying(n), varchar(n), character(n), char(n), text | String | N/A |\n| 9 | bytea[] | Binary Set | N/A |\n\nIdentifier case handling\n------------------------\n\nPostgreSQL folds identifiers to lower case by default.\nRules and problems with DynamoDB identifiers **yet not tested and described**.\n\nGenerated columns\n-----------------\n\nBehaviour within generated columns **yet not tested and described**. \n\nFor more details on generated columns see:\n\n- [Generated Columns](https://www.postgresql.org/docs/current/ddl-generated-columns.html)\n- [CREATE FOREIGN TABLE](https://www.postgresql.org/docs/current/sql-createforeigntable.html)\n\n\nCharacter set handling\n----------------------\n\n**Yet not described**.\n\nExamples\n--------\n\n### Install the extension:\n\nOnce for a database you need, as PostgreSQL superuser.\n\n```sql\n\tCREATE EXTENSION dynamodb_fdw;\n```\n### Create a foreign server with appropriate configuration:\n\nOnce for a foreign datasource you need, as PostgreSQL superuser.\n\n```sql\n\tCREATE SERVER dynamodb_svr\n\tFOREIGN DATA WRAPPER dynamodb_fdw\n\tOPTIONS (\n\t  endpoint 'http://localhost:8000'\n\t);\n```\n\n### Grant usage on foreign server to non-superuser in PostgreSQL:\n\nOnce for a non-superuser in PostgreSQL, as PostgreSQL superuser. It is a good idea to use a superuser only where really necessary, so let's allow a normal user to use the foreign server (this is not required for the example to work, but it's secirity recomedation).\n\n```sql\n\tGRANT USAGE ON FOREIGN SERVER dynamodb_svr TO pguser;\n```\nWhere `pgser` is a sample user for works with foreign server (and foreign tables).\n\n### Create an appropriate user mapping:\n\n```sql\n\tCREATE USER MAPPING\n\tFOR pgser\n\tSERVER dynamodb_svr \n    \tOPTIONS(\n\t  username 'username',\n\t  password 'password'\n\t);\n```\nWhere `pgser` is a sample user for works with foreign server (and foreign tables).\n\n### Create a foreign table referencing the dynamodb table:\n```sql\n\tCREATE FOREIGN TABLE frtbl (\n\t  c1 int,\n\t  c2 text,\n\t  c3 jsonb\n\t)\n\tSERVER dynamodb_svr\n\tOPTIONS (\n\t  table_name 'table1'\n\t);\n```\n\n### Query the foreign table.\n\n```sql\n\tSELECT *\n\tFROM frtbl;\n```\t\n\nLimitations\n-----------\n\n* Does not support `List` type of DynamoDB.\n* For DynamoDB, 2 records can have the same attribute name but different data type. However, DynamoDB FDW does not support that case. User need to avoid using that case.\n* Does not support `COPY FROM` and foreign partition routing. The following error will be shown.\n    `COPY and foreign partition routing not supported in dynamodb_fdw`\n    \nContributing\n------------\nOpening issues and pull requests on GitHub are welcome.\n\nUseful links\n------------\n\n### Source code\n\nReference FDW realisation, `postgres_fdw`\n - https://git.postgresql.org/gitweb/?p=postgresql.git;a=tree;f=contrib/postgres_fdw;hb=HEAD\n\n### General FDW Documentation\n\n - https://www.postgresql.org/docs/current/ddl-foreign-data.html\n - https://www.postgresql.org/docs/current/sql-createforeigndatawrapper.html\n - https://www.postgresql.org/docs/current/sql-createforeigntable.html\n - https://www.postgresql.org/docs/current/sql-importforeignschema.html\n - https://www.postgresql.org/docs/current/fdwhandler.html\n - https://www.postgresql.org/docs/current/postgres-fdw.html\n\n### Other FDWs\n\n - https://wiki.postgresql.org/wiki/Fdw\n - https://pgxn.org/tag/fdw/\n \nLicense\n-------\nCopyright and license information can be found in the file [`LICENSE`][1].\n\n[1]: LICENSE\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgspider%2Fdynamodb_fdw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgspider%2Fdynamodb_fdw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgspider%2Fdynamodb_fdw/lists"}