influxdata / influxdata/influxdb

influxdb format :: to make whole tag value as string

Open
#16,399 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

HI,
below is my data with influx format, but it is not executable by telegraf as there is some special character in sql_text field.

oracle_session_long_running,sql_id=cp4cdt8yb6bv1,sql_text=**SELECT_com_case_id_AS_complaint_id,_com_mobile_no_AS_telephone_no,QUT_TYPE_DESCRIPTION_AS_subject,_DECODE(esc_final_status,_'RESOLVED',_DECODE_((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_case_id_=_cte_case_id),'CLOSE',_'CLOSE',_'RESOLVED'),_NULL,_DECODE_((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_case_id_=cte_case_id),'CLOSE',_'CLOSE',_esc_out_status),_'CLOSE',_DECODE_((SELECT_com_case_status_FROM_cms_m_complaint_WHERE_com_case_id_=__cte_case_id),'CLOSE',_'CLOSE',_esc_out_status_),_esc_out_status_)_AS_eos,_cms_m_querysource_cms_source_AS_SOURCE,SUBSTR_(cms_m_complaint_com_case_id,_-2)_+_1_AS_iterations,_cms_m_casetype_cast_type_AS_case_type,to_char(com_com_date,'dd-mm-rrrr_hh24:mi:ss')_AS_LOG_TIME,to_char(nvl(esc_process_expiry_time,com_commit_time),'dd-mm-rrrr_hh24:mi:ss')_AS_expiry_time_FROM_CMS_M_COMPLAINT,cms_t_escalationlog,cms_m_querytype_WHERE_com_case_id_=_cte_case_id_AND__cms_m_complaint_com_case_id_IN_(SELECT_max(cms_m_complaint_com_case_id)_FROM__cms_**,machine=SLDC1PACSWEBAP04 last_call_et=3756

now my requirement is to make whole fleld value in sql_text key as a string. how to achieve this.
note: adding "\" before starting a special character can be used, but here in this case no special character is fixed. so the only solution left is to make whole line as a string.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue provides an Influx line-protocol sample for Telegraf with a long sql_text tag value, but names no repository files or tests. Reproduce the sample through Telegraf and inspect the Influx line-protocol parsing entry point to determine the supported representation for tag values; done should be a documented or implemented way to ingest this value without parse failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.