Dataform CLI ignores impersonation
Rather than use the --credentials and provide JSON keys, I was looking to use service account impersonation. Executing as follows:
gcloud config set auth/impersonate_service_account <sa>
dataform run
gcloud config unset auth/impersonate_service_account
However the Dataform CLI ignores the impersonation and executes using your core account.
Could we get an option to specify an impersonation account as part of the run command?
A similar error was raised in google-api-nodejs-client. The issue was fixed in a subsequent release by this MR.
I went on a hunch that @google-cloud/bigquery might be using a much older version of google-api-nodejs-client which seems to be the case.
I have created an MR to update to a newer version of @google-cloud/bigquery (7.1.1) which still is in line with the minimum Node JS requirement (v16.16.0) of Dataform. This change seems to fix the issue from the testing I did.
Thanks @ashish10alex