Skip to content

Commit c5f1808

Browse files
authored
Merge pull request #1921 from fluent/lynettemiles/sc-136230/update-fluent-bit-docs-pipeline-outputs-bigquery
2 parents 34080a0 + 0d8fe00 commit c5f1808

File tree

3 files changed

+40
-53
lines changed

3 files changed

+40
-53
lines changed

pipeline/outputs/bigquery.md

Lines changed: 38 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,56 @@
11
# Google Cloud BigQuery
22

3-
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.
45

5-
* [Application Default Credentials](https://cloud.google.com/docs/authentication/production).
6-
* [Data deduplication](https://cloud.google.com/bigquery/streaming-data-into-bigquery) using `insertId`.
7-
* [Template tables](https://cloud.google.com/bigquery/streaming-data-into-bigquery) using `templateSuffix`.
6+
The implementation doesn't support the following, which would be expected in a full production version:
87

9-
## Google Cloud Configuration
8+
- [Application Default Credentials](https://cloud.google.com/docs/authentication/production).
9+
- [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`.
1011

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
1213

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:
1415

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.
1619

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.
1825

19-
### Creating a BigQuery Dataset and Table
26+
You must configure workload identity federation in GCP before using it with Fluent Bit.
2027

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:
28+
- [Configuring workload identity federation](https://cloud.google.com/iam/docs/configuring-workload-identity-federation#aws)
29+
- [Obtaining short-lived credentials with identity federation](https://cloud.google.com/iam/docs/using-workload-identity-federation)
2230

23-
* [Creating and using datasets](https://cloud.google.com/bigquery/docs/datasets)
31+
## Configurations parameters
2432

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.
38-
39-
* [Workload Identity Federation overview](https://cloud.google.com/iam/docs/workload-identity-federation)
40-
41-
You must configure workload identity federation in GCP before using it with Fluent Bit.
42-
43-
* [Configuring workload identity federation](https://cloud.google.com/iam/docs/configuring-workload-identity-federation#aws)
44-
* [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 |
4934
| :--- | :--- | :--- |
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` |
6348

6449
See Google's [official documentation](https://cloud.google.com/bigquery/docs/reference/rest/v2/tabledata/insertAll) for further details.
6550

66-
## Configuration File
51+
## Configuration file
6752

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:
6954

7055
{% tabs %}
7156
{% tab title="fluent-bit.yaml" %}
@@ -75,7 +60,7 @@ pipeline:
7560
inputs:
7661
- name: dummy
7762
tag: dummy
78-
63+
7964
outputs:
8065
- name: bigquery
8166
match: '*'
@@ -99,4 +84,4 @@ pipeline:
9984
```
10085

10186
{% endtab %}
102-
{% endtabs %}
87+
{% endtabs %}

vale-styles/FluentBit/Headings.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ exceptions:
3636
- GitHub
3737
- Google
3838
- Google Cloud
39+
- Google Cloud BigQuery
3940
- Google Cloud Platform
4041
- Grafana
4142
- gRPC

vale-styles/FluentBit/Spelling-exceptions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ datapoints
4242
Datastream
4343
declaratively
4444
deduplicate
45+
deduplication
4546
Deployer
4647
deprovision
4748
deprovisioned

0 commit comments

Comments
 (0)