influxdata / influxdata/telegraf

Variable schema for postgressql output plugin

Open
#16,747 1 comment 0 reactions 0 assignees View on GitHub
feature request help wanted size/s
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

### Use Case

I have a PostgresSQL DB with several schemas. schemaA, schemaB, etc., in which I feed data from sensors through the mqtt_consumer plugin.

After a bit of processing, the measurement names look like
"correspondingSchema_sensorName"

### Expected behavior

I would like to be able to set the schema-name from a tag, which I would drop afterwards.

### Actual behavior

Right now I have to define several outputs, one for each schema:

```
[[outputs.postgresql]]
namepass = ["schemaA_*"]
schema = "schemaA"

[[outputs.postgresql]]
namepass = ["schemaB_*"]
schema = "schemaB"
```

### Additional info

_No response_

Contributor guide

Open the contributing guide

Research direction

Start at the outputs.postgresql plugin configuration and schema handling, then inspect how tags from mqtt_consumer are represented and can be removed. Define how a tag-selected schema should work for each measurement and verify the behavior with the plugin's existing tests or configuration checks; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.