Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Data Studio Community Connector error: The number of columns in the data does not match the number in the schema.

When I try to explore my data source fetched by a custom connector, I encounter a System error: 593d1fe0.

The number of columns received in the data returned from the community connector does not match the number of columns requested by Data Studio

But When I'm debugging my getData function, the result contains the same columns and same number of columns.

What can cause this kind of troubles ? some screenshots of the debug view:

the schema

the data (rows)

Is my output structure correct ? is there something to consider regarding column names ?

like image 208
Frédéric P. Avatar asked Aug 06 '18 10:08

Frédéric P.


People also ask

How do I refresh Google studio?

You can do this from within a report, or from the Data Sources home page. At the top, click Data freshness. Under "Check for fresh data," select a new refresh option, if available. Click SET DATA FRESHNESS.

What is Google Data Studio connectors?

Connectors connect Data Studio to your underlying data. Connecting to your data creates a data source in Data Studio. Data sources represent a particular instance of a connector: for example, a connection to a specific BigQuery table or query, a Google Analytics property, or a Google Sheet.


1 Answers

Data Studio does not request all the possible fields from getData function. Most of the times, Data Studio will request a small subset from available fields. The list of required fields will be passed in the request object when the getData call is made.

See getData reference doc to understand the structure of request and fields.

Your getData response should not return all available fields. Rather, the response should return only the requested fields. See example code showing how you can filter the fields.

For additional help, you can try the official codelab - Step 10 is relevant to your question. You can also view more examples at the official Data Studio Open Source repo.

like image 130
Minhaz Kazi Avatar answered Oct 22 '22 15:10

Minhaz Kazi