influxdb format :: to make whole tag value as string

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.

You don’t need to convert the value to sting, it’s already a string. Any tag value is saved as a string (and sql_text is a tag).
Anyway here is the reference to the Coverter Processor Plugin, with that you can change the datatype of fields.

You need to escape a set of characters in the tag value.
the following chars must be escaped: “,” | “=” | " " (space), the escape char is “\”.
Any double quote (") inside the tag value will be considered as part of the value itself.

I don’t know which is the current error but is probably related to the spaces in the sql_test value. Those spaces are breaking the value itself since space is a very important char in the influx line protocol, after the first space influx expects the filed values, and after the second space it expects the time (in unix format)