Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs.feldera.com/docs/connectors/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ from an HTTP URL, and a `VENDOR_VIEW` which sends the changes of the view
to a Kafka topic in a format that can be consumed by Debezium:

```sql
create table VENDOR (
id bigint not null primary key,
name varchar,
address varchar
CREATE TABLE vendor (
id BIGINT NOT NULL PRIMARY KEY,
name VARCHAR,
address VARCHAR
) WITH ('connectors' = '[{
"transport": {
"name": "url_input", "config": {"path": "https://feldera-basics-tutorial.s3.amazonaws.com/vendor.json"}
},
"format": { "name": "json" }
}]');

create view VENDOR_VIEW
CREATE VIEW vendor_view
WITH (
'connectors' = '[{
"max_queued_bytes": 1000000,
Expand All @@ -46,7 +46,7 @@ WITH (
}
}]'
)
as select * from VENDOR;
AS SELECT * FROM vendor;
```

:::info
Expand Down
8 changes: 4 additions & 4 deletions docs.feldera.com/docs/connectors/orchestration.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ The following snippet shows a modified version of this example where the
second connector is configured to start after the first connector completes:

```sql
create table PRICE (
part bigint not null,
vendor bigint not null,
price integer
CREATE TABLE price (
part BIGINT NOT NULL,
vendor BIGINT NOT NULL,
price INTEGER
) WITH ('connectors' = '[{
"labels": ["price.backfill"],
"transport": {
Expand Down
4 changes: 2 additions & 2 deletions docs.feldera.com/docs/connectors/sinks/confluent-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ Use the `kafka_output` transport with `avro` output format. Set the following Av
view are part of the primary key.

```sql
create view my_view
CREATE VIEW my_view
WITH (
'connectors' = '[{
"transport": {
Expand All @@ -152,7 +152,7 @@ WITH (
}
}]'
)
as select * from test_table;
AS SELECT * FROM test_table;
```

:::note
Expand Down
6 changes: 3 additions & 3 deletions docs.feldera.com/docs/connectors/sinks/delta.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ MERGE INTO {target_table} AS target
ROW_NUMBER() OVER (
PARTITION BY {merge_key}
ORDER BY __feldera_ts DESC
) as rn
) AS rn
FROM {source_table}
-- Only consider new updates since the last merge.
WHERE __feldera_ts >= (
Expand Down Expand Up @@ -133,7 +133,7 @@ Create a Delta Lake output connector that writes a stream of updates to a table
stored in an S3 bucket, truncating any existing contents of the table.

```sql
CREATE VIEW V
CREATE VIEW v
WITH (
'connectors' = '[{
"transport": {
Expand Down Expand Up @@ -166,7 +166,7 @@ triggers a fresh snapshot on the next start, and is delivered even if the
pipeline is started or resumed in `Paused` state.

```sql
CREATE MATERIALIZED VIEW V
CREATE MATERIALIZED VIEW v
WITH (
'connectors' = '[{
"name": "delta_sink",
Expand Down
2 changes: 1 addition & 1 deletion docs.feldera.com/docs/connectors/sinks/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ CREATE VIEW copy WITH (
"format": { "name": "csv" }
}]'
)
AS SELECT * FROM Stocks;
AS SELECT * FROM stocks;
```

6 changes: 3 additions & 3 deletions docs.feldera.com/docs/connectors/sinks/iceberg.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The Avro format must be configured with:
Example:

```sql
create materialized view pizzas with (
CREATE MATERIALIZED VIEW pizzas WITH (
'connectors' = '[
{
"index": "idx1",
Expand All @@ -58,8 +58,8 @@ create materialized view pizzas with (
}
}
]'
) as select * from tbl order by order_number desc limit 10;
create index idx1 on pizzas(order_number);
) AS SELECT * FROM tbl ORDER BY order_number DESC LIMIT 10;
CREATE INDEX idx1 ON pizzas(order_number);
```

:::important
Expand Down
6 changes: 3 additions & 3 deletions docs.feldera.com/docs/connectors/sinks/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ We will create a Kafka output connector named `total-sales`.
Kafka broker is located at `example.com:9092` and the topic is `total-sales`.

```sql
CREATE VIEW V
CREATE VIEW v
WITH (
'connectors' = '[
{
Expand Down Expand Up @@ -116,7 +116,7 @@ Other protocols and mechanisms aren't supported.

```sql

CREATE VIEW OUTPUT
CREATE VIEW output
WITH (
'connectors' = '[
{
Expand All @@ -139,7 +139,7 @@ WITH (
}
}
]'
) as select * from INPUT;
) AS SELECT * FROM input;
```

## Additional resources
Expand Down
32 changes: 16 additions & 16 deletions docs.feldera.com/docs/connectors/sinks/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ If `ssl_ca_pem` is not specified, the connection will default to **plaintext**.
Example:

```sql
create materialized view v1 with (
CREATE MATERIALIZED VIEW v1 WITH (
'connectors' = '[{
"index": "v1_idx",
"transport": {
Expand All @@ -102,8 +102,8 @@ create materialized view v1 with (
}
}
}]'
) as select * from t0;
create index v1_idx on v1(id);
) AS SELECT * FROM t0;
CREATE INDEX v1_idx ON v1(id);
```

## Data type mapping
Expand Down Expand Up @@ -157,7 +157,7 @@ connector.
```sql
-- Feldera SQL
-- Create a table and fill it with 5 randomly generated records.
create table t0 (id int, s varchar) with (
CREATE TABLE t0 (id INT, s VARCHAR) WITH (
'connectors' = '[{
"transport": {
"name": "datagen",
Expand All @@ -173,7 +173,7 @@ create table t0 (id int, s varchar) with (

-- Create a view that will contain a copy of all records in table `t0` and
-- attach a Postgres output connector to it.
create materialized view v1 with (
CREATE MATERIALIZED VIEW v1 WITH (
'connectors' = '[{
"index": "v1_idx",
"transport": {
Expand All @@ -184,11 +184,11 @@ create materialized view v1 with (
}
}
}]'
) as select * from t0;
) AS SELECT * FROM t0;

-- Index `v1` using `id` column as a key. The Postgres connector requires this
-- index to group updates by key.
create index v1_idx on v1(id);
CREATE INDEX v1_idx ON v1(id);
```

:::important
Expand Down Expand Up @@ -248,8 +248,8 @@ CREATE TABLE all_types_example (
}]'
);

create materialized view v1
with (
CREATE MATERIALIZED VIEW v1
WITH (
'connectors' = '[{
"index": "v1_idx",
"transport": {
Expand All @@ -261,8 +261,8 @@ with (
}
}]'
)
as select * from all_types_example;
create index v1_idx on v1(my_int2);
AS SELECT * FROM all_types_example;
CREATE INDEX v1_idx ON v1(my_int2);
```

Now we create the equivalent table in PostgreSQL.
Expand All @@ -277,8 +277,8 @@ CREATE TABLE all_types_example (
my_char_array CHAR[],
my_varchar VARCHAR(50),
my_varchar_array VARCHAR(50)[],
my_name NAME,
my_name_array NAME[],
my_name name,
my_name_array name[],
my_date DATE,
my_date_array DATE[],
my_time TIME,
Expand Down Expand Up @@ -310,11 +310,11 @@ that Feldera has written to it:

```sql
-- PostgreSQL
SELECT count(*) FROM all_types_example;
count
SELECT COUNT(*) FROM all_types_example;
COUNT
-------
5
(1 row)
(1 ROW)
```

### Outputting multi-dimensional arrays
Expand Down
6 changes: 3 additions & 3 deletions docs.feldera.com/docs/connectors/sinks/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ Consider a Feldera pipeline with table `t0` and view `v0` as defined
below.

```sql
create table t0 (c0 int, c1 int, c2 varchar);
CREATE TABLE t0 (c0 INT, c1 INT, c2 VARCHAR);

create materialized view v0 with (
CREATE MATERIALIZED VIEW v0 WITH (
'connectors' = '[
{
"transport": {
Expand All @@ -59,7 +59,7 @@ create materialized view v0 with (
}
}
]'
) as select * from t0;
) AS SELECT * FROM t0;
```

We populate this table with an ad-hoc query as follows:
Expand Down
12 changes: 6 additions & 6 deletions docs.feldera.com/docs/connectors/sources/datagen.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,11 @@ the `range` parameter.
* A table with no configuration generates incrementing values for all types:

```sql
CREATE TABLE Stocks (
CREATE TABLE stocks (
symbol VARCHAR NOT NULL,
price_time BIGINT NOT NULL, -- UNIX timestamp
price DECIMAL(38, 2) NOT NULL
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "datagen",
Expand All @@ -192,11 +192,11 @@ Will generate the following data:
* A table with a single plan that generates 5 rows with a rate of 1 row per second:

```sql
CREATE TABLE Stocks (
CREATE TABLE stocks (
symbol VARCHAR NOT NULL,
price_time BIGINT NOT NULL, -- UNIX timestamp
price DECIMAL(38, 2) NOT NULL
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "datagen",
Expand Down Expand Up @@ -235,7 +235,7 @@ Will generate the following data:
```sql
CREATE TABLE binary_tbl (
bin VARBINARY NOT NULL
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "datagen",
Expand Down Expand Up @@ -275,7 +275,7 @@ CREATE TABLE times (
dt DATE NOT NULL,
ts TIMESTAMP NOT NULL,
t TIME NOT NULL
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "datagen",
Expand Down
2 changes: 1 addition & 1 deletion docs.feldera.com/docs/connectors/sources/debezium.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ for decoding the messages as part of Avro format configuration.
CREATE TABLE my_table (
id INT NOT NULL PRIMARY KEY,
ts TIMESTAMP
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "kafka_input",
Expand Down
2 changes: 1 addition & 1 deletion docs.feldera.com/docs/connectors/sources/delta.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ the connector will fetch all records with timestamps from `2024-01-01`, then all

```sql
CREATE TABLE transaction(
trans_date_trans_time TIMESTAMP NOT NULL LATENESS INTERVAL 1 day,
trans_date_trans_time TIMESTAMP NOT NULL LATENESS INTERVAL 1 DAY,
cc_num BIGINT,
merchant STRING,
category STRING,
Expand Down
2 changes: 1 addition & 1 deletion docs.feldera.com/docs/connectors/sources/file.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following reads a file named `/tmp/input.txt`:
CREATE TABLE stocks (
symbol VARCHAR NOT NULL,
price DECIMAL(38, 2) NOT NULL
) with (
) WITH (
'connectors' = '[{
"transport": {
"name": "file_input",
Expand Down
Loading
Loading