Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(samples): split query and table samples into separate files #384

Merged
merged 10 commits into from
Mar 15, 2019
116 changes: 108 additions & 8 deletions .cloud-repo-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,118 @@
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "tables",
"name": "Tables",
"file": "tables.js",
"id": "browse-rows",
"name": "Browse rows",
"file": "browseRows.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "copy-table",
"name": "Copy table",
"file": "copyTable.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "create-table",
"name": "Create table",
"file": "createTable.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "delete-table",
"name": "Delete table",
"file": "deleteTable.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "extract-table-to-GCS",
"name": "Extract table to GCS",
"file": "extractTableToGCS.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "insert-rows-as-stream",
"name": "Insert rows as stream",
"file": "insertRowsAsStream.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "list-tables",
"name": "List tables",
"file": "listTables.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-CSV-from-GCS",
"name": "Load CSV from GCS",
"file": "loadCSVFromGCS.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-CSV-from-GCS-autodetect",
"name": "Load CSV from GCS autodetect",
"file": "loadCSVFromGCSAutodetect.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-CSV-from-GCS-truncate",
"name": "Load CSV from GCS truncate",
"file": "loadCSVFromGCSTruncate.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-JSON-from-GCS",
"name": "Load JSON from GCS",
"file": "loadJSONFromGCS.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-JSON-from-GCS-autodetect",
"name": "Load JSON from GCS autodetect",
"file": "loadJSONFromGCSAutodetect.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-JSON-from-GCS-truncate",
"name": "Load JSON from GCS truncate",
"file": "loadJSONFromGCSTruncate.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-local-file",
"name": "Load local file",
"file": "loadLocalFile.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-ORC-from-GCS-truncate",
"name": "Load ORC from GCS truncate",
"file": "loadORCFromGCSTruncate.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "load-Parquet-from-GCS-truncate",
"name": "Load Parquet from GCS truncate",
"file": "loadParquetFromGCSTruncate.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/"
},
{
"id": "query",
"name": "Query",
"file": "query.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/",
},
{
"id": "query-disable-cache",
"name": "Query disable cache",
"file": "queryDisableCache.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/",
"usage": "node tables.js --help"
},
{
"id": "queries",
"name": "Queries",
"file": "queries.js",
"id": "query-stackoverflow",
"name": "Query Stackoverflow",
"file": "queryStackoverflow.js",
"docs_link": "https://cloud.google.com/nodejs/docs/reference/bigquery/latest/",
"usage": "node queries.js --help"
},
{
"id": "query-params-named",
Expand Down
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,22 @@ has instructions for running the samples.
| Dataset create | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/createDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/createDataset.js,samples/README.md) |
| Dataset delete | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/deleteDataset.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/deleteDataset.js,samples/README.md) |
| Dataset list | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/listDatasets.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/listDatasets.js,samples/README.md) |
| Tables | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/tables.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/tables.js,samples/README.md) |
| Browse rows | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/browseRows.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/browseRows.js,samples/README.md) |
| Copy table | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/copyTable.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/copyTable.js,samples/README.md) |
| Create table | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/createTable.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/createTable.js,samples/README.md) |
| Delete table | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/deleteTable.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/deleteTable.js,samples/README.md) |
| Extract table to GCS | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/extractTableToGCS.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/extractTableToGCS.js,samples/README.md) |
| Insert rows as stream | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/insertRowsAsStream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/insertRowsAsStream.js,samples/README.md) |
| List tables | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/listTables.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/listTables.js,samples/README.md) |
| Load CSV from GCS | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadCSVFromGCS.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadCSVFromGCS.js,samples/README.md) |
| Load CSV from GCS autodetect | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadCSVFromGCSAutodetect.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadCSVFromGCSAutodetect.js,samples/README.md) |
| Load CSV from GCS truncate | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadCSVFromGCSTruncate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadCSVFromGCSTruncate.js,samples/README.md) |
| Load JSON from GCS | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadJSONFromGCS.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadJSONFromGCS.js,samples/README.md) |
| Load JSON from GCS autodetect | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadJSONFromGCSAutodetect.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadJSONFromGCSAutodetect.js,samples/README.md) |
| Load JSON from GCS truncate | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadJSONFromGCSTruncate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadJSONFromGCSTruncate.js,samples/README.md) |
| Load local file | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadLocalFile.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadLocalFile.js,samples/README.md) |
| Load ORC from GCS truncate | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadORCFromGCSTruncate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadORCFromGCSTruncate.js,samples/README.md) |
| Load Parquet from GCS truncate | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/loadParquetFromGCSTruncate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/loadParquetFromGCSTruncate.js,samples/README.md) |
| Queries | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/queries.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/queries.js,samples/README.md) |
| Query named params | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/queryParamsNamed.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/queryParamsNamed.js,samples/README.md) |
| Query positional params | [source code](https://github.com/googleapis/nodejs-bigquery/blob/master/samples/queryParamsPositional.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-bigquery&page=editor&open_in_editor=samples/queryParamsPositional.js,samples/README.md) |
Expand Down
Loading