Unparseable Number in Google Analytics Talend Pull

95 Views Asked by At

I'm using the tGoogleAnalyticsInput component to extract some basic Google Analytics dimensions and metrics and write them to a sql database.

However, I keep getting a java error when it tries to pull the source "(direct)" it flags it as an unparseable number. Everywhere in my ETL I have the source set as a string, so I'm not sure what's tripping it up. Attached are some relevant screenshots:

tGoogleAnalyticsInput component setup: tGoogleAnalyticsInput component setup

Schema with everything but sessions as a string: Schema with everything but sessions as a string

And here is the specific language of the error:

Exception in component tGoogleAnalyticsInput_1
java.lang.Exception: Convert field: row1.gasessions value=[(direct)] countLines=1 failed:Unparseable number: "(direct)"

Ideally it should output the dimensions and metrics to the table for a single day specified by the context.

1

There are 1 best solutions below

0
On

The schema you defined seems to be wrong. According to this tutorial the schema in their case looks like:

  • source (String)
  • medium (String)
  • date (Date)
  • visits (String)
  • continent (String)

Your first column is Sessions (Integer). Since a number conversion error is thrown I suppose this is the culprit. Try changing the type to String.

Also I am not sure if the Metrics entries come first in the response or last. You might want to change all data types to String to be able to consume the data and analyze it and later change data types accordingly.