-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(compogen): use jsonref when generating the README (#99)
Because - The `compogen` tool didn't use `jsonref` to render the definition, some component readme cannot be generated. This commit - Uses `jsonref` when generating the README. - Renames `resource_specification` to `connection_specification`. - Removes the validation for an empty `connection_specification`. Note - We still do not support nested structures yet. --------- Co-authored-by: Juan Vallés <3977183+jvallesm@users.noreply.github.com> Co-authored-by: Juan Vallés <jvallesm@gmail.com>
- Loading branch information
1 parent
8ecbede
commit ff49157
Showing
41 changed files
with
1,407 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Compogen test | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'tools/compogen/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'tools/compogen/**' | ||
|
||
jobs: | ||
test-compogen: | ||
name: test-compogen | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Load .env file | ||
uses: cardinalby/export-env-action@v2 | ||
with: | ||
envFile: .env | ||
expand: true | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GOLANG_VERSION }} | ||
|
||
- name: Test compogen | ||
run: | | ||
cd tools/compogen | ||
go mod tidy | ||
go test -mod=mod -race -cover ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: "BigQuery" | ||
lang: "en-US" | ||
draft: false | ||
description: "Learn about how to set up a VDP BigQuery connector https://github.com/instill-ai/instill-core" | ||
--- | ||
|
||
The BigQuery component is a data connector that allows users to insert data to BigQuery tables. | ||
It can carry out the following tasks: | ||
|
||
- [Insert](#insert) | ||
|
||
## Release Stage | ||
|
||
`Alpha` | ||
|
||
## Configuration | ||
|
||
The component configuration is defined and maintained [here](https://github.com/instill-ai/component/blob/main/pkg/connector/bigquery/v0/config/definition.json). | ||
|
||
## Connection | ||
|
||
| Field | Field ID | Type | Note | | ||
| :--- | :--- | :--- | :--- | | ||
| JSON Key File contents (required) | `json_key` | string | Contents of the JSON key file with access to the bucket. | | ||
| BigQuery Project ID (required) | `project_id` | string | Fill in your BigQuery Project ID. | | ||
| BigQuery Dataset ID (required) | `dataset_id` | string | Fill in your BigQuery Dataset ID. | | ||
| BigQuery Table Name (required) | `table_name` | string | Fill in your BigQuery Table Name. | | ||
|
||
## Supported Tasks | ||
|
||
### Insert | ||
|
||
Insert data to BigQuery. | ||
|
||
| Input | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Task ID (required) | `task` | string | `TASK_INSERT` | | ||
| Data (required) | `data` | object | The data to be inserted to BigQuery | | ||
|
||
| Output | ID | Type | Description | | ||
| :--- | :--- | :--- | :--- | | ||
| Status | `status` | string | Status of the upload operation | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//go:generate compogen readme --connector ./config ./README.mdx | ||
package bigquery | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.