Skip to content

SOQL columns containing float values are incorrectly converted to integers in New Relic events when the columns are in the numeric field mappings #74

@sdewitt-newrelic

Description

@sdewitt-newrelic

Description

When using a custom SOQL query to retrieve results, columns in SOQL results that are represented using a float value are incorrectly converted to integers if the columns are in the numeric field mappings when converting generated log entries to events when sending data to New Relic as events.

Steps to Reproduce

  1. Create a custom query that selects a column that is returned as a float value
  2. Add the column to the numeric field mappings
  3. Set configuration to generate events
  4. Execute the integration

Expected Behavior

The event attribute value corresponding to the float field in SOQL results for the custom query are float values.

Actual Behavior

The event attribute value corresponding to the float field in SOQL results for the custom query are integer values, not float values.

Additional context

This is due to the fact that we are assuming that the input value to maybe_convert_str_to_num is a string when we are converting columns to numeric values in pack_log_into_event in pipeline.yml. maybe_convert_str_to_num should probably check if the input value is a string and if not, return the value directly. Either that or the check should be prior to the call to maybe_convert_str_to_num in pack_log_into_event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acknowledgedThe issue has been seen by a Labs team memberbugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions