Hi Team! I’m getting this error on Schedule Data L...
# gd-beginners
Hi Team! I’m getting this error on Schedule Data Load from Gooddata Dashboard after BigQuery Connection is made (visible as a datasource in the UI): Failed to load model mapping. Reason: “*Invalid BigQuery private key: Invalid PKCS#8 data.*” What does this mean?
Copy code
2023-08-22T17:51:28.956+0200 [INFO]: Data distribution worker started
2023-08-22T17:51:28.956+0200 [INFO]: Request id: "data_load_XXX"
2023-08-22T17:51:28.956+0200 [INFO]: Data source: "XXX"
2023-08-22T17:51:28.956+0200 [INFO]: Additional parameters: {GDC_DE_SYNCHRONIZE_ALL=true, PROCESS_ID=XXX}
2023-08-22T17:51:28.956+0200 [INFO]: Synchronization mode: all mapped datasets (default)
2023-08-22T17:51:31.060+0200 [ERROR]: Data distribution worker failed. Reason: Invalid BigQuery private key:
    Invalid PKCS#8 data. error_id=13458882-0cab-4267-a48b-8e3e6c714932 error_code=msf.cloudresource.dataload.model.mapping.task.error
full error log
Hi Ramsha, it looks like the Service Account Key for BigQuery may not have been configured correctly, or maybe it wasn’t input properly in GoodData. Please take a look at the article GoodData-BigQuery Integration Details for some additional info; I would also suggest checking out the instructions provided by Google in their article Create and delete service account keys. Take a look and let us know how it goes!
Hey @Francisco Antunes i cant find much on these docs on what is the correct key format - can u tell me what i need to change to this?
Copy code
# Create a key for the above service account.
resource "google_service_account_key" "sa-gooddata-key" {
  service_account_id = google_service_account.sa-gooddata-user.name
  key_algorithm      = "KEY_ALG_RSA_2048"
  private_key_type   = "TYPE_GOOGLE_CREDENTIALS_FILE"
the key is generated in code with user and assigned all necessary roles - but i think its not in the PKCS#8 format (whats the correct key_algorithm and key type for that?)
I see you are using the REST method of the Google article; have you proceeded to the step of decoding the private key and saving it to a JSON? That should provide you with the full private key (starting with
on the .json), which is what you input on GoodData when connecting to the Data Source. In the past, I performed this part using the Google Cloud console itself, as described in the Console tab of the tutorial (see my screenshot).