Skip to content

Latest commit

 

History

History
93 lines (77 loc) · 3.09 KB

File metadata and controls

93 lines (77 loc) · 3.09 KB
warning title excerpt extension repo docs extension_star_count extension_star_count_pretty extension_download_count extension_download_count_pretty image layout
DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github/duckdb/community-extensions repository, check README there
read_stat
DuckDB Community Extensions Read data sets from SAS, Stata, and SPSS with ReadStat
name description version language build license requires_toolchains maintainers
read_stat
Read data sets from SAS, Stata, and SPSS with ReadStat
0.2.3
C
cmake
MIT
python3
mettekou
github ref
mettekou/duckdb-read-stat
5253f0b6d9ef56f7ee26c37f555ee7a4881578e6
hello_world extended_description
-- 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');
## 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` |
9
9
454
454
/images/community_extensions/social_preview/preview_community_extension_read_stat.png
community_extension_doc

Installing and Loading

INSTALL {{ page.extension.name }} FROM community;
LOAD {{ page.extension.name }};

{% if page.docs.hello_world %}

Example

{{ page.docs.hello_world }}```
{% endif %}

{% if page.docs.extended_description %}
### About {{ page.extension.name }}
{{ page.docs.extended_description }}
{% endif %}

### Added Functions

<div class="extension_functions_table"></div>

| function_name | function_type | description | comment | examples |
|---------------|---------------|-------------|---------|----------|
| read_stat     | table         | NULL        | NULL    | []       |