You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BigQuery output plugin is an _experimental_ plugin that allows you to stream records into [Google Cloud BigQuery](https://cloud.google.com/bigquery/) service. The implementation does not support the following, which would be expected in a full production version:
3
+
The _BigQuery_ output plugin is an experimental plugin that lets you stream records
4
+
into the [Google Cloud BigQuery](https://cloud.google.com/bigquery/) service.
-[Data deduplication](https://cloud.google.com/bigquery/streaming-data-into-bigquery) using `insertId`.
10
+
-[Template tables](https://cloud.google.com/bigquery/streaming-data-into-bigquery) using `templateSuffix`.
10
11
11
-
Fluent Bit streams data into an existing BigQuery table using a service account that you specify. Therefore, before using the BigQuery output plugin, you must create a service account, create a BigQuery dataset and table, authorize the service account to write to the table, and provide the service account credentials to Fluent Bit.
12
+
## Google Cloud configuration
12
13
13
-
### Creating a Service Account
14
+
Fluent Bit streams data into an existing BigQuery table using a service account that you specify. Before using the BigQuery output plugin, you must:
14
15
15
-
To stream data into BigQuery, the first step is to create a Google Cloud service account for Fluent Bit:
16
+
1. To stream data into BigQuery, you must create a [Google Cloud service account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) for Fluent Bit.
17
+
1. Create a BigQuery dataset.
18
+
Fluent Bit doesn't create datasets for your data, so you must [create the dataset]((https://cloud.google.com/bigquery/docs/datasets)) ahead of time. You must also grant the service account `WRITER` permission on the dataset.
16
19
17
-
*[Creating a Google Cloud Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
20
+
Within the dataset you must create a table for the data to reside in. Use the following instructions for creating your table. Pay close attention to the schema, as it must match the schema of your output JSON. Unfortunately, because BigQuery doesn't allow dots in field names, you must use a filter to change the fields for many of the standard inputs (for example, `mem` or `cpu`).
21
+
1.[Create a BigQuery table](https://cloud.google.com/bigquery/docs/tables).
22
+
1. Fluent Bit BigQuery output plugin uses a JSON credentials file for authentication credentials. [Authorize the service account](https://cloud.google.com/iam/docs/creating-managing-service-account-keys) to write to the table.
23
+
1. Provide the service account credentials to Fluent Bit.
24
+
With [workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), you can grant on-premises or multi-cloud workloads access to Google Cloud resources, without using a service account key. It can be used as a more secure alternative to service account credentials. Google Cloud's workload identity federation supports several identity providers (see documentation) but Fluent Bit BigQuery plugin currently supports Amazon Web Services (AWS) only.
18
25
19
-
### Creating a BigQuery Dataset and Table
26
+
You must configure workload identity federation in GCP before using it with Fluent Bit.
20
27
21
-
Fluent Bit does not create datasets or tables for your data, so you must create these ahead of time. You must also grant the service account `WRITER` permission on the dataset:
-[Obtaining short-lived credentials with identity federation](https://cloud.google.com/iam/docs/using-workload-identity-federation)
22
30
23
-
*[Creating and using datasets](https://cloud.google.com/bigquery/docs/datasets)
31
+
## Configurations parameters
24
32
25
-
Within the dataset you will need to create a table for the data to reside in. You can follow the following instructions for creating your table. Pay close attention to the schema. It must match the schema of your output JSON. Unfortunately, since BigQuery does not allow dots in field names, you will need to use a filter to change the fields for many of the standard inputs \(e.g, mem or cpu\).
26
-
27
-
*[Creating and using tables](https://cloud.google.com/bigquery/docs/tables)
28
-
29
-
### Retrieving Service Account Credentials
30
-
31
-
Fluent Bit BigQuery output plugin uses a JSON credentials file for authentication credentials. Download the credentials file by following these instructions:
32
-
33
-
*[Creating and Managing Service Account Keys](https://cloud.google.com/iam/docs/creating-managing-service-account-keys)
34
-
35
-
### Workload Identity Federation
36
-
37
-
Using identity federation, you can grant on-premises or multi-cloud workloads access to Google Cloud resources, without using a service account key. It can be used as a more secure alternative to service account credentials. Google Cloud's workload identity federation supports several identity providers (see documentation) but Fluent Bit BigQuery plugin currently supports Amazon Web Services (AWS) only.
*[Obtaining short-lived credentials with identity federation](https://cloud.google.com/iam/docs/using-workload-identity-federation)
45
-
46
-
## Configurations Parameters
47
-
48
-
| Key | Description | default |
33
+
| Key | Description | Default |
49
34
| :--- | :--- | :--- |
50
-
|google\_service\_credentials| Absolute path to a Google Cloud credentials JSON file. | Value of the environment variable _$GOOGLE\_SERVICE\_CREDENTIALS_|
51
-
|project\_id| The project id containing the BigQuery dataset to stream into. |The value of the `project_id` in the credentials file |
52
-
|dataset\_id| The dataset id of the BigQuery dataset to write into. This dataset must exist in your project. ||
53
-
|table\_id| The table id of the BigQuery table to write into. This table must exist in the specified dataset and the schema must match the output. ||
54
-
|skip\_invalid\_rows| Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist. | Off |
55
-
|ignore\_unknown\_values| Accept rows that contain values that do not match the schema. The unknown values are ignored. Default is false, which treats unknown values as errors. | Off |
56
-
|enable\_workload\_identity\_federation| Enables workload identity federation as an alternative authentication method. Cannot be used with service account credentials file or environment variable. AWS is the only identity provider currently supported. | Off |
57
-
|aws\_region| Used to construct a regional endpoint for AWS STS to verify AWS credentials obtained by Fluent Bit. Regional endpoints are recommended by AWS. ||
58
-
|project\_number| GCP project number where the identity provider was created. Used to construct the full resource name of the identity provider. ||
59
-
|pool\_id| GCP workload identity pool where the identity provider was created. Used to construct the full resource name of the identity provider. ||
60
-
|provider\_id| GCP workload identity provider. Used to construct the full resource name of the identity provider. Currently only AWS accounts are supported. ||
61
-
|google\_service\_account|Email address of the Google service account to impersonate. The workload identity provider must have permissions to impersonate this service account, and the service account must have permissions to access Google BigQuery resources (e.g.`write` access to tables) ||
62
-
| workers | The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`0`|
35
+
|`google_service_credentials`| Absolute path to a Google Cloud credentials JSON file. | Value of the environment variable `$GOOGLE_SERVICE_CREDENTIALS`.|
36
+
|`project_id`| The project id containing the BigQuery dataset to stream into. |Value of the `project_id` in the credentials file.|
37
+
|`dataset_id`| The dataset id of the BigQuery dataset to write into. This dataset must exist in your project. |_none_|
38
+
|`table_id`| The table id of the BigQuery table to write into. This table must exist in the specified dataset and the schema must match the output. |_none_|
39
+
|`skip_invalid_rows`| Insert all valid rows of a request, even if invalid rows exist. The default value is false, which causes the entire request to fail if any invalid rows exist. |`Off`|
40
+
|`ignore_unknown_values`| Accept rows that contain values that don't match the schema. The unknown values are ignored. Default is `Off`, which treats unknown values as errors. |`Off`|
41
+
|`enable_workload_identity_federation`| Enables workload identity federation as an alternative authentication method. Can't be used with service account credentials file or environment variable. AWS is the only identity provider currently supported. |`Off`|
42
+
|`aws_region`| Used to construct a regional endpoint for AWS STS to verify AWS credentials obtained by Fluent Bit. Regional endpoints are recommended by AWS. |_none_|
43
+
|`project_number`| GCP project number where the identity provider was created. Used to construct the full resource name of the identity provider. |_none_|
44
+
|`pool_id`| GCP workload identity pool where the identity provider was created. Used to construct the full resource name of the identity provider. |_none_|
45
+
|`provider_id`| GCP workload identity provider. Used to construct the full resource name of the identity provider. Currently only AWS accounts are supported. |_none_|
46
+
|`google_service_account`|The email address of the Google service account to impersonate. The workload identity provider must have permissions to impersonate this service account, and the service account must have permissions to access Google BigQuery resources ( `write` access to tables) |_none_|
47
+
|`workers`| The number of [workers](../../administration/multithreading.md#outputs) to perform flush operations for this output. |`0`|
63
48
64
49
See Google's [official documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll) for further details.
65
50
66
-
## Configuration File
51
+
## Configuration file
67
52
68
-
If you are using a _Google Cloud Credentials File_, the following configuration is enough to get you started:
53
+
If you are using a Google Cloud credentials file, the following configuration will get you started:
0 commit comments