docs: add BigQuery computed fields feature page

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4591
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
GitOrigin-RevId: b06af8ce4812790bcdfd3348af544ba7d99e5b17
This commit is contained in:
Rakesh Emmadi 2022-06-07 20:06:58 +05:30 committed by hasura-bot
parent eaba2e08d3
commit 854a76c5b1
5 changed files with 396 additions and 119 deletions

View File

@ -108,3 +108,91 @@ X-Hasura-Role: admin
| name | true | [ComputedFieldName](/graphql/core/api-reference/syntax-defs.mdx#computedfieldname) | Name of the computed field | | name | true | [ComputedFieldName](/graphql/core/api-reference/syntax-defs.mdx#computedfieldname) | Name of the computed field |
| cascade | false | Boolean | When set to `true`, all the dependent items (if any) on this computed fields are also dropped | | cascade | false | Boolean | When set to `true`, all the dependent items (if any) on this computed fields are also dropped |
| source | false | [SourceName](/graphql/core/api-reference/syntax-defs.mdx#sourcename) | Name of the source database of the table (default: `default`) | | source | false | [SourceName](/graphql/core/api-reference/syntax-defs.mdx#sourcename) | Name of the source database of the table (default: `default`) |
## bigquery_add_computed_field {#metadata-bigquery-add-computed-field}
`bigquery_add_computed_field` is used to define a computed field in a BigQuery table.
There cannot be an existing column or relationship or computed field
with the same name.
Create a `computed field` called `fetch_articles` on an `author` *table*,
using an SQL function called `author_fetch_articles`:
```http
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type":"bigquery_add_computed_field",
"args":{
"table":{
"name":"author",
"dataset":"hasura"
},
"source": "bigquery",
"name":"fetch_articles",
"definition":{
"function":{
"name":"author_fetch_articles",
"dataset":"hasura"
},
"argument_mapping": {
"author_id_arg": "author_id"
},
"return_table": {
"name": "article",
"dataset": "hasura"
}
}
}
}
```
### Args syntax {#metadata-bigquery-add-computed-field-syntax}
| Key | Required | Schema | Description |
|------------|----------|--------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| table | true | [TableName](/graphql/core/api-reference/syntax-defs.mdx#bigquerytablename) | Name of the table |
| source | true | [SourceName](/graphql/core/api-reference/syntax-defs.mdx#sourcename) | Name of the source database of the table |
| name | true | [ComputedFieldName](/graphql/core/api-reference/syntax-defs.mdx#computedfieldname) | Name of the computed field |
| definition | true | [ComputedFieldDefinition](/graphql/core/api-reference/syntax-defs.mdx#bigquerycomputedfielddefinition) | The computed field definition |
| comment | false | `String` | Customise the description shown in GraphQL introspection. If null or omitted then if a comment exists on the database function, it is used as the description, and if not, an autogenerated description is used instead. |
## bigquery_drop_computed_field {#metadata-bigquery-drop-computed-field}
`bigquery_drop_computed_field` is used to drop a computed field of a table in a BigQuery source.
If there are other objects dependent on this computed field, like
permissions, the request will fail and report the dependencies unless
`cascade` is set to `true`. If `cascade` is set to `true`, the dependent
objects are also dropped.
Drop a computed field `fetch_articles` from a table `author`:
```http
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type":"bigquery_drop_computed_field",
"args":{
"table":{
"name":"author",
"dataset":"hasura"
},
"source": "bigquery",
"name":"fetch_articles",
"cascade": false
}
}
```
### Args syntax {#metadata-bigquery-drop-computed-field-syntax}
| Key | Required | Schema | Description |
|---------|----------|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| table | true | [TableName](/graphql/core/api-reference/syntax-defs.mdx#bigquerytablename) | Name of the table |
| source | true | [SourceName](/graphql/core/api-reference/syntax-defs.mdx#sourcename) | Name of the source database of the table |
| name | true | [ComputedFieldName](/graphql/core/api-reference/syntax-defs.mdx#computedfieldname) | Name of the computed field |
| cascade | false | Boolean | When set to `true`, all the dependent items (if any) on this computed fields are also dropped |

View File

@ -66,115 +66,117 @@ The structure of args depends on the type and version.
The various types of queries are listed in the following table: The various types of queries are listed in the following table:
| `type` | `args` | `version` | Synopsis | | `type` | `args` | `version` | Synopsis |
|--------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------------------------------------------------------| |-----------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------------------------------------------------------|
| **bulk** | [Query](#metadata-query) array | 1 | Execute multiple operations in a single query | | **bulk** | [Query](#metadata-query) array | 1 | Execute multiple operations in a single query |
| [pg_add_source](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-add-source) | [pg_add_source_args](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-add-source-syntax) | 1 | Add a Postgres database | | [pg_add_source](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-add-source) | [pg_add_source_args](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-add-source-syntax) | 1 | Add a Postgres database |
| [pg_drop_source](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-drop-source) | [pg_drop_source_args](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-drop-source-syntax) | 1 | Remove a Postgres database | | [pg_drop_source](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-drop-source) | [pg_drop_source_args](/graphql/core/api-reference/metadata-api/source.mdx#metadata-pg-drop-source-syntax) | 1 | Remove a Postgres database |
| [pg_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table) | [pg_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table-syntax) | 1 | Add a Postgres table/view with configuration | | [pg_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table) | [pg_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table-syntax) | 1 | Add a Postgres table/view with configuration |
| [pg_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table) | [pg_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table-syntax) | 1 | Remove a Postgres table/view | | [pg_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table) | [pg_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table-syntax) | 1 | Remove a Postgres table/view |
| [pg_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization) | [pg_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization-syntax) | 1 | Set table customization of an already tracked Postgres table | | [pg_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization) | [pg_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization-syntax) | 1 | Set table customization of an already tracked Postgres table |
| [pg_set_table_is_enum](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum) | [pg_set_table_is_enum_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum-syntax) | 1 | Set a tracked Postgres table as an enum table | | [pg_set_table_is_enum](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum) | [pg_set_table_is_enum_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum-syntax) | 1 | Set a tracked Postgres table as an enum table |
| [pg_track_function](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function) | [pg_track_function_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function-syntax) | 1 | Add a Postgres SQL function with configuration | | [pg_track_function](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function) | [pg_track_function_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function-syntax) | 1 | Add a Postgres SQL function with configuration |
| [pg_untrack_function](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function) | [pg_untrack_function_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function-syntax) | 1 | Remove a Postgres SQL function | | [pg_untrack_function](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function) | [pg_untrack_function_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function-syntax) | 1 | Remove a Postgres SQL function |
| [pg_set_function_customization](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization) | [pg_set_function_customization_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization-syntax) | 1 | Set function customization of an already tracked Postgres function | | [pg_set_function_customization](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization) | [pg_set_function_customization_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization-syntax) | 1 | Set function customization of an already tracked Postgres function |
| [pg_create_function_permission](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission) | [pg_create_function_permission_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission-syntax) | 1 | Create a Postgres function permission | | [pg_create_function_permission](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission) | [pg_create_function_permission_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission-syntax) | 1 | Create a Postgres function permission |
| [pg_drop_function_permission](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission) | [pg_drop_function_permission_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission-syntax) | 1 | Drop an existing Postgres function permission | | [pg_drop_function_permission](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission) | [pg_drop_function_permission_args](/graphql/core/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission-syntax) | 1 | Drop an existing Postgres function permission |
| [pg_create_object_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship) | [pg_create_object_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship-syntax) | 1 | Define a new object relationship between Postgres tables/views | | [pg_create_object_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship) | [pg_create_object_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship-syntax) | 1 | Define a new object relationship between Postgres tables/views |
| [pg_create_array_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship) | [pg_create_array_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship-syntax) | 1 | Define a new array relationship between Postgres tables/views | | [pg_create_array_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship) | [pg_create_array_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship-syntax) | 1 | Define a new array relationship between Postgres tables/views |
| [pg_drop_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship) | [pg_drop_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship-syntax) | 1 | Drop an existing Postgres relationship | | [pg_drop_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship) | [pg_drop_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship-syntax) | 1 | Drop an existing Postgres relationship |
| [pg_rename_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship) | [pg_rename_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship-syntax) | 1 | Modify name of an existing Postgres relationship | | [pg_rename_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship) | [pg_rename_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship-syntax) | 1 | Modify name of an existing Postgres relationship |
| [pg_set_relationship_comment](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment) | [pg_set_relationship_comment_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment-syntax) | 1 | Set comment on an existing Postgres relationship | | [pg_set_relationship_comment](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment) | [pg_set_relationship_comment_args](/graphql/core/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment-syntax) | 1 | Set comment on an existing Postgres relationship |
| [pg_add_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field) | [pg_add_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field-syntax) | 1 | Add a computed field to a Postgres table/view | | [pg_add_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field) | [pg_add_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field-syntax) | 1 | Add a computed field to a Postgres table/view |
| [pg_drop_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field) | [pg_drop_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field-syntax) | 1 | Drop a Postgres computed field | | [pg_drop_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field) | [pg_drop_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field-syntax) | 1 | Drop a Postgres computed field |
| [pg_create_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission) | [pg_create_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission-syntax) | 1 | Specify insert permission for a Postgres table/view | | [pg_create_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission) | [pg_create_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission-syntax) | 1 | Specify insert permission for a Postgres table/view |
| [pg_drop_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission) | [pg_drop_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission-syntax) | 1 | Remove existing insert permission for a Postgres table/view | | [pg_drop_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission) | [pg_drop_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission-syntax) | 1 | Remove existing insert permission for a Postgres table/view |
| [pg_create_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission) | [pg_create_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission-syntax) | 1 | Specify select permission for a Postgres table/view | | [pg_create_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission) | [pg_create_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission-syntax) | 1 | Specify select permission for a Postgres table/view |
| [pg_drop_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission) | [pg_drop_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission-syntax) | 1 | Remove existing select permission for a Postgres table/view | | [pg_drop_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission) | [pg_drop_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission-syntax) | 1 | Remove existing select permission for a Postgres table/view |
| [pg_create_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission) | [pg_create_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission-syntax) | 1 | Specify update permission for a Postgres table/view | | [pg_create_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission) | [pg_create_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission-syntax) | 1 | Specify update permission for a Postgres table/view |
| [pg_drop_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission) | [pg_drop_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission-syntax) | 1 | Remove existing update permission for a Postgres table/view | | [pg_drop_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission) | [pg_drop_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission-syntax) | 1 | Remove existing update permission for a Postgres table/view |
| [pg_create_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission) | [pg_create_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission-syntax) | 1 | Specify delete permission for a Postgres table/view | | [pg_create_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission) | [pg_create_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission-syntax) | 1 | Specify delete permission for a Postgres table/view |
| [pg_drop_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission) | [pg_drop_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission-syntax) | 1 | Remove existing delete permission for a Postgres table/view | | [pg_drop_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission) | [pg_drop_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission-syntax) | 1 | Remove existing delete permission for a Postgres table/view |
| [pg_set_permission_comment](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment) | [pg_set_permission_comment_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment-syntax) | 1 | Set comment on an existing permission for a Postgres table/view | | [pg_set_permission_comment](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment) | [pg_set_permission_comment_args](/graphql/core/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment-syntax) | 1 | Set comment on an existing permission for a Postgres table/view |
| [pg_create_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger) | [pg_create_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger-syntax) | 1 | Create or replace an event trigger on a Postgres table | | [pg_create_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger) | [pg_create_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger-syntax) | 1 | Create or replace an event trigger on a Postgres table |
| [pg_delete_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger) | [pg_delete_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger-syntax) | 1 | Delete an existing event trigger on a Postgres table | | [pg_delete_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger) | [pg_delete_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger-syntax) | 1 | Delete an existing event trigger on a Postgres table |
| [pg_redeliver_event](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event) | [pg_redeliver_event_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event-syntax) | 1 | Redeliver an existing event on a Postgres table | | [pg_redeliver_event](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event) | [pg_redeliver_event_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event-syntax) | 1 | Redeliver an existing event on a Postgres table |
| [pg_invoke_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger) | [pg_invoke_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger-syntax) | 1 | Invoke a trigger with custom payload on a Postgres table | | [pg_invoke_event_trigger](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger) | [pg_invoke_event_trigger_args](/graphql/core/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger-syntax) | 1 | Invoke a trigger with custom payload on a Postgres table |
| [bigquery_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table) | [bigquery_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table-syntax) | 1 | Add a BigQuery table/view with configuration | | [bigquery_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table) | [bigquery_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table-syntax) | 1 | Add a BigQuery table/view with configuration |
| [bigquery_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table) | [bigquery_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table-syntax) | 1 | Remove a BigQuery table/view | | [bigquery_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table) | [bigquery_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table-syntax) | 1 | Remove a BigQuery table/view |
| [bigquery_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization) | [bigquery_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization-syntax) | 1 | Set table customization of an already tracked BigQuery table | | [bigquery_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization) | [bigquery_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization-syntax) | 1 | Set table customization of an already tracked BigQuery table |
| [mssql_add_source](/graphql/core/api-reference/metadata-api/source.mdx#mssql-add-source) | [mssql_add_source_args](/graphql/core/api-reference/metadata-api/source.mdx#mssql-add-source-syntax) | 1 | Add an MS SQL Server database | | [bigquery_add_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field) | [bigquery_add_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field-syntax) | 1 | Add a computed field to a BigQuery table |
| [mssql_drop_source](/graphql/core/api-reference/metadata-api/source.mdx#mssql-drop-source) | [mssql_drop_source_args](/graphql/core/api-reference/metadata-api/source.mdx#mssql-drop-source-syntax) | 1 | Remove an MS SQL Server database | | [bigquery_drop_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field) | [bigquery_drop_computed_field_args](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field-syntax) | 1 | Drop a BigQuery computed field |
| [mssql_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-track-table) | [mssql_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-track-table-syntax) | 1 | Add an MS SQL Server table/view with configuration | | [mssql_add_source](/graphql/core/api-reference/metadata-api/source.mdx#mssql-add-source) | [mssql_add_source_args](/graphql/core/api-reference/metadata-api/source.mdx#mssql-add-source-syntax) | 1 | Add an MS SQL Server database |
| [mssql_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-untrack-table) | [mssql_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-untrack-table-syntax) | 1 | Remove an MS SQL Server table/view | | [mssql_drop_source](/graphql/core/api-reference/metadata-api/source.mdx#mssql-drop-source) | [mssql_drop_source_args](/graphql/core/api-reference/metadata-api/source.mdx#mssql-drop-source-syntax) | 1 | Remove an MS SQL Server database |
| [mssql_create_object_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship) | [mssql_create_object_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship-syntax) | 1 | Define a new object relationship between MS SQL Server tables/views | | [mssql_track_table](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-track-table) | [mssql_track_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-track-table-syntax) | 1 | Add an MS SQL Server table/view with configuration |
| [mssql_create_array_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship) | [mssql_create_array_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship-syntax) | 1 | Define a new array relationship between MS SQL Server tables/views | | [mssql_untrack_table](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-untrack-table) | [mssql_untrack_table_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-untrack-table-syntax) | 1 | Remove an MS SQL Server table/view |
| [mssql_drop_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship) | [mssql_drop_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship-syntax) | 1 | Drop an existing MS SQL Server relationship | | [mssql_create_object_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship) | [mssql_create_object_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship-syntax) | 1 | Define a new object relationship between MS SQL Server tables/views |
| [mssql_rename_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship) | [mssql_rename_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship-syntax) | 1 | Modify name of an existing MS SQL Server relationship | | [mssql_create_array_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship) | [mssql_create_array_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship-syntax) | 1 | Define a new array relationship between MS SQL Server tables/views |
| [mssql_set_relationship_comment](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment) | [mssql_set_relationship_comment_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment-syntax) | 1 | Set comment on an existing MS SQL Server relationship | | [mssql_drop_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship) | [mssql_drop_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship-syntax) | 1 | Drop an existing MS SQL Server relationship |
| [mssql_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization) | [mssql_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization-syntax) | 1 | Set table customization of an already tracked MS SQL Server table | | [mssql_rename_relationship](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship) | [mssql_rename_relationship_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship-syntax) | 1 | Modify name of an existing MS SQL Server relationship |
| [mssql_create_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission) | [mssql_create_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission-syntax) | 1 | Specify insert permission for an MS SQL Server table/view | | [mssql_set_relationship_comment](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment) | [mssql_set_relationship_comment_args](/graphql/core/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment-syntax) | 1 | Set comment on an existing MS SQL Server relationship |
| [mssql_drop_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission) | [mssql_drop_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission-syntax) | 1 | Remove existing insert permission for an MS SQL Server table/view | | [mssql_set_table_customization](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization) | [mssql_set_table_customization_args](/graphql/core/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization-syntax) | 1 | Set table customization of an already tracked MS SQL Server table |
| [mssql_create_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-select-permission) | [mssql_create_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-select-permission-syntax) | 1 | Specify select permission for an MS SQL Server table/view | | [mssql_create_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission) | [mssql_create_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission-syntax) | 1 | Specify insert permission for an MS SQL Server table/view |
| [mssql_drop_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission) | [mssql_drop_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission-syntax) | 1 | Remove existing select permission for an MS SQL Server table/view | | [mssql_drop_insert_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission) | [mssql_drop_insert_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission-syntax) | 1 | Remove existing insert permission for an MS SQL Server table/view |
| [mssql_create_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-update-permission) | [mssql_create_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-update-permission-syntax) | 1 | Specify update permission for an MS SQL Server table/view | | [mssql_create_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-select-permission) | [mssql_create_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-select-permission-syntax) | 1 | Specify select permission for an MS SQL Server table/view |
| [mssql_drop_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission) | [mssql_drop_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission-syntax) | 1 | Remove existing update permission for an MS SQL Server table/view | | [mssql_drop_select_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission) | [mssql_drop_select_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission-syntax) | 1 | Remove existing select permission for an MS SQL Server table/view |
| [mssql_create_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission) | [mssql_create_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission-syntax) | 1 | Specify delete permission for an MS SQL Server table/view | | [mssql_create_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-update-permission) | [mssql_create_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-update-permission-syntax) | 1 | Specify update permission for an MS SQL Server table/view |
| [mssql_drop_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission) | [mssql_drop_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission-syntax) | 1 | Remove existing delete permission for an MS SQL Server table/view | | [mssql_drop_update_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission) | [mssql_drop_update_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission-syntax) | 1 | Remove existing update permission for an MS SQL Server table/view |
| [mssql_set_permission_comment](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment) | [mssql_set_permission_comment_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment-syntax) | 1 | Set comment on an existing permission for an MS SQL Server table/view | | [mssql_create_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission) | [mssql_create_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission-syntax) | 1 | Specify delete permission for an MS SQL Server table/view |
| [create_cron_trigger](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger) | [create_cron_trigger_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger-syntax) | 1 | Create a cron trigger | | [mssql_drop_delete_permission](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission) | [mssql_drop_delete_permission_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission-syntax) | 1 | Remove existing delete permission for an MS SQL Server table/view |
| [delete_cron_trigger](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger) | [delete_cron_trigger_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger-syntax) | 1 | Delete an existing cron trigger | | [mssql_set_permission_comment](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment) | [mssql_set_permission_comment_args](/graphql/core/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment-syntax) | 1 | Set comment on an existing permission for an MS SQL Server table/view |
| [get_cron_triggers](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-cron-triggers) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Returns all the cron triggers | | [create_cron_trigger](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger) | [create_cron_trigger_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger-syntax) | 1 | Create a cron trigger |
| [create_scheduled_event](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event) | [create_scheduled_event_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event-syntax) | 1 | Create a new scheduled event | | [delete_cron_trigger](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger) | [delete_cron_trigger_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger-syntax) | 1 | Delete an existing cron trigger |
| [delete_scheduled_event](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event) | [delete_scheduled_event_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event-syntax) | 1 | Delete a scheduled event | | [get_cron_triggers](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-cron-triggers) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Returns all the cron triggers |
| [add_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema) | [add_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema-syntax) | 1 | Add a remote GraphQL server as a remote schema | | [create_scheduled_event](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event) | [create_scheduled_event_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event-syntax) | 1 | Create a new scheduled event |
| [update_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema) | [update_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema-syntax) | 1 | Update the details for a remote schema | | [delete_scheduled_event](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event) | [delete_scheduled_event_args](/graphql/core/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event-syntax) | 1 | Delete a scheduled event |
| [remove_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema) | [remove_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema-syntax) | 1 | Remove an existing remote schema | | [add_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema) | [add_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema-syntax) | 1 | Add a remote GraphQL server as a remote schema |
| [reload_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema) | [reload_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema-syntax) | 1 | Reload schema of an existing remote schema | | [update_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema) | [update_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema-syntax) | 1 | Update the details for a remote schema |
| [add_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions) | [add_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions-syntax) | 1 | Add permissions to a role of an existing remote schema | | [remove_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema) | [remove_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema-syntax) | 1 | Remove an existing remote schema |
| [drop_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions) | [drop_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions-syntax) | 1 | Drop existing permissions defined for a role for a remote schema | | [reload_remote_schema](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema) | [reload_remote_schema_args](/graphql/core/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema-syntax) | 1 | Reload schema of an existing remote schema |
| [pg_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship) | [pg_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship-syntax) | 1 | Create a remote relationship on a Postgres table | | [add_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions) | [add_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions-syntax) | 1 | Add permissions to a role of an existing remote schema |
| [pg_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship) | [pg_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship-syntax) | 1 | Update an existing remote relationship | | [drop_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions) | [drop_remote_schema_permissions](/graphql/core/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions-syntax) | 1 | Drop existing permissions defined for a role for a remote schema |
| [pg_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship) | [pg_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship | | [pg_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship) | [pg_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship-syntax) | 1 | Create a remote relationship on a Postgres table |
| [citus_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship) | [citus_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship-syntax) | 1 | Create a remote relationship on a citus table | | [pg_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship) | [pg_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
| [citus_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship) | [citus_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship-syntax) | 1 | Update an existing remote relationship | | [pg_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship) | [pg_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
| [citus_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship) | [citus_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship | | [citus_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship) | [citus_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship-syntax) | 1 | Create a remote relationship on a citus table |
| [mssql_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship) | [mssql_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship-syntax) | 1 | Create a remote relationship on an mssql table | | [citus_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship) | [citus_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
| [mssql_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship) | [mssql_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship-syntax) | 1 | Update an existing remote relationship | | [citus_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship) | [citus_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
| [mssql_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship) | [mssql_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship | | [mssql_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship) | [mssql_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship-syntax) | 1 | Create a remote relationship on an mssql table |
| [bigquery_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship) | [bigquery_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship-syntax) | 1 | Create a remote relationship on a bigquery table | | [mssql_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship) | [mssql_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
| [bigquery_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship) | [bigquery_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship-syntax) | 1 | Update an existing remote relationship | | [mssql_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship) | [mssql_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
| [bigquery_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship) | [bigquery_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship | | [bigquery_create_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship) | [bigquery_create_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship-syntax) | 1 | Create a remote relationship on a bigquery table |
| [create_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship) | [create_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship-syntax) | 1 | Create a remote relationship on a remote schema's type | | [bigquery_update_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship) | [bigquery_update_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
| [update_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship) | [update_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship-syntax) | 1 | Update an existing remote relationship on a remote schema's type | | [bigquery_delete_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship) | [bigquery_delete_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
| [delete_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship) | [delete_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship-syntax) | 1 | Delete an existing remote relationship on a remote schema's type | | [create_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship) | [create_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship-syntax) | 1 | Create a remote relationship on a remote schema's type |
| [export_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Export the current metadata | | [update_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship) | [update_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship-syntax) | 1 | Update an existing remote relationship on a remote schema's type |
| [export_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 2 | Export existing metadata with resource version included. | | [delete_remote_schema_remote_relationship](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship) | [delete_remote_schema_remote_relationship_args](/graphql/core/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship-syntax) | 1 | Delete an existing remote relationship on a remote schema's type |
| [replace_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 1 | Import and replace existing metadata | | [export_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Export the current metadata |
| [replace_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 2 | Replace existing metadata with check against current resource_version. | | [export_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 2 | Export existing metadata with resource version included. |
| [reload_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata) | [reload_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata-syntax) | 1 | Reload changes to the underlying Postgres DB | | [replace_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 1 | Import and replace existing metadata |
| [clear_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-clear-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Clear/wipe-out the current metadata state form server | | [replace_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 2 | Replace existing metadata with check against current resource_version. |
| [get_inconsistent_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-get-inconsistent-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | List all inconsistent metadata objects | | [reload_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata) | [reload_metadata_args](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata-syntax) | 1 | Reload changes to the underlying Postgres DB |
| [drop_inconsistent_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-drop-inconsistent-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Drop all inconsistent metadata objects | | [clear_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-clear-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Clear/wipe-out the current metadata state form server |
| [create_query_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection) | [create_query_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection-syntax) | 1 | Create a query collection | | [get_inconsistent_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-get-inconsistent-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | List all inconsistent metadata objects |
| [drop_query_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection) | [drop_query_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection-syntax) | 1 | Drop a query collection | | [drop_inconsistent_metadata](/graphql/core/api-reference/metadata-api/manage-metadata.mdx#metadata-drop-inconsistent-metadata) | [Empty Object](/graphql/core/api-reference/syntax-defs.mdx#empty-object) | 1 | Drop all inconsistent metadata objects |
| [add_query_to_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection) | [add_query_to_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection-syntax) | 1 | Add a query to a given collection | | [create_query_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection) | [create_query_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection-syntax) | 1 | Create a query collection |
| [drop_query_from_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection) | [drop_query_from_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection-syntax) | 1 | Drop a query from a given collection | | [drop_query_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection) | [drop_query_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection-syntax) | 1 | Drop a query collection |
| [add_collection_to_allowlist](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist) | [add_collection_to_allowlist_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist-syntax) | 1 | Add a collection to the allow-list | | [add_query_to_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection) | [add_query_to_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection-syntax) | 1 | Add a query to a given collection |
| [drop_collection_from_allowlist](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist) | [drop_collection_from_allowlist_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist-syntax) | 1 | Drop a collection from the allow-list | | [drop_query_from_collection](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection) | [drop_query_from_collection_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection-syntax) | 1 | Drop a query from a given collection |
| [set_custom_types](/graphql/core/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types) | [set_custom_types_args](/graphql/core/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types-syntax) | 1 | Set custom GraphQL types | | [add_collection_to_allowlist](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist) | [add_collection_to_allowlist_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist-syntax) | 1 | Add a collection to the allow-list |
| [create_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action) | [create_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-syntax) | 1 | Create an action | | [drop_collection_from_allowlist](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist) | [drop_collection_from_allowlist_args](/graphql/core/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist-syntax) | 1 | Drop a collection from the allow-list |
| [drop_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action) | [drop_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-syntax) | 1 | Drop an action | | [set_custom_types](/graphql/core/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types) | [set_custom_types_args](/graphql/core/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types-syntax) | 1 | Set custom GraphQL types |
| [update_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-update-action) | [update_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-update-action-syntax) | 1 | Update an action | | [create_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action) | [create_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-syntax) | 1 | Create an action |
| [create_action_permission](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-permission) | [create_action_permission_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-permission-syntax) | 1 | Create an action permission | | [drop_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action) | [drop_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-syntax) | 1 | Drop an action |
| [drop_action_permission](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission) | [drop_action_permission_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission-syntax) | 1 | Drop an action permission | | [update_action](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-update-action) | [update_action_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-update-action-syntax) | 1 | Update an action |
| [create_rest_endpoint](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint) | [create_rest_endpoint_args](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint-syntax) | 1 | Create a RESTified GraphQL Endpoint | | [create_action_permission](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-permission) | [create_action_permission_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-create-action-permission-syntax) | 1 | Create an action permission |
| [drop_rest_endpoint](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint) | [drop_rest_endpoint_args](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint-syntax) | 1 | Drop a RESTified GraphQL Endpoint | | [drop_action_permission](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission) | [drop_action_permission_args](/graphql/core/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission-syntax) | 1 | Drop an action permission |
| [add_inherited_role](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role) | [add_inherited_role_args](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role-syntax) | 1 | Add an inherited role | | [create_rest_endpoint](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint) | [create_rest_endpoint_args](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint-syntax) | 1 | Create a RESTified GraphQL Endpoint |
| [drop_inherited_role](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role) | [drop_inherited_role_args](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role-syntax) | 1 | Drop an inherited role | | [drop_rest_endpoint](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint) | [drop_rest_endpoint_args](/graphql/core/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint-syntax) | 1 | Drop a RESTified GraphQL Endpoint |
| [set_graphql_introspection_options](/graphql/core/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-introspection-options) | [set_graphql_schema_introspection_options_args](/graphql/core/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-schema-introspection-options-syntax) | 1 | Set graphql introspection options | | [add_inherited_role](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role) | [add_inherited_role_args](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role-syntax) | 1 | Add an inherited role |
| [add_host_to_tls_allowlist](/graphql/core/api-reference/metadata-api/network.mdx#metadata-add-host-to-tls-allowlist) | [add_host_to_tls_allowlist_args](/graphql/core/api-reference/metadata-api/network.mdx#add-host-to-tls-allowlist-syntax) | 1 | Add an endpoint to the TLS Allowlist | | [drop_inherited_role](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role) | [drop_inherited_role_args](/graphql/core/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role-syntax) | 1 | Drop an inherited role |
| [drop_host_from_tls_allowlist](/graphql/core/api-reference/metadata-api/network.mdx#metadata-drop-host-from-tls-allowlist) | [drop_host_from_tls_allowlist_args](/graphql/core/api-reference/metadata-api/network.mdx#drop-host-from-tls-allowlist-syntax) | 1 | Drop an endpoint from the TLS Allowlist | | [set_graphql_introspection_options](/graphql/core/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-introspection-options) | [set_graphql_schema_introspection_options_args](/graphql/core/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-schema-introspection-options-syntax) | 1 | Set graphql introspection options |
| [add_host_to_tls_allowlist](/graphql/core/api-reference/metadata-api/network.mdx#metadata-add-host-to-tls-allowlist) | [add_host_to_tls_allowlist_args](/graphql/core/api-reference/metadata-api/network.mdx#add-host-to-tls-allowlist-syntax) | 1 | Add an endpoint to the TLS Allowlist |
| [drop_host_from_tls_allowlist](/graphql/core/api-reference/metadata-api/network.mdx#metadata-drop-host-from-tls-allowlist) | [drop_host_from_tls_allowlist_args](/graphql/core/api-reference/metadata-api/network.mdx#drop-host-from-tls-allowlist-syntax) | 1 | Drop an endpoint from the TLS Allowlist |
<!-- <!--
@ -211,12 +213,12 @@ TODO: MSSQL_UNSUPPORTED
## Response structure ## Response structure
| Status code | Description | Response structure | | Status code | Description | Response structure |
|--------------|-------------------------|--------------------------------------------| |-------------|-----------------------|-----------------------------------------|
| 200 | Success | Request specific | | 200 | Success | Request specific |
| 400 | Bad request | `{ "path" : String, "error" : String}` | | 400 | Bad request | `{ "path" : String, "error" : String}` |
| 401 | Unauthorized | `{"error" : String}` | | 401 | Unauthorized | `{"error" : String}` |
| 500 | Internal server error | `{"error" : String}` | | 500 | Internal server error | `{"error" : String}` |
## Disabling metadata API ## Disabling metadata API
@ -248,4 +250,3 @@ The `resource_version` supplied must match the version returned
otherwise a 409 error response is returned. otherwise a 409 error response is returned.
The version is incremented on any operation that modified metadata as well as `reload_metadata`. The version is incremented on any operation that modified metadata as well as `reload_metadata`.

View File

@ -33,7 +33,7 @@ keywords:
} }
``` ```
## BigQueryTableName {#bigquerytablename} ## BigQuery TableName {#bigquerytablename}
``` ```
{ {
@ -68,6 +68,15 @@ keywords:
} }
``` ```
## BigQuery FunctionName {#bigqueryfunctionname}
```
{
"name": String,
"dataset": String
}
```
## RoleName {#rolename} ## RoleName {#rolename}
`String` `String`
@ -1175,6 +1184,14 @@ via [Custom Types](/graphql/core/api-reference/metadata-api/custom-types.mdx)
| table_argument | false | String | Name of the argument which accepts a table row type. If omitted, the first argument is considered a table argument | | table_argument | false | String | Name of the argument which accepts a table row type. If omitted, the first argument is considered a table argument |
| session_argument | false | String | Name of the argument which accepts the Hasura session object as a JSON/JSONB value. If omitted, the Hasura session object is not passed to the function | | session_argument | false | String | Name of the argument which accepts the Hasura session object as a JSON/JSONB value. If omitted, the Hasura session object is not passed to the function |
## BigQuery ComputedFieldDefinition {#bigquerycomputedfielddefinition}
| Key | Required | Schema | Description |
|------------------|----------|------------------------------------------------|--------------------------------------------------------------------------------|
| function | true | [BigQuery FunctionName](#bigqueryfunctionname) | The user defined SQL function |
| argument_mapping | true | Object (`String` : `String`) | Mapping from the argument name of the function to the column name of the table |
| return_table | false | [BigQuery TableName](#bigquerytablename) | Name of the table which the function returns |
## Function Configuration {#function-configuration} ## Function Configuration {#function-configuration}
| Key | Required | Schema | Description | | Key | Required | Schema | Description |

View File

@ -0,0 +1,172 @@
---
sidebar_label: Computed fields
sidebar_position: 2
description: Use computed fields over BigQuery in Hasura
keywords:
- hasura
- docs
- bigquery
- schema
- computed field
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# BigQuery: Computed fields
## What are computed fields?
Computed fields are virtual fields that are dynamically computed and can be
queried along with a table's columns. Computed fields are computed upon request.
They are computed by executing user-defined SQL functions using other columns of
the table and other custom inputs if needed.
:::info Note
Computed fields are only exposed over the GraphQL API and the BigQuery database
schema is not modified on addition of a computed field.
:::
### Supported SQL functions
Currently, only [table-valued functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/table-functions),
which return a table, can be added as computed fields. Support for computed fields that return
a scalar type is being tracked in this [GitHub issue](https://github.com/hasura/graphql-engine/issues/8521).
#### Creating a table-valued function {#bigquery-create-table-function}
A table-valued function can be created using the [`CREATE TABLE FUNCTION`](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#create_table_function_statement)
SQL statement. BigQuery infers the returning table type based on the `RETURNS TABLE<..>` syntax present in
the SQL statement.
- If `RETURNS TABLE` is included, it specifies the custom schema of the return table as a comma-separated list
of column name and data type pairs. While [adding such functions as computed fields](#bigquery-adding-computed-field),
it is not required to provide `return_table` in the [definition](/graphql/core/api-reference/syntax-defs.mdx#bigquerycomputedfielddefinition)
as BigQuery [provides enough information](https://cloud.google.com/bigquery/docs/reference/rest/v2/routines#Routine) about
the returning table schema to Hasura.
Example:
```sql
CREATE TABLE FUNCTION `google_project.hasura_test.fetch_articles`(a_id INT64, search STRING)
RETURNS TABLE<id INT64, title STRING, content STRING> AS (
( SELECT t.id, t.title, t.content
FROM hasura_test.article t
WHERE t.author_id = a_id AND (t.title like `search` or t.content like `search`)
)
);
```
- If `RETURNS TABLE` is absent, BigQuery infers the returning table from the query statement
present in the function body, implicitly. While [adding such functions as computed fields](#bigquery-adding-computed-field),
it is required to provide `return_table` in the [definition](/graphql/core/api-reference/syntax-defs.mdx#bigquerycomputedfielddefinition)
as BigQuery does not provide any information about the returning table to Hasura.
Example:
```sql
CREATE TABLE FUNCTION `google_project.hasura_test.fetch_articles`(a_id INT64, search STRING) AS (
( SELECT t.*
FROM hasura_test.article t
WHERE t.author_id = a_id AND (t.title like `search` or t.content like `search`)
)
);
```
:::info Note
Table functions without `RETURNS TABLE` should return all columns, possibly by using the`*` operator,
to avoid any execution exceptions when a column that is not being returned is included in the selection set of
computed field.
:::
## Adding computed fields to a table {#bigquery-adding-computed-field}
<Tabs className="api-tabs">
<TabItem value="console" label="Console">
Console support will be added soon.
</TabItem>
<TabItem value="cli" label="CLI">
You can add a computed field by updating the `metadata > databases > [db-name] > tables > [table_name].yaml` file:
```yaml {4-15}
- table:
dataset: hasura
name: authors
computed_fields:
- name: fetch_articles
definition:
function:
dataset: hasura
name: search_articles
return_table:
dataset: hasura
name: articles
argument_mapping:
author_id_arg: author_id
comment: ""
```
Apply the metadata by running:
```bash
hasura metadata apply
```
</TabItem>
<TabItem value="api" label="API">
A computed field can be added to a table using the
[bigquery_add_computed_field](/graphql/core/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field) metadata API:
```http
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type": "bigquery_add_computed_field",
"args": {
"source": "<db_name>",
"table": {
"name": "author",
"dataset": "hasura"
},
"name": "fetch_articles",
"definition": {
"function": {
"name": "fetch_articles",
"dataset": "hasura"
},
"return_table": {
"name": "article",
"dataset": "hasura"
},
"argument_mapping": {
"author_id_arg": "author_id"
}
}
}
}
```
</TabItem>
</Tabs>
## Computed fields permissions
[Access control](/graphql/core/auth/authorization/index.mdx) to computed fields depends on the presence of the `RETURNS TABLE` clause
in the [creating computed field](#bigquery-create-table-function) SQL statement.
If `RETURNS TABLE`
- is present, then the function returns a custom table schema. Select permissions are managed through `computed_fields`
in the [permission definition](/graphql/core/api-reference/syntax-defs.mdx#selectpermission).
- is absent, then the permissions set on `return_table` are respected.

View File

@ -206,8 +206,7 @@ in the `Computed fields` section:
</TabItem> </TabItem>
<TabItem value="cli" label="CLI"> <TabItem value="cli" label="CLI">
You can add a computed field in the `tables.yaml` file inside the You can add a computed field by updating the `metadata > databases > [db-name] > tables > [table_name].yaml` file:
`metadata` directory:
```yaml {4-11} ```yaml {4-11}
- table: - table: