--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: nats_js excerpt: | DuckDB Community Extensions Query NATS JetStream message streams directly with SQL extension: name: nats_js description: Query NATS JetStream message streams directly with SQL version: 0.4.0 language: C++ build: cmake license: MIT excluded_platforms: "linux_amd64_musl;windows_amd64_mingw;wasm_mvp;wasm_eh;wasm_threads" maintainers: - brannn repo: github: brannn/duckdb-nats-jetstream ref: e3a8038757a187f2df1afcec4b687ff0587c26f5 variegata: 6979bb32de0c215f5f6d5c5dc71ff6ea8b4fdbb6 docs: hello_world: | -- Read messages from a stream (the server defaults to nats://localhost:4222) SELECT subject, seq, ts_nats, payload FROM nats_scan('telemetry', start_seq := 1, end_seq := 100); -- Filter subjects with NATS wildcards and extract JSON fields, including nested ones SELECT seq, device_id, location_zone, kw FROM nats_scan('telemetry', subject := 'telemetry.*.power.>', json_extract := ['device_id', 'location.zone', 'kw'] ); -- Extract Protocol Buffers fields with native types SELECT device_id, location_zone, metrics_kw FROM nats_scan('telemetry_proto', proto_file := 'telemetry.proto', proto_message := 'Telemetry', proto_extract := ['device_id', 'location.zone', 'metrics.kw'] ); extended_description: | The nats_js extension reads the messages stored in NATS JetStream streams with SQL. It creates no consumers. Features: - Subject filters with NATS wildcards, applied by the server - Sequence ranges (start_seq, end_seq) and time ranges (start_time, end_time), also from WHERE clauses - Batched reads on nats-server 2.11 and later - Message headers as a MAP(VARCHAR, VARCHAR[]) column - JSON field extraction with dot paths for nested fields - Protocol Buffers decoding from a .proto file at query time, with native DuckDB types - Authentication and TLS through DuckDB secrets of type nats - Streams with or without allow_direct Documentation: https://github.com/brannn/duckdb-nats-jetstream extension_star_count: 22 extension_star_count_pretty: 22 extension_download_count: 632 extension_download_count_pretty: 632 image: '/images/community_extensions/social_preview/preview_community_extension_nats_js.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 | |---------------|---------------|-------------|---------|----------| | nats_scan | table | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
| name | description | input_type | scope | aliases | typed_value | |----------------|---------------------------------------------------------|------------|--------|---------|-------------| | temp_directory | Set the directory to which temporary files are written. | VARCHAR | GLOBAL | [] | post.db.tmp |