From 1b7e8c90e9122ada8283a61d5266127bb768d72f Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Wed, 5 Jan 2022 08:18:28 -0700 Subject: [PATCH] chore: sql readme with more details on data types (#10378) Fixes: #9562 --- plugins/outputs/sql/README.md | 7 +++++++ plugins/outputs/sql/sql.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/plugins/outputs/sql/README.md b/plugins/outputs/sql/README.md index 7f8f5da72..45e4ff5c3 100644 --- a/plugins/outputs/sql/README.md +++ b/plugins/outputs/sql/README.md @@ -97,6 +97,13 @@ through the convert settings. # init_sql = "" ## Metric type to SQL type conversion + ## The values on the left are the data types Telegraf has and the values on + ## the right are the data types Telegraf will use when sending to a database. + ## + ## The database values used must be data types the destination database + ## understands. It is up to the user to ensure that the selected data type is + ## available in the database they are using. Refer to your database + ## documentation for what data types are available and supported. #[outputs.sql.convert] # integer = "INT" # real = "DOUBLE" diff --git a/plugins/outputs/sql/sql.go b/plugins/outputs/sql/sql.go index fecaf2f6e..e13c0c165 100644 --- a/plugins/outputs/sql/sql.go +++ b/plugins/outputs/sql/sql.go @@ -143,6 +143,13 @@ var sampleConfig = ` # init_sql = "" ## Metric type to SQL type conversion + ## The values on the left are the data types Telegraf has and the values on + ## the right are the data types Telegraf will use when sending to a database. + ## + ## The database values used must be data types the destination database + ## understands. It is up to the user to ensure that the selected data type is + ## available in the database they are using. Refer to your database + ## documentation for what data types are available and supported. #[outputs.sql.convert] # integer = "INT" # real = "DOUBLE"