soda-core
soda-core copied to clipboard
Soda 914 extend bq authentication
With GCP/BigQuery one has the option to use different methods to authenticate. The standard authentication methods are:
- Use of Application Default Credentials
- Use of Application Default Credentials with Service Account impersonation
- Use of Service Account Key (already implemented)
- Use of Service Account Key with Service Account Impersonation
Usage in configuration.yml file:
- Use of Application Default Credentials
data_source <SOURCE-NAME>:
type: bigquery
connection:
use_context_auth: True
- Use of Application Default Credentials with Service Account impersonation
data_source <SOURCE-NAME>:
type: bigquery
connection:
use_context_auth: True
impersonation_account: <SA_EMAIL>
- Use of Service Account Key ...
- Use of Service Account Key with Service Account Impersonation
data_source my_database_name:
type: bigquery
connection:
account_info_json: '{
"type": "service_account",
"project_id": "...",
"private_key_id": "...",
...}'
impersonation_account: <SA_EMAIL>
SonarCloud Quality Gate failed.
1 Bug
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
Hi @m1n0,
Regarding the duplicate lines: This has been fixed with commit SODA-914: remove redundant lines. Dont know why it does not show up anymore either
hi @tooobsias, ah I see, I overlooked that one. Thank you!
@m1n0 Seems like I made it worse (and honestly dont know what I did to close the PR) I will reopen another Merge Request which addresses your suggestion regarding:
- Duplicate lines
- Selection of project_id/quota_project_id