{"id":13635872,"url":"https://github.com/openresty/rds-csv-nginx-module","last_synced_at":"2025-04-19T04:31:34.695Z","repository":{"id":46357980,"uuid":"2283707","full_name":"openresty/rds-csv-nginx-module","owner":"openresty","description":"Nginx output filter module to convert Resty-DBD-Streams (RDS) to Comma-Separated Values (CSV)","archived":false,"fork":false,"pushed_at":"2023-11-23T11:55:49.000Z","size":79,"stargazers_count":22,"open_issues_count":2,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-02-13T10:03:05.759Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openresty.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2011-08-28T15:05:12.000Z","updated_at":"2024-08-02T00:03:28.959Z","dependencies_parsed_at":"2024-08-02T00:13:37.716Z","dependency_job_id":null,"html_url":"https://github.com/openresty/rds-csv-nginx-module","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openresty%2Frds-csv-nginx-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openresty%2Frds-csv-nginx-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openresty%2Frds-csv-nginx-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openresty%2Frds-csv-nginx-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openresty","download_url":"https://codeload.github.com/openresty/rds-csv-nginx-module/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249606363,"owners_count":21298851,"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-08-02T00:00:53.490Z","updated_at":"2025-04-19T04:31:34.444Z","avatar_url":"https://github.com/openresty.png","language":"C","funding_links":[],"categories":["Modules","Third Modules","Third Party Modules"],"sub_categories":["C Modules"],"readme":"Name\n====\n\nngx_rds_csv - Nginx output filter module to convert Resty-DBD-Streams\n(RDS) to Comma-Separated Values (CSV)\n\nTable of Contents\n=================\n\n* [Name](#name)\n* [Status](#status)\n* [Synopsis](#synopsis)\n* [Description](#description)\n* [Directives](#directives)\n    * [rds_csv](#rds_csv)\n    * [rds_csv_row_terminator](#rds_csv_row_terminator)\n    * [rds_csv_field_separator](#rds_csv_field_separator)\n    * [rds_csv_field_name_header](#rds_csv_field_name_header)\n    * [rds_csv_content_type](#rds_csv_content_type)\n    * [rds_csv_buffer_size](#rds_csv_buffer_size)\n* [Installation](#installation)\n* [Compatibility](#compatibility)\n* [Author](#author)\n* [Copyright \u0026 License](#copyright--license)\n* [See Also](#see-also)\n\nStatus\n======\n\nThis module is considered production ready.\n\nSynopsis\n========\n\n```nginx\nlocation /foo {\n    # drizzle_pass/postgres_pass/...\n\n    rds_csv on;\n    rds_csv_row_terminator \"\\n\"; # default to \"\\r\\n\"\n}\n```\n\nDescription\n===========\n\nThis module implements an efficient output filter that converts\nResty-DBD-Streams (RDS) generated by [ngx_drizzle](https://github.com/openresty/drizzle-nginx-module)\nand [ngx_postgres](https://github.com/FRiCKLE/ngx_postgres/)\nto Comma-Separated Values (CSV) format in a streaming fashion.\nBy default, the CSV format is in compliance with [RFC 4180](http://tools.ietf.org/html/rfc4180):\n\nhttp://tools.ietf.org/html/rfc4180\n\nSQL NULL values will be converted to empty field value, just like\nempty string values.\n\n[Back to TOC](#table-of-contents)\n\nDirectives\n==========\n\n[Back to TOC](#table-of-contents)\n\nrds_csv\n-------\n**syntax:** *rds_csv on|off*\n\n**default:** *rds_csv off*\n\n**context:** *http, server, location, location if*\n\nEnables this output filter when on and disables otherwise.\n\n[Back to TOC](#table-of-contents)\n\nrds_csv_row_terminator\n----------------------\n\n**syntax:** *rds_csv_row_terminator \u0026lt;str\u0026gt;*\n\n**default:** *rds_csv_row_terminator \"\\r\\n\"*\n\n**context:** *http, server, location, location if*\n\nSpecifies the row terminator used by the CSV format.\nOnly `\"\\r\\n\"` and `\"\\n\"` are allowed.\n\nDefaults to `\"\\r\\n\"`, i.e., CR LF, according to [RFC 4180](http://tools.ietf.org/html/rfc4180).\n\n[Back to TOC](#table-of-contents)\n\nrds_csv_field_separator\n-----------------------\n\n**syntax:** *rds_csv_field_separator \u0026lt;char\u0026gt;*\n\n**default:** *rds_csv_field_separator \",\"*\n\n**context:** *http, server, location, location if*\n\nSpecifies the field seperator used by the CSV format.\nOnly `\",\"`, `\";\"`, and `\"\\t\"` are allowed.\n\nDefaults to `\",\"` according to [RFC 4180](http://tools.ietf.org/html/rfc4180).\n\n[Back to TOC](#table-of-contents)\n\nrds_csv_field_name_header\n-------------------------\n\n**syntax:** *rds_csv_field_name_header on|off*\n\n**default:** *rds_csv_field_name_header off*\n\n**context:** *http, server, location, location if*\n\nEmits the first line of field names when this directive is set on,\nand none otherwise.\n\n[Back to TOC](#table-of-contents)\n\nrds_csv_content_type\n--------------------\n**syntax:** *rds_csv_content_type \u0026lt;str\u0026gt;*\n\n**default:** *rds_csv_content_type \"text/csv; header=\u0026lt;present|absence\u0026gt;\"*\n\n**context:** *http, server, location, location if*\n\nSpecifies the `Content-Type` response header generated by this module.\n\nDefaults to `\"text/csv; header=present\"` or `\"text/csv; header=absence\"`,\ndepending on whether [rds_csv_field_name_header](#rds_csv_field_name_header) is on or off.\n\n[Back to TOC](#table-of-contents)\n\nrds_csv_buffer_size\n-------------------\n**syntax:** *rds_csv_buffer_size \u0026lt;size\u0026gt;*\n\n**default:** *rds_csv_buffer_size 4k/8k*\n\n**context:** *http, server, location, location if*\n\nThe lager this buffer size setting, the less streammy the output\nwill be.\n\n[Back to TOC](#table-of-contents)\n\nInstallation\n============\n\nYou're recommended to install this module (as well as the Nginx core and many other goodies) via the [ngx_openresty bundle](http://openresty.org). See [the detailed instructions](http://openresty.org/#Installation) for downloading and installing ngx_openresty into your system. This is the easiest and most safe way to set things up.\n\nAlternatively, you can install this module manually with the Nginx source:\n\nGrab the nginx source code from [nginx.org](http://nginx.org/), for example,\nthe version 1.13.6 (see [nginx compatibility](#compatibility)), and then build the source with this module:\n\n```bash\n\n $ wget 'http://nginx.org/download/nginx-1.13.6.tar.gz'\n $ tar -xzvf nginx-1.13.6.tar.gz\n $ cd nginx-1.13.6/\n\n # Here we assume you would install you nginx under /opt/nginx/.\n $ ./configure --prefix=/opt/nginx \\\n     --add-module=/path/to/rds-csv-nginx-module\n\n $ make -j2\n $ make install\n```\n\nDownload the latest version of the release tarball of this module from [rds-csv-nginx-module file list](https://github.com/openresty/rds-csv-nginx-module/tags).\n\nAlso, this module is included and enabled by default in the [ngx_openresty bundle](http://openresty.org).\n\n[Back to TOC](#table-of-contents)\n\nCompatibility\n=============\n\nThis module is compatible with the following versions of Nginx:\n\n* **1.13.x** (last tested: 1.13.6)\n* **1.12.x**\n* **1.11.x** (last tested: 1.11.2)\n* **1.10.x**\n* **1.9.x** (last tested: 1.9.7)\n* **1.8.x**\n* **1.7.x** (last tested: 1.7.10)\n* **1.6.x**\n* **1.5.x**\n* **1.4.x** (last tested: 1.4.3)\n* **1.2.x** (last tested: 1.2.9)\n* **1.1.x** (last tested: 1.1.5)\n* **1.0.x** (last tested: 1.0.8)\n\n[Back to TOC](#table-of-contents)\n\nAuthor\n======\nYichun \"agentzh\" Zhang \u0026lt;agentzh@gmail.com\u0026gt;, OpenResty Inc.\n\n[Back to TOC](#table-of-contents)\n\nCopyright \u0026 License\n===================\nThis module is licenced under the BSD license.\n\nCopyright (C) 2011-2018, Yichun \"agentzh\" Zhang (章亦春) \u0026lt;agentzh@gmail.com\u0026gt;, OpenResty Inc.\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n* Redistributions of source code must retain the above copyright\nnotice, this list of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright\nnotice, this list of conditions and the following disclaimer in the\ndocumentation and/or other materials provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nHOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED\nTO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n[Back to TOC](#table-of-contents)\n\nSee Also\n========\n\n* [ngx_drizzle](https://github.com/openresty/drizzle-nginx-module)\n* [ngx_postgres](https://github.com/FRiCKLE/ngx_postgres/)\n* [ngx_rds_json](https://github.com/openresty/rds-json-nginx-module)\n\n[Back to TOC](#table-of-contents)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenresty%2Frds-csv-nginx-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenresty%2Frds-csv-nginx-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenresty%2Frds-csv-nginx-module/lists"}