--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: read_stat excerpt: | DuckDB Community Extensions Read data sets from SAS, Stata, and SPSS with ReadStat extension: name: read_stat description: Read data sets from SAS, Stata, and SPSS with ReadStat version: 0.3.0 language: C build: cmake license: MIT requires_toolchains: "python3" maintainers: - dylanmeysmans repo: github: dylanmeysmans/duckdb-read-stat ref: f8ff95c2a6b81d81d99ae133bb37ec78e69fff15 docs: hello_world: | -- Read a SAS `.sas7bdat` or `.xpt` file FROM read_stat('sas_data.sas7bdat'); FROM read_stat('sas_data.xpt'); -- Read an SPSS `.sav`, `.zsav`, or `.por` file FROM read_stat('spss_data.sav'); FROM read_stat('compressed_spss_data.zsav'); FROM read_stat('portable_spss_data.por'); -- Read a Stata .dta file FROM read_stat('stata_data.dta'); -- If the file extension is not `.sas7bdat`, `.xpt`, `.sav`, `.zsav`, `.por`, or `.dta`, -- use the `read_stat` function for the right file type with the `format` parameter: FROM read_stat('sas_data.other_extension', format = 'sas7bdat'); FROM read_stat('sas_data.other_extension', format = 'xpt'); -- SPSS `.sav` and `.zsav` can both be read through the format `'sav'` FROM read_stat( 'spss_data_possibly_compressed.other_extension', format = 'sav' ); FROM read_stat('portable_spss_data.other_extension', format = 'por'); FROM read_stat('stata_data.other_extension', format = 'dta'); -- Override the character encoding with an `iconv`` encoding name, -- see https://www.gnu.org/software/libiconv/ CREATE TABLE other_data AS FROM read_stat('latin1_encoded.sas7bdat', encoding = 'iso-8859-1'); extended_description: | ## Usage ### Parameters | Name | Description | Type | Default | |:----|:-----------|:----:|:-------| | `format` | The format of the input file, when its extension does not indicate it, either `'sas7bdat'`, `'xpt'`, `'sav'`, `'por'`, or `'dta'` | `VARCHAR` | `NULL` | | `encoding` | The character encoding of the input file, as defined by `iconv`, see https://www.gnu.org/software/libiconv/ | `VARCHAR` | `NULL` | extension_star_count: 35 extension_star_count_pretty: 35 extension_download_count: 13125 extension_download_count_pretty: 13.1k image: '/images/community_extensions/social_preview/preview_community_extension_read_stat.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ✅ | ✅ | ✅ | ❌ | ❌ | | Linux ARM64 | ✅ | ✅ | ✅ | ❌ | ❌ | | macOS AMD64 | ✅ | ✅ | ✅ | ❌ | ❌ | | macOS ARM64 | ✅ | ✅ | ✅ | ❌ | ❌ | | Windows AMD64 | ✅ | ✅ | ✅ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ✅ | ✅ | ✅ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions | function_name | function_type | description | comment | examples | |---------------|---------------|-------------|---------|----------| | read_stat | table | NULL | NULL | | ### Overloaded Functions This extension does not add any function overloads. ### Added Types This extension does not add any types. ### Added Settings This extension does not add any settings.