--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: bgp excerpt: | DuckDB Community Extensions BGP AS-path and community helpers in SQL — path length, origin AS, prepend count, membership test, RFC 8092 large-community classification extension: name: bgp description: BGP AS-path and community helpers in SQL — path length, origin AS, prepend count, membership test, RFC 8092 large-community classification version: 0.1.0 language: Rust build: cargo license: MIT excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl" requires_toolchains: "rust;python3" maintainers: - alitrack repo: github: alitrack/duckdb-bgp ref: efc37b947cf628912b036f2e7b1f51761550b696 ref_next: efc37b947cf628912b036f2e7b1f51761550b696 docs: hello_world: | INSTALL bgp FROM community; LOAD bgp; SELECT bgp_path_length('100 200 300'); -- 3 SELECT bgp_origin_asn('100 200 300'); -- 300 SELECT bgp_as_path_prepends('100 100 100 200');-- prepends SELECT bgp_path_contains('100 200 300', 200); -- true SELECT bgp_community_parse('65001:100'); -- STRUCT(asn, value) SELECT bgp_is_large_community('65001:100:5'); -- true extended_description: | ## bgp — route-policy primitives in SQL AS-path and community attributes are the workhorse of route-policy analysis. No Python, no bgpkit-parser script, no hand-rolled split. | Function | Returns | Notes | |---|---|---| | `bgp_path_length(path)` | BIGINT | Number of AS hops | | `bgp_origin_asn(path)` | BIGINT | Last AS in the path | | `bgp_as_path_prepends(path)` | BIGINT | Prepend count | | `bgp_path_contains(path, asn)` | BOOLEAN | Transit membership test | | `bgp_community_parse(community)` | STRUCT | `asn` + `value`, NULL if malformed | | `bgp_is_large_community(community)` | BOOLEAN | RFC 8092 `a:b:c` form | → [GitHub](https://github.com/alitrack/duckdb-bgp) extension_star_count: 0 extension_star_count_pretty: 0 extension_download_count: null extension_download_count_pretty: n/a image: '/images/community_extensions/social_preview/preview_community_extension_bgp.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 | |------------------------|---------------|-------------|---------|----------| | bgp_as_path_prepends | scalar | NULL | NULL | | | bgp_community_parse | scalar | NULL | NULL | | | bgp_is_large_community | scalar | NULL | NULL | | | bgp_origin_asn | scalar | NULL | NULL | | | bgp_path_contains | scalar | NULL | NULL | | | bgp_path_length | scalar | 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 |