GeezerVison is showing github.com — docs: fix API section colors · feldera/feldera@5e5d192
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/.gitignore +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -25,3 +25,6 @@ yarn-error.log* | 25 | 25 | /static/python | 26 | 26 | /static/openapi | 27 | 27 | /openapi/ | | 28 | + | | 29 | +# Copied from ../openapi.json at build time, served at /openapi.json | | 30 | +/static/openapi.json |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/sidebars.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -109,6 +109,7 @@ const guides = { | 109 | 109 | label: 'Use Cases', | 110 | 110 | collapsed: false, | 111 | 111 | items: [ | | 112 | + 'use_cases/how-to-build', | 112 | 113 | { | 113 | 114 | type: 'category', | 114 | 115 | label: 'Agents', | |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/tutorials/index.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,7 +15,7 @@ Learn Feldera step by step, or start from what you want to build. | 15 | 15 |
| 16 | 16 | ## Use cases | 17 | 17 |
| 18 | | -Guides and runnable demos, sorted by what you want to build. | | 18 | +Guides and runnable demos, sorted by what you want to build. Every use case has the same shape: see [How to build a use case](/use_cases/how-to-build) for the steps and a starting point for each. | 19 | 19 |
| 20 | 20 | <HubGrid /> | 21 | 21 |
| |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/use_cases/agents.mdx +5-1Lines changed: 5 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -28,6 +28,8 @@ An agent is only as good as its context. With Feldera, that context is a set of | 28 | 28 | - **Agents write SQL.** An agent can define the context it needs as a SQL view and deploy it. The views, no matter how complex, instantly reflect changes to inputs (live and historical data). | 29 | 29 | - **Current context for every action.** When input data changes, agents instantly know what changed in the views they listen to or query. | 30 | 30 |
| | 31 | +**Build it:** connect your sources, let the agent create views with [`fda create`](/interface/cli), and have it read them with [`fda exec`](/sql/ad-hoc) or subscribe to their changes over [HTTP](/connectors/sinks/http). See [How to build a use case](/use_cases/how-to-build). | | 32 | + | 31 | 33 | <UseCaseGrid items={[ | 32 | 34 | { | 33 | 35 | kind: 'Demo', | @@ -63,11 +65,13 @@ An agent is only as good as its context. With Feldera, that context is a set of | 63 | 65 |
| 64 | 66 | ## Agent security | 65 | 67 |
| 66 | | -Agents act for users, so each action needs a permission check. Fine-grained authorization models express permissions as a graph of users, agents, groups and resources. Feldera evaluates these graphs with [recursive SQL](/sql/recursion), and updates the results incrementally when a permission or a resource changes. [Auth0 FGA](https://www.feldera.com/blog/auth0-and-feldera-incrementally-computing-7-billion-permission-checks), part of Okta, uses Feldera to precompute billions of permission checks for AI agents and search. | | 68 | +Agents act for users, so each action needs a permission check. Fine-grained authorization is a graph problem: permissions are a graph of users, agents, groups and resources, and a check asks whether a path connects a user to a resource. Feldera evaluates these graphs with [recursive SQL](/sql/recursion), and updates the results incrementally when a permission or a resource changes. The same pattern works for any graph: reachability, hierarchies and transitive closure. [Auth0 FGA](https://www.feldera.com/blog/auth0-and-feldera-incrementally-computing-7-billion-permission-checks), part of Okta, uses Feldera to precompute billions of permission checks for AI agents and search. | 67 | 69 |
| 68 | 70 | - **Permission checks for every user and agent.** Feldera computes the access rights across deeply nested access graphs, so a check reads a precomputed answer. | 69 | 71 | - **Current after each change.** When a permission changes, Feldera updates only the access rights that the change affects. | 70 | 72 |
| | 73 | +**Build it:** load users, groups, objects and relationship tuples from [PostgreSQL CDC](/connectors/sources/postgresql-cdc) or [Kafka](/connectors/sources/kafka). Resolve permissions with [recursive views](/sql/recursion), and write the results to [Redis](/connectors/sinks/redis) or [PostgreSQL](/connectors/sinks/postgresql) for fast lookups. Start from the [static FGA](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/09-fine-grained-authorization.sql) or [dynamic FGA](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/10-dynamic-fga.sql) example SQL. | | 74 | + | 71 | 75 | <UseCaseGrid items={[ | 72 | 76 | { | 73 | 77 | kind: 'Customer story', | |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/use_cases/fraud-detection.mdx +4Lines changed: 4 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,6 +25,10 @@ A fraud model is only as good as its features. With Feldera, you write the featu | 25 | 25 | - **Exact features for each transaction.** Joins and [rolling aggregates](/tutorials/time-series) are updated incrementally, so each feature vector is correct when the transaction arrives. | 26 | 26 | - **Models in the loop.** A model can [read its inputs from a view and write its scores to a table](/use_cases/model_scoring/), so the pipeline measures its accuracy while it runs. | 27 | 27 |
| | 28 | +## Build it | | 29 | + | | 30 | +Load transactions from [Kafka](/connectors/sources/kafka) and history from [Delta Lake](/connectors/sources/delta). Write the features as views with joins and rolling aggregates. Read feature vectors with an [HTTP change stream](/connectors/sinks/http) or write them to a feature store. Start from the [fraud detection](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/02-fraud-detection.sql) or [feature engineering](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/05-feature-engineering.sql) example SQL. The steps are in [How to build a use case](/use_cases/how-to-build). | | 31 | + | 28 | 32 | ## Guides and demos | 29 | 33 |
| 30 | 34 | <UseCaseGrid items={[ | |
Collapse file Copy file name to clipboard +115Lines changed: 115 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +--- | | 2 | +title: How to build a use case | | 3 | +description: Every Feldera use case has the same shape. Connect sources to SQL tables, write the logic as SQL views, and send the results out. Steps, example SQL and starting points for each use case. | | 4 | +--- | | 5 | + | | 6 | +import {FlowDiagram} from '@site/src/components/UseCases'; | | 7 | + | | 8 | +# How to build a use case | | 9 | + | | 10 | +Every Feldera use case has the same shape. Input connectors feed changes into SQL tables. SQL views compute the answers, and Feldera keeps them current on every change. Output connectors, queries or a change stream deliver the results. To build your use case, start from the [example](#pick-a-starting-point) closest to it, then change the sources, the views and the outputs. | | 11 | + | | 12 | +<FlowDiagram | | 13 | + nodes={[ | | 14 | + {label: 'Sources', sub: 'Lakehouse, Kafka, CDC'}, | | 15 | + {label: 'SQL tables and views', sub: 'one Feldera pipeline'}, | | 16 | + {label: 'Results', sub: 'sinks, queries, change stream'}, | | 17 | + ]} | | 18 | + edges={['changes', 'changes']} | | 19 | +/> | | 20 | + | | 21 | +## Steps | | 22 | + | | 23 | +### 1. Run Feldera | | 24 | + | | 25 | +Run Feldera locally with [Docker](/get-started/docker), or use the [online sandbox](/get-started/sandbox). Install the [`fda` CLI](/interface/cli) to manage pipelines from a terminal, a script or an agent. | | 26 | + | | 27 | +### 2. Declare tables and connect sources | | 28 | + | | 29 | +A table declares the shape of an input. Its `connectors` property says where the data comes from. This table loads a Delta Lake table, then follows new versions of it: | | 30 | + | | 31 | +```sql | | 32 | +CREATE TABLE orders ( | | 33 | + order_id BIGINT NOT NULL PRIMARY KEY, | | 34 | + customer_id BIGINT, | | 35 | + status VARCHAR, | | 36 | + total DECIMAL(12, 2) | | 37 | +) WITH ('connectors' = '[{ | | 38 | + "transport": { | | 39 | + "name": "delta_table_input", | | 40 | + "config": {"uri": "s3://lake/orders", "mode": "snapshot_and_follow"} | | 41 | + } | | 42 | +}]'); | | 43 | +``` | | 44 | + | | 45 | +See all [input connectors](/connectors/sources/): Delta Lake, Iceberg, Kafka, PostgreSQL CDC, Debezium, S3, HTTP and more. | | 46 | + | | 47 | +### 3. Write the logic as views | | 48 | + | | 49 | +Write the answers you need as SQL views. Views can use [full SQL](/sql), build on each other, and be [recursive](/sql/recursion). Declare a view `MATERIALIZED` to [query it](/sql/ad-hoc) at any time: | | 50 | + | | 51 | +```sql | | 52 | +CREATE MATERIALIZED VIEW revenue_by_status AS | | 53 | +SELECT status, COUNT(*) AS orders, SUM(total) AS revenue | | 54 | +FROM orders | | 55 | +GROUP BY status; | | 56 | +``` | | 57 | + | | 58 | +### 4. Send results out | | 59 | + | | 60 | +Attach [output connectors](/connectors/sinks/) to a view to write its changes to Kafka, Delta Lake, PostgreSQL, Redis and other destinations: | | 61 | + | | 62 | +```sql | | 63 | +CREATE VIEW large_orders | | 64 | +WITH ('connectors' = '[{ | | 65 | + "transport": { | | 66 | + "name": "kafka_output", | | 67 | + "config": {"bootstrap.servers": "broker:9092", "topic": "large-orders"} | | 68 | + }, | | 69 | + "format": {"name": "json"} | | 70 | +}]') | | 71 | +AS SELECT * FROM orders WHERE total > 10000; | | 72 | +``` | | 73 | + | | 74 | +### 5. Deploy and start | | 75 | + | | 76 | +```bash | | 77 | +fda create my-pipeline program.sql | | 78 | +fda start my-pipeline | | 79 | +``` | | 80 | + | | 81 | +You can also use the [web console](/interface/web-console), the [Python SDK](pathname:///python/) or the [REST API](/api) ([OpenAPI spec](pathname:///openapi.json)). | | 82 | + | | 83 | +### 6. Read the results | | 84 | + | | 85 | +Query a materialized view: | | 86 | + | | 87 | +```bash | | 88 | +fda exec my-pipeline "SELECT * FROM revenue_by_status" | | 89 | +``` | | 90 | + | | 91 | +Or subscribe to a view's changes over [HTTP](/connectors/sinks/http). With `send_snapshot=true`, you get the current contents first, then every change: | | 92 | + | | 93 | +```bash | | 94 | +curl -X POST 'http://localhost:8080/v0/pipelines/my-pipeline/egress/revenue_by_status?format=json&send_snapshot=true' | | 95 | +``` | | 96 | + | | 97 | +## Pick a starting point | | 98 | + | | 99 | +Each example below is a complete pipeline. Copy its SQL, then change the connectors and the views. | | 100 | + | | 101 | +| Use case | Sources | Views | Results | Start from | | | 102 | +|---|---|---|---|---| | | 103 | +| [Agent context](/use_cases/agents#instantly-fresh-context) | Any mix of historical and live data | Views that the agent defines and deploys with `fda` | Ad-hoc queries, HTTP change stream | [Agentic fraud detection](https://github.com/feldera/feldera-demos/tree/main/agentic-fraud-detection) | | | 104 | +| [Fine-grained authorization](/use_cases/agents#agent-security) (a graph use case) | Users, groups, objects and relationship tuples from PostgreSQL CDC or Kafka | Recursive views that resolve nested permissions | Redis, PostgreSQL or Kafka for fast lookups | [Static FGA](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/09-fine-grained-authorization.sql), [dynamic FGA](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/10-dynamic-fga.sql), [FGA guide](/use_cases/fine_grained_authorization/intro) | | | 105 | +| Other graphs: reachability, hierarchies, transitive closure | Node and edge tables from any source | [Recursive views](/sql/recursion) | Any output | The FGA examples, [recursive queries](/sql/recursion) | | | 106 | +| [Real-time medallion](/use_cases/real-time-pipelines) | Bronze Delta Lake or Iceberg tables | Silver and gold views | Delta Lake | [Medallion SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/01-medallion-architecture.sql), [guide](/use_cases/medallion_architecture/part1) | | | 107 | +| [Lakehouse batch jobs](/use_cases/real-time-pipelines) | The batch job's Delta Lake, Iceberg or S3 tables | The job's SQL as views | Back to the lakehouse | [Batch analytics SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/00-accelerating-batch-analytics.sql), [guide](/use_cases/batch/intro) | | | 108 | +| [Streaming and CDC](/use_cases/real-time-pipelines) | Kafka, Debezium, PostgreSQL CDC | Views of any complexity | Kafka, PostgreSQL, Redis, HTTP | [Debezium PostgreSQL](https://github.com/feldera/feldera-demos/tree/main/debezium-postgres), [Debezium MySQL](https://github.com/feldera/feldera-demos/tree/main/debezium-mysql) | | | 109 | +| [Fraud detection](/use_cases/fraud-detection) | Transactions and reference data from Kafka and Delta Lake | Rolling-window features | A model, or a feature store | [Fraud SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/02-fraud-detection.sql), [feature engineering SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/05-feature-engineering.sql), [guide](/use_cases/fraud_detection/) | | | 110 | + | | 111 | +More complete pipelines: [example SQL programs](https://github.com/feldera/feldera/tree/main/crates/pipeline-manager/demos/sql) and [runnable demos](https://github.com/feldera/feldera-demos). | | 112 | + | | 113 | +## Coming from Spark SQL | | 114 | + | | 115 | +The `felderize` skill in [Feldera Agent Skills](https://github.com/feldera/feldera-skills) translates Spark SQL to Feldera SQL. The [batch jobs guide](/use_cases/batch/intro) shows a full conversion. |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/use_cases/real-time-pipelines.mdx +12Lines changed: 12 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -25,6 +25,18 @@ A batch job computes all of its results again on each run, so the results are ol | 25 | 25 | - **History and live data in one pipeline.** Load a snapshot from [Delta Lake](/connectors/sources/delta) or [Iceberg](/connectors/sources/iceberg), then continue on changes from [Kafka](/connectors/sources/kafka), [Debezium](/connectors/sources/debezium) or [PostgreSQL CDC](/connectors/sources/postgresql-cdc). | 26 | 26 | - **Correct results.** Each view always equals the result of its query on all of the input. With [fault tolerance](/pipelines/fault-tolerance-overview), a pipeline continues from where it stopped after a crash. | 27 | 27 |
| | 28 | +## Build it | | 29 | + | | 30 | +The steps are in [How to build a use case](/use_cases/how-to-build). The usual shapes: | | 31 | + | | 32 | +| Shape | Sources | Results | Start from | | | 33 | +|---|---|---|---| | | 34 | +| Real-time medallion | Bronze [Delta Lake](/connectors/sources/delta) or [Iceberg](/connectors/sources/iceberg) tables in `snapshot_and_follow` mode | Silver and gold views, written to [Delta Lake](/connectors/sinks/delta) | [Medallion SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/01-medallion-architecture.sql) | | | 35 | +| Lakehouse batch job | The job's lakehouse or [S3](/connectors/sources/s3) tables | The job's SQL as views, written back to the lakehouse | [Batch analytics SQL](https://github.com/feldera/feldera/blob/main/crates/pipeline-manager/demos/sql/00-accelerating-batch-analytics.sql) | | | 36 | +| Streaming and CDC | [Kafka](/connectors/sources/kafka), [Debezium](/connectors/sources/debezium), [PostgreSQL CDC](/connectors/sources/postgresql-cdc) | [Kafka](/connectors/sinks/kafka), [PostgreSQL](/connectors/sinks/postgresql), [Redis](/connectors/sinks/redis) | The Debezium demos below | | | 37 | + | | 38 | +To port Spark SQL, use the `felderize` skill in [Feldera Agent Skills](https://github.com/feldera/feldera-skills). | | 39 | + | 28 | 40 | ## Guides and demos | 29 | 41 |
| 30 | 42 | <UseCaseGrid items={[ | |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docs/what-is-feldera.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -14,7 +14,7 @@ Our approach to incremental computation makes Feldera incredibly fast (millions | 14 | 14 |
| 15 | 15 | ## Explore by use case | 16 | 16 |
| 17 | | -Guides and runnable demos for what you want to build. See all [guides](/tutorials/), or learn the product step by step in [Feldera Basics](/tutorials/basics/). | | 17 | +Guides and runnable demos for what you want to build. [How to build a use case](/use_cases/how-to-build) gives the steps and a starting point for each. See all [guides](/tutorials/), or learn the product step by step in [Feldera Basics](/tutorials/basics/). | 18 | 18 |
| 19 | 19 | <HubGrid /> | 20 | 20 |
| |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/docusaurus.config.ts +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -51,7 +51,7 @@ const felderaCodeTheme: PrismTheme = { | 51 | 51 |
| 52 | 52 | const config: Config = { | 53 | 53 | title: "Feldera Documentation", | 54 | | - tagline: "Powerup your Data Lake with Incremental View Maintenance", | | 54 | + tagline: "Keep arbitrarily complex SQL queries instantly fresh over changing data.", | 55 | 55 | // The favicon links are in headTags below, so they are in the HTML on every page, like feldera.com. | 56 | 56 |
| 57 | 57 | // Set the production url of your site here | @@ -108,6 +108,7 @@ const config: Config = { | 108 | 108 |
| 109 | 109 | clientModules: [ | 110 | 110 | require.resolve("./src/clientModules/detect-os.ts"), | | 111 | + require.resolve("./src/clientModules/api-child-attributes.ts"), | 111 | 112 | // Brand fonts, self-hosted: DM Sans for text, Geist Mono for labels and code. | 112 | 113 | require.resolve("@fontsource-variable/dm-sans/wght.css"), | 113 | 114 | require.resolve("@fontsource-variable/geist-mono/wght.css"), | |
Collapse file Copy file name to clipboardExpand all lines: docs.feldera.com/package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | "scripts": { | 6 | 6 | "docusaurus": "docusaurus", | 7 | 7 | "start": "docusaurus start --host 0.0.0.0 --no-open", | 8 | | - "build": "mkdir -p openapi && cp ../openapi.json ./openapi/openapi.json && docusaurus build", | | 8 | + "build": "mkdir -p openapi && cp ../openapi.json ./openapi/openapi.json && cp ../openapi.json ./static/openapi.json && docusaurus build", | 9 | 9 | "swizzle": "docusaurus swizzle", | 10 | 10 | "deploy": "docusaurus deploy", | 11 | 11 | "clear": "docusaurus clear", | |
|