user3013440
user3013440

Reputation: 108

DataStudio - Failed to retrieve data from the underlying data set

I made a custom connector (plugged to an API) in DataStudio, but when I tried to create a report I get this error Failed to retrieve data from the underlying data set..

My connector give to field in the asked order, not all the fields, only the ones requested, but I still have this error.

Is anyone can help me?

FIX

My return data struture wasn't good... Here is the good format :

{ schema: 
  [ { dataType: 'STRING',
      name: 'firstname',
      semantics: [Object],
      label: 'Firstname' },
   { dataType: 'NUMBER',
   name: 'id',
   semantics: [Object],
   label: 'Id' } ],
rows: 
 [ ['Bob',48526], ['Robert', 4994], ...] }

Upvotes: 1

Views: 3728

Answers (2)

8a9
8a9

Reputation: 545

Yes, in my case this error message was due to an incorrect datatype within my schema definition.

Upvotes: 0

Osvaldo Maria
Osvaldo Maria

Reputation: 361

According to this codelab, Your rows have to be in the following format:

[
    {
      values: [ 38949, '20170716']
    },
    {
      values: [ 165314, '20170717']
    },
    {
      values: [ 180124, '20170718']
    },
 ]

The number of values in each of the subarrays needs to match the number of columns in your schema.

Also note that the number of columns in your schema will have to change depending on the columns requested by data studio.

Upvotes: 1

Related Questions