{"id":21384060,"url":"https://github.com/nbbrd/sasquatch","last_synced_at":"2025-07-13T14:31:32.012Z","repository":{"id":37824600,"uuid":"249722312","full_name":"nbbrd/sasquatch","owner":"nbbrd","description":"SAS dataset library for Java","archived":false,"fork":false,"pushed_at":"2025-07-07T08:54:53.000Z","size":807,"stargazers_count":5,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-07-07T09:45:15.188Z","etag":null,"topics":["command-line-tool","desktop-application","java8","library","sas7bdat"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nbbrd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-03-24T13:57:15.000Z","updated_at":"2025-07-07T08:54:56.000Z","dependencies_parsed_at":"2023-02-19T05:46:15.170Z","dependency_job_id":"95b838a1-8911-4054-9e00-16b0d4ff13ec","html_url":"https://github.com/nbbrd/sasquatch","commit_stats":{"total_commits":318,"total_committers":4,"mean_commits":79.5,"dds":"0.48742138364779874","last_synced_commit":"c25b0a83e516ac9289ecbee03ddcabe9c0d2dd10"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/nbbrd/sasquatch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbrd%2Fsasquatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbrd%2Fsasquatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbrd%2Fsasquatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbrd%2Fsasquatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbbrd","download_url":"https://codeload.github.com/nbbrd/sasquatch/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbbrd%2Fsasquatch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265155699,"owners_count":23719566,"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":["command-line-tool","desktop-application","java8","library","sas7bdat"],"created_at":"2024-11-22T11:37:50.088Z","updated_at":"2025-07-13T14:31:31.998Z","avatar_url":"https://github.com/nbbrd.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sasquatch - SAS dataset library for Java\n\n[![Download](https://img.shields.io/github/release/nbbrd/sasquatch.svg)](https://github.com/nbbrd/sasquatch/releases/latest)\n[![Changes](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fnbbrd%2Fsasquatch%2Fbadges%2Funreleased-changes.json)](https://github.com/nbbrd/sasquatch/blob/develop/CHANGELOG.md)\n[![Reproducible Builds](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/jvm-repo-rebuild/reproducible-central/master/content/com/github/nbbrd/sasquatch/badge.json)](https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/com/github/nbbrd/sasquatch/README.md)\n\nThis [Java library](#java-library) provides a reader for SAS datasets.  \nIt also provides a [command-line tool](#command-line-tool) and a [desktop application](#desktop-application).\n\nKey points:\n\n- lightweight library designed as a [facade](https://en.wikipedia.org/wiki/Facade_pattern)\n- Java 8 minimum requirement\n- has a module-info that makes it compatible with [JPMS](https://www.baeldung.com/java-9-modularity) \n\nFeatures:\n\n- reads meta and data from SAS datasets (*.sas7bdat)\n- browses data with 3 types of cursor: forward-only, scrollable and splittable\n- is compatible with Java Stream API\n- provides a simple facade that allows to plug in any implementation at deployment time\n- implies the addition of a single mandatory dependency\n\n## Java library\n\n### API overview\n\nSasquatch is instantiated by a factory:\n\n```java\nSasquatch sasquatch = Sasquatch.ofServiceLoader();\n```\n\nIt provides 3 ways of browsing the data:\n- forward-only: row by row from the first to the last\n- scrollable: any row by its position\n- splittable: rows as a (parallel) stream\n\n```java\nPath file = ...;\n\n// forward-only cursor\ntry (SasForwardCursor cursor = sasquatch.readForward(file)) {\n    while (cursor.next()) {\n    }\n}\n\n// scrollable cursor\ntry (SasScrollableCursor cursor = sasquatch.readScrollable(file)) {\n    for (int i = 0; i \u003c cursor.getRowCount(); i++) {\n        cursor.moveTo(i);\n    }\n}\n\n// splittable cursor\ntry (SasSplittableCursor cursor = sasquatch.readSplittable(file)) {\n    Stream\u003cSasRow\u003e stream = StreamSupport.stream(cursor.getSpliterator(), false);\n}\n```\nSome shortcuts are also available:\n\n```java\n// sample factory that extracts the first field as a string\nSasRow.Factory\u003cString\u003e factory = cursor -\u003e row -\u003e row.getString(0);\n\n// stream shortcut\ntry (Stream\u003cString\u003e stream = sasquatch.rows(file, factory)) {\n}\n\n// list shortcut\nList\u003cString\u003e rows = sasquatch.getAllRows(file, factory);\n```\nMetadata can be retrieved directly or through a cursor:\n```java\n// direct\nSasMetaData meta = sasquatch.readMetaData(file);\n\n// through a cursor\ntry (SasCursor cursor = sasquatch.read...(file)) {\n    cursor.getMetaData();\n}\n```\n\n### Implementations\n\nAt least one implementation must be available at runtime (on classpath or modulepath) in order to read datasets. No implementation triggers an `IOException` on read operations.\n\nSasquatch supports the following implementations:\n\n| artifactId | description | support |\n| --- | --- | :---: |\n| `sasquatch-ri` | native reference implementation | advanced |\n| `sasquatch-parso` | wrapper around parso library | advanced |\n| `sasquatch-sassy` | wrapper around sassy library | basic |\n| `sasquatch-biostatmatt` | java version of biostatmatt r code | basic |\n\nFeature matrix:\n\n| | `ri` | `parso` | `sassy` | `biostatmatt` |\n| ---: | :---: | :---: | :---: | :---: |\n| `BIG_ENDIAN_32` | x | x | - | - |\n| `LITTLE_ENDIAN_32` | x | x | x | x |\n| `BIG_ENDIAN_64` | x | x | - | - |\n| `LITTLE_ENDIAN_64` | x | x | - | x |\n| `ATTRIBUTES` | x | x | - | x |\n| `LABEL_META` | x | x | - | - |\n| `FIELD_ENCODING` | x | x | - | - |\n| `COLUMN_ENCODING` | x | x | - | - |\n| `CHAR_COMP` | x | x | - | - |\n| `BIN_COMP` | x | x | - | - |\n| `DATE_TYPE` | x | x | - | - |\n| `DATE_TIME_TYPE` | x | x | - | - |\n| `TIME_TYPE` | x | x | - | - |\n| `CUSTOM_NUMERIC` | x | x | x | - |\n| `COLUMN_FORMAT` | x | x | - | - |\n\n### Dependencies setup\n\n```xml\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.nbbrd.sasquatch\u003c/groupId\u003e\n    \u003cartifactId\u003esasquatch-api\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n  \u003c/dependency\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.nbbrd.sasquatch\u003c/groupId\u003e\n    \u003cartifactId\u003esasquatch-ri\u003c/artifactId\u003e\n    \u003cversion\u003eLATEST_VERSION\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n## Command-line tool\n\nThe command-line tool (`sasquatch` in `sasquatch-cli` project) allows to export a SAS dataset to a CSV or SQL file.\n\n```bash\n$ sasquath csv somedata.sas7bdat -o somedata.csv\n$ sasquath sql somedata.sas7bdat -o somedata.sql\n```\n\n## Desktop application\n\nThe desktop application (`sasquatchw` in `sasquatch-desktop` project) is a basic dataset viewer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbbrd%2Fsasquatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbbrd%2Fsasquatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbbrd%2Fsasquatch/lists"}