mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
docs: logical model references, native query relationships
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/9462 Co-authored-by: Rob Dominguez <24390149+robertjdominguez@users.noreply.github.com> GitOrigin-RevId: 29a40ebf19c60fa182449c3721bf1d8d9f2d999f
This commit is contained in:
parent
5601e1bd1f
commit
e3ba41324b
@ -65,157 +65,158 @@ The structure of args depends on the type and version.
|
||||
|
||||
The various types of queries are listed in the following table:
|
||||
|
||||
| `type` | `args` | `version` | Synopsis |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ |
|
||||
| **bulk** | [Query](#metadata-query) array | 1 | Execute multiple operations in a single query |
|
||||
| **concurrent_bulk** | [Query](#metadata-query) array | 2 | Execute multiple **read only** operations in a single **transaction** |
|
||||
| **bulk_keep_going** | [Query](#metadata-query) array | 1 | Like `bulk`, but subcommands can fail without the whole batch failing |
|
||||
| [pg_add_source](/api-reference/metadata-api/source.mdx#metadata-pg-add-source) | [pg_add_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-add-source-syntax) | 1 | Add a Postgres database |
|
||||
| [pg_drop_source](/api-reference/metadata-api/source.mdx#metadata-pg-drop-source) | [pg_drop_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-drop-source-syntax) | 1 | Remove a Postgres database |
|
||||
| [pg_get_source_tables](/api-reference/metadata-api/source.mdx#metadata-pg-get-source-tables) | [pg_get_source_tables_args](/api-reference/metadata-api/source.mdx#metadata-pg-get-source-tables-syntax) | 1 | List all tables available on a given Postgres database |
|
||||
| [pg_track_table](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table) | [pg_track_table_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table-syntax) | 1 | Add a Postgres table/view with configuration |
|
||||
| [pg_track_tables](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-tables) | [pg_track_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-tables-syntax) | 1 | Add multiple Postgres tables/views with configuration |
|
||||
| [pg_untrack_table](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table) | [pg_untrack_table_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table-syntax) | 1 | Remove a Postgres table/view |
|
||||
| [pg_untrack_tables](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-tables) | [pg_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-tables-syntax) | 1 | Remove multiple Postgres tables/views |
|
||||
| [pg_update_source](/api-reference/metadata-api/source.mdx#metadata-pg-update-source) | [pg_update_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-update-source-syntax) | 1 | Update a Postgres database |
|
||||
| [pg_set_table_customization](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization) | [pg_set_table_customization_args](/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](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum) | [pg_set_table_is_enum_args](/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](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function) | [pg_track_function_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function-syntax) | 1 | Add a Postgres SQL function with configuration |
|
||||
| [pg_untrack_function](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function) | [pg_untrack_function_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function-syntax) | 1 | Remove a Postgres SQL function |
|
||||
| [pg_set_function_customization](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization) | [pg_set_function_customization_args](/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](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission) | [pg_create_function_permission_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission-syntax) | 1 | Create a Postgres function permission |
|
||||
| [pg_drop_function_permission](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission) | [pg_drop_function_permission_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission-syntax) | 1 | Drop an existing Postgres function permission |
|
||||
| [pg_create_object_relationship](/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship) | [pg_create_object_relationship_args](/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](/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship) | [pg_create_array_relationship_args](/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](/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship) | [pg_drop_relationship_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship-syntax) | 1 | Drop an existing Postgres relationship |
|
||||
| [pg_rename_relationship](/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship) | [pg_rename_relationship_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship-syntax) | 1 | Modify name of an existing Postgres relationship |
|
||||
| [pg_set_relationship_comment](/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment) | [pg_set_relationship_comment_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment-syntax) | 1 | Set comment on an existing Postgres relationship |
|
||||
| [pg_add_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field) | [pg_add_computed_field_args](/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](/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field) | [pg_drop_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field-syntax) | 1 | Drop a Postgres computed field |
|
||||
| [pg_create_insert_permission](/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission) | [pg_create_insert_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission) | [pg_drop_insert_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission) | [pg_create_select_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission) | [pg_drop_select_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission) | [pg_create_update_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission) | [pg_drop_update_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission) | [pg_create_delete_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission) | [pg_drop_delete_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment) | [pg_set_permission_comment_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger) | [pg_create_event_trigger_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger) | [pg_delete_event_trigger_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event) | [pg_redeliver_event_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger) | [pg_invoke_event_trigger_args](/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_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-apollo-federation-config) | [pg_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked postgres table |
|
||||
| [pg_test_connection_template](/api-reference/metadata-api/table-view.mdx#metadata-pg-test-connection-template) | [pg_test_connection_template_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-test-connection-template-syntax) | 1 | Test connection template |
|
||||
| [pg_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-pg-track-logical-model) | [pg_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [pg_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-pg-untrack-logical-model) | [pg_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [pg_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-pg-create-logical-model-select-permission) | [pg_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [pg_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-pg-drop-logical-model-select-permission) | [pg_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [pg_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-pg-track-native-query) | [pg_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-pg-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [pg_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-pg-untrack-native-query) | [pg_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-pg-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [bigquery_track_table](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table) | [bigquery_track_table_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table-syntax) | 1 | Add a BigQuery table/view with configuration |
|
||||
| [bigquery_track_tables](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-tables) | [bigquery_track_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-tables-syntax) | 1 | Add multiple BigQuery tables/views with configuration |
|
||||
| [bigquery_untrack_table](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table) | [bigquery_untrack_table_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table-syntax) | 1 | Remove a BigQuery table/view |
|
||||
| [bigquery_untrack_tables](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-tables) | [bigquery_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-tables-syntax) | 1 | Remove multiple BigQuery tables/views |
|
||||
| [bigquery_set_table_customization](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization) | [bigquery_set_table_customization_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization-syntax) | 1 | Set table customization of an already tracked BigQuery table |
|
||||
| [bigquery_add_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field) | [bigquery_add_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field-syntax) | 1 | Add a computed field to a BigQuery table |
|
||||
| [bigquery_drop_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field) | [bigquery_drop_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field-syntax) | 1 | Drop a BigQuery computed field |
|
||||
| [bigquery_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-apollo-federation-config) | [bigquery_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked bigquery table |
|
||||
| [bigquery_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-track-logical-model) | [bigquery_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [bigquery_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-untrack-logical-model) | [bigquery_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [bigquery_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-create-logical-model-select-permission) | [bigquery_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [bigquery_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-drop-logical-model-select-permission) | [bigquery_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [bigquery_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-track-native-query) | [bigquery_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [bigquery_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-untrack-native-query) | [bigquery_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [mssql_add_source](/api-reference/metadata-api/source.mdx#mssql-add-source) | [mssql_add_source_args](/api-reference/metadata-api/source.mdx#mssql-add-source-syntax) | 1 | Add an MS SQL Server database |
|
||||
| [mssql_drop_source](/api-reference/metadata-api/source.mdx#mssql-drop-source) | [mssql_drop_source_args](/api-reference/metadata-api/source.mdx#mssql-drop-source-syntax) | 1 | Remove an MS SQL Server database |
|
||||
| [mssql_get_source_tables](/api-reference/metadata-api/source.mdx#mssql-get-source-tables) | [mssql_get_source_tables_args](/api-reference/metadata-api/source.mdx#mssql-get-source-tables-syntax) | 1 | List all tables available on a given MS SQL Server database |
|
||||
| [mssql_track_table](/api-reference/metadata-api/table-view.mdx#mssql-track-table) | [mssql_track_table_args](/api-reference/metadata-api/table-view.mdx#mssql-track-table-syntax) | 1 | Add an MS SQL Server table/view with configuration |
|
||||
| [mssql_track_tables](/api-reference/metadata-api/table-view.mdx#mssql-track-tables) | [mssql_track_tables_args](/api-reference/metadata-api/table-view.mdx#mssql-track-tables-syntax) | 1 | Add multiple MS SQL Server tables/views with configuration |
|
||||
| [mssql_untrack_table](/api-reference/metadata-api/table-view.mdx#mssql-untrack-table) | [mssql_untrack_table_args](/api-reference/metadata-api/table-view.mdx#mssql-untrack-table-syntax) | 1 | Remove an MS SQL Server table/view |
|
||||
| [mssql_untrack_tables](/api-reference/metadata-api/table-view.mdx#mssql-untrack-tables) | [mssql_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#mssql-untrack-tables-syntax) | 1 | Remove multiple MS SQL Server tables/views |
|
||||
| [mssql_update_source](/api-reference/metadata-api/source.mdx#mssql-update-source) | [mssql_update_source_args](/api-reference/metadata-api/source.mdx#mssql-update-source-syntax) | 1 | Update an MS SQL Server database |
|
||||
| [mssql_create_object_relationship](/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship) | [mssql_create_object_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship-syntax) | 1 | Define a new object relationship between MS SQL Server tables/views |
|
||||
| [mssql_create_array_relationship](/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship) | [mssql_create_array_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship-syntax) | 1 | Define a new array relationship between MS SQL Server tables/views |
|
||||
| [mssql_drop_relationship](/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship) | [mssql_drop_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship-syntax) | 1 | Drop an existing MS SQL Server relationship |
|
||||
| [mssql_rename_relationship](/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship) | [mssql_rename_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship-syntax) | 1 | Modify name of an existing MS SQL Server relationship |
|
||||
| [mssql_set_relationship_comment](/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment) | [mssql_set_relationship_comment_args](/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment-syntax) | 1 | Set comment on an existing MS SQL Server relationship |
|
||||
| [mssql_set_table_customization](/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization) | [mssql_set_table_customization_args](/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_insert_permission](/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission) | [mssql_create_insert_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission-syntax) | 1 | Specify insert permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_insert_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission) | [mssql_drop_insert_permission_args](/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_select_permission](/api-reference/metadata-api/permission.mdx#mssql-create-select-permission) | [mssql_create_select_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-select-permission-syntax) | 1 | Specify select permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_select_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission) | [mssql_drop_select_permission_args](/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_update_permission](/api-reference/metadata-api/permission.mdx#mssql-create-update-permission) | [mssql_create_update_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-update-permission-syntax) | 1 | Specify update permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_update_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission) | [mssql_drop_update_permission_args](/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission-syntax) | 1 | Remove existing update permission for an MS SQL Server table/view |
|
||||
| [mssql_create_delete_permission](/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission) | [mssql_create_delete_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission-syntax) | 1 | Specify delete permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_delete_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission) | [mssql_drop_delete_permission_args](/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission-syntax) | 1 | Remove existing delete permission for an MS SQL Server table/view |
|
||||
| [mssql_set_permission_comment](/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment) | [mssql_set_permission_comment_args](/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_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-mssql-set-apollo-federation-config) | [mssql_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-mssql-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked mssql table |
|
||||
| [mssql_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-track-logical-model) | [mssql_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [mssql_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-untrack-logical-model) | [mssql_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [mssql_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-create-logical-model-select-permission) | [mssql_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [mssql_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-drop-logical-model-select-permission) | [mssql_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [mssql_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-track-native-query) | [mssql_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [mssql_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-untrack-native-query) | [mssql_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [create_cron_trigger](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger) | [create_cron_trigger_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger-syntax) | 1 | Create a cron trigger |
|
||||
| [delete_cron_trigger](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger) | [delete_cron_trigger_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger-syntax) | 1 | Delete an existing cron trigger |
|
||||
| [get_cron_triggers](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-cron-triggers) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Returns all the cron triggers |
|
||||
| [get_scheduled_events](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-events) | [get_scheduled_events_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-events-syntax) | 1 | API to fetch scheduled events |
|
||||
| [get_scheduled_event_invocations](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-event-invocations) | [get_scheduled_event_invocations_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-event-invocations-syntax) | 1 | API to fetch scheduled event's invocations |
|
||||
| [create_scheduled_event](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event) | [create_scheduled_event_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event-syntax) | 1 | Create a new scheduled event |
|
||||
| [delete_scheduled_event](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event) | [delete_scheduled_event_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event-syntax) | 1 | Delete a scheduled event |
|
||||
| [cleanup_event_trigger_logs](/api-reference/metadata-api/event-triggers.mdx#metadata-cleanup-event-trigger-logs) | [cleanup_event_trigger_logs_args](/api-reference/metadata-api/event-triggers.mdx#metadata-cleanup-event-trigger-logs-syntax) | 1 | Manually delete Event Trigger logs |
|
||||
| [resume_event_trigger_cleanups](/api-reference/metadata-api/event-triggers.mdx#metadata-resume-event-trigger-cleanups) | [resume_event_trigger_cleanups_args](/api-reference/metadata-api/event-triggers.mdx#metadata-resume-event-trigger-cleanups-syntax) | 1 | Resume log cleaner for Event Triggers |
|
||||
| [pause_event_trigger_cleanups](/api-reference/metadata-api/event-triggers.mdx#metadata-pause-event-trigger-cleanups) | [pause_event_trigger_cleanups_args](/api-reference/metadata-api/event-triggers.mdx#metadata-pause-event-trigger-cleanups-syntax) | 1 | Pause log cleaner for Event Triggers |
|
||||
| [add_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema) | [add_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema-syntax) | 1 | Add a remote GraphQL server as a Remote Schema |
|
||||
| [update_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema) | [update_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema-syntax) | 1 | Update the details for a Remote Schema |
|
||||
| [remove_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema) | [remove_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema-syntax) | 1 | Remove an existing Remote Schema |
|
||||
| [reload_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema) | [reload_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema-syntax) | 1 | Reload schema of an existing Remote Schema |
|
||||
| [add_remote_schema_permissions](/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions) | [add_remote_schema_permissions](/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 |
|
||||
| [drop_remote_schema_permissions](/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions) | [drop_remote_schema_permissions](/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_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship) | [pg_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship-syntax) | 1 | Create a remote relationship on a Postgres table |
|
||||
| [pg_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship) | [pg_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [pg_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship) | [pg_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [citus_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship) | [citus_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship-syntax) | 1 | Create a remote relationship on a citus table |
|
||||
| [citus_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship) | [citus_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [citus_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship) | [citus_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [mssql_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship) | [mssql_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship-syntax) | 1 | Create a remote relationship on an mssql table |
|
||||
| [mssql_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship) | [mssql_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [mssql_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship) | [mssql_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [bigquery_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship) | [bigquery_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship-syntax) | 1 | Create a remote relationship on a bigquery table |
|
||||
| [bigquery_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship) | [bigquery_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [bigquery_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship) | [bigquery_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [create_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship) | [create_remote_schema_remote_relationship_args](/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 |
|
||||
| [update_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship) | [update_remote_schema_remote_relationship_args](/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 |
|
||||
| [delete_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship) | [delete_remote_schema_remote_relationship_args](/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 |
|
||||
| [export_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Export the current Metadata |
|
||||
| [export_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 2 | Export existing Metadata with resource version included. |
|
||||
| [replace_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 1 | Import and replace existing Metadata |
|
||||
| [replace_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 2 | Replace existing Metadata with check against current resource_version. |
|
||||
| [reload_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata) | [reload_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata-syntax) | 1 | Reload changes to the underlying Postgres DB |
|
||||
| [clear_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-clear-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Clear/wipe-out the current Metadata state form server |
|
||||
| [get_inconsistent_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-get-inconsistent-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | List all inconsistent Metadata objects |
|
||||
| [drop_inconsistent_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-drop-inconsistent-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Drop all inconsistent Metadata objects |
|
||||
| [create_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection) | [create_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection-syntax) | 1 | Create a query collection |
|
||||
| [rename_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-rename-query-collection) | [rename_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-rename-query-collection-syntax) | 1 | Rename a query collection |
|
||||
| [drop_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection) | [drop_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection-syntax) | 1 | Drop a query collection |
|
||||
| [add_query_to_collection](/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection) | [add_query_to_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection-syntax) | 1 | Add a query to a given collection |
|
||||
| [drop_query_from_collection](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection) | [drop_query_from_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection-syntax) | 1 | Drop a query from a given collection |
|
||||
| [add_collection_to_allowlist](/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist) | [add_collection_to_allowlist_args](/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist-syntax) | 1 | Add a collection to the allow-list |
|
||||
| [drop_collection_from_allowlist](/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist) | [drop_collection_from_allowlist_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist-syntax) | 1 | Drop a collection from the allow-list |
|
||||
| [set_custom_types](/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types) | [set_custom_types_args](/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types-syntax) | 1 | Set custom GraphQL types |
|
||||
| [create_action](/api-reference/metadata-api/actions.mdx#metadata-create-action) | [create_action_args](/api-reference/metadata-api/actions.mdx#metadata-create-action-syntax) | 1 | Create an action |
|
||||
| [drop_action](/api-reference/metadata-api/actions.mdx#metadata-drop-action) | [drop_action_args](/api-reference/metadata-api/actions.mdx#metadata-drop-action-syntax) | 1 | Drop an action |
|
||||
| [update_action](/api-reference/metadata-api/actions.mdx#metadata-update-action) | [update_action_args](/api-reference/metadata-api/actions.mdx#metadata-update-action-syntax) | 1 | Update an action |
|
||||
| [create_action_permission](/api-reference/metadata-api/actions.mdx#metadata-create-action-permission) | [create_action_permission_args](/api-reference/metadata-api/actions.mdx#metadata-create-action-permission-syntax) | 1 | Create an action permission |
|
||||
| [drop_action_permission](/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission) | [drop_action_permission_args](/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission-syntax) | 1 | Drop an action permission |
|
||||
| [create_rest_endpoint](/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint) | [create_rest_endpoint_args](/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint-syntax) | 1 | Create a RESTified GraphQL Endpoint |
|
||||
| [drop_rest_endpoint](/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint) | [drop_rest_endpoint_args](/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint-syntax) | 1 | Drop a RESTified GraphQL Endpoint |
|
||||
| [add_inherited_role](/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role) | [add_inherited_role_args](/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role-syntax) | 1 | Add an inherited role |
|
||||
| [drop_inherited_role](/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role) | [drop_inherited_role_args](/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role-syntax) | 1 | Drop an inherited role |
|
||||
| [set_graphql_introspection_options](/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-introspection-options) | [set_graphql_schema_introspection_options_args](/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-schema-introspection-options-syntax) | 1 | Set graphql introspection options |
|
||||
| [add_host_to_tls_allowlist](/api-reference/metadata-api/network.mdx#metadata-add-host-to-tls-allowlist) | [add_host_to_tls_allowlist_args](/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](/api-reference/metadata-api/network.mdx#metadata-drop-host-from-tls-allowlist) | [drop_host_from_tls_allowlist_args](/api-reference/metadata-api/network.mdx#drop-host-from-tls-allowlist-syntax) | 1 | Drop an endpoint from the TLS Allowlist |
|
||||
| `type` | `args` | `version` | Synopsis |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------------------------------------------------------- |
|
||||
| **bulk** | [Query](#metadata-query) array | 1 | Execute multiple operations in a single query |
|
||||
| **bulk_atomic** | [Query](#metadata-query) array | 2 | Execute multiple operations in a single **transaction**. Limited operation support. |
|
||||
| **concurrent_bulk** | [Query](#metadata-query) array | 2 | Execute multiple **read only** operations in a single **transaction** |
|
||||
| **bulk_keep_going** | [Query](#metadata-query) array | 1 | Like `bulk`, but subcommands can fail without the whole batch failing |
|
||||
| [pg_add_source](/api-reference/metadata-api/source.mdx#metadata-pg-add-source) | [pg_add_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-add-source-syntax) | 1 | Add a Postgres database |
|
||||
| [pg_drop_source](/api-reference/metadata-api/source.mdx#metadata-pg-drop-source) | [pg_drop_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-drop-source-syntax) | 1 | Remove a Postgres database |
|
||||
| [pg_get_source_tables](/api-reference/metadata-api/source.mdx#metadata-pg-get-source-tables) | [pg_get_source_tables_args](/api-reference/metadata-api/source.mdx#metadata-pg-get-source-tables-syntax) | 1 | List all tables available on a given Postgres database |
|
||||
| [pg_track_table](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table) | [pg_track_table_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-table-syntax) | 1 | Add a Postgres table/view with configuration |
|
||||
| [pg_track_tables](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-tables) | [pg_track_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-track-tables-syntax) | 1 | Add multiple Postgres tables/views with configuration |
|
||||
| [pg_untrack_table](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table) | [pg_untrack_table_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-table-syntax) | 1 | Remove a Postgres table/view |
|
||||
| [pg_untrack_tables](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-tables) | [pg_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-untrack-tables-syntax) | 1 | Remove multiple Postgres tables/views |
|
||||
| [pg_update_source](/api-reference/metadata-api/source.mdx#metadata-pg-update-source) | [pg_update_source_args](/api-reference/metadata-api/source.mdx#metadata-pg-update-source-syntax) | 1 | Update a Postgres database |
|
||||
| [pg_set_table_customization](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-customization) | [pg_set_table_customization_args](/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](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-table-is-enum) | [pg_set_table_is_enum_args](/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](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function) | [pg_track_function_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-track-function-syntax) | 1 | Add a Postgres SQL function with configuration |
|
||||
| [pg_untrack_function](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function) | [pg_untrack_function_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-untrack-function-syntax) | 1 | Remove a Postgres SQL function |
|
||||
| [pg_set_function_customization](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-set-function-customization) | [pg_set_function_customization_args](/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](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission) | [pg_create_function_permission_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-create-function-permission-syntax) | 1 | Create a Postgres function permission |
|
||||
| [pg_drop_function_permission](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission) | [pg_drop_function_permission_args](/api-reference/metadata-api/custom-functions.mdx#metadata-pg-drop-function-permission-syntax) | 1 | Drop an existing Postgres function permission |
|
||||
| [pg_create_object_relationship](/api-reference/metadata-api/relationship.mdx#metadata-pg-create-object-relationship) | [pg_create_object_relationship_args](/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](/api-reference/metadata-api/relationship.mdx#metadata-pg-create-array-relationship) | [pg_create_array_relationship_args](/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](/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship) | [pg_drop_relationship_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-drop-relationship-syntax) | 1 | Drop an existing Postgres relationship |
|
||||
| [pg_rename_relationship](/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship) | [pg_rename_relationship_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-rename-relationship-syntax) | 1 | Modify name of an existing Postgres relationship |
|
||||
| [pg_set_relationship_comment](/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment) | [pg_set_relationship_comment_args](/api-reference/metadata-api/relationship.mdx#metadata-pg-set-relationship-comment-syntax) | 1 | Set comment on an existing Postgres relationship |
|
||||
| [pg_add_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-pg-add-computed-field) | [pg_add_computed_field_args](/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](/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field) | [pg_drop_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-pg-drop-computed-field-syntax) | 1 | Drop a Postgres computed field |
|
||||
| [pg_create_insert_permission](/api-reference/metadata-api/permission.mdx#metadata-pg-create-insert-permission) | [pg_create_insert_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-insert-permission) | [pg_drop_insert_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-select-permission) | [pg_create_select_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-select-permission) | [pg_drop_select_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-update-permission) | [pg_create_update_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-update-permission) | [pg_drop_update_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-create-delete-permission) | [pg_create_delete_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-drop-delete-permission) | [pg_drop_delete_permission_args](/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](/api-reference/metadata-api/permission.mdx#metadata-pg-set-permission-comment) | [pg_set_permission_comment_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-create-event-trigger) | [pg_create_event_trigger_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-delete-event-trigger) | [pg_delete_event_trigger_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-redeliver-event) | [pg_redeliver_event_args](/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](/api-reference/metadata-api/event-triggers.mdx#metadata-pg-invoke-event-trigger) | [pg_invoke_event_trigger_args](/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_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-apollo-federation-config) | [pg_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked postgres table |
|
||||
| [pg_test_connection_template](/api-reference/metadata-api/table-view.mdx#metadata-pg-test-connection-template) | [pg_test_connection_template_args](/api-reference/metadata-api/table-view.mdx#metadata-pg-test-connection-template-syntax) | 1 | Test connection template |
|
||||
| [pg_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-pg-track-logical-model) | [pg_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [pg_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-pg-untrack-logical-model) | [pg_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [pg_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-pg-create-logical-model-select-permission) | [pg_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [pg_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-pg-drop-logical-model-select-permission) | [pg_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-pg-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [pg_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-pg-track-native-query) | [pg_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-pg-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [pg_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-pg-untrack-native-query) | [pg_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-pg-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [bigquery_track_table](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table) | [bigquery_track_table_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-table-syntax) | 1 | Add a BigQuery table/view with configuration |
|
||||
| [bigquery_track_tables](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-tables) | [bigquery_track_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-track-tables-syntax) | 1 | Add multiple BigQuery tables/views with configuration |
|
||||
| [bigquery_untrack_table](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table) | [bigquery_untrack_table_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-table-syntax) | 1 | Remove a BigQuery table/view |
|
||||
| [bigquery_untrack_tables](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-tables) | [bigquery_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-untrack-tables-syntax) | 1 | Remove multiple BigQuery tables/views |
|
||||
| [bigquery_set_table_customization](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization) | [bigquery_set_table_customization_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-table-customization-syntax) | 1 | Set table customization of an already tracked BigQuery table |
|
||||
| [bigquery_add_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field) | [bigquery_add_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-add-computed-field-syntax) | 1 | Add a computed field to a BigQuery table |
|
||||
| [bigquery_drop_computed_field](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field) | [bigquery_drop_computed_field_args](/api-reference/metadata-api/computed-field.mdx#metadata-bigquery-drop-computed-field-syntax) | 1 | Drop a BigQuery computed field |
|
||||
| [bigquery_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-apollo-federation-config) | [bigquery_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-bigquery-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked bigquery table |
|
||||
| [bigquery_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-track-logical-model) | [bigquery_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [bigquery_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-untrack-logical-model) | [bigquery_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [bigquery_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-create-logical-model-select-permission) | [bigquery_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [bigquery_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-drop-logical-model-select-permission) | [bigquery_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-bigquery-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [bigquery_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-track-native-query) | [bigquery_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [bigquery_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-untrack-native-query) | [bigquery_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-bigquery-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [mssql_add_source](/api-reference/metadata-api/source.mdx#mssql-add-source) | [mssql_add_source_args](/api-reference/metadata-api/source.mdx#mssql-add-source-syntax) | 1 | Add an MS SQL Server database |
|
||||
| [mssql_drop_source](/api-reference/metadata-api/source.mdx#mssql-drop-source) | [mssql_drop_source_args](/api-reference/metadata-api/source.mdx#mssql-drop-source-syntax) | 1 | Remove an MS SQL Server database |
|
||||
| [mssql_get_source_tables](/api-reference/metadata-api/source.mdx#mssql-get-source-tables) | [mssql_get_source_tables_args](/api-reference/metadata-api/source.mdx#mssql-get-source-tables-syntax) | 1 | List all tables available on a given MS SQL Server database |
|
||||
| [mssql_track_table](/api-reference/metadata-api/table-view.mdx#mssql-track-table) | [mssql_track_table_args](/api-reference/metadata-api/table-view.mdx#mssql-track-table-syntax) | 1 | Add an MS SQL Server table/view with configuration |
|
||||
| [mssql_track_tables](/api-reference/metadata-api/table-view.mdx#mssql-track-tables) | [mssql_track_tables_args](/api-reference/metadata-api/table-view.mdx#mssql-track-tables-syntax) | 1 | Add multiple MS SQL Server tables/views with configuration |
|
||||
| [mssql_untrack_table](/api-reference/metadata-api/table-view.mdx#mssql-untrack-table) | [mssql_untrack_table_args](/api-reference/metadata-api/table-view.mdx#mssql-untrack-table-syntax) | 1 | Remove an MS SQL Server table/view |
|
||||
| [mssql_untrack_tables](/api-reference/metadata-api/table-view.mdx#mssql-untrack-tables) | [mssql_untrack_tables_args](/api-reference/metadata-api/table-view.mdx#mssql-untrack-tables-syntax) | 1 | Remove multiple MS SQL Server tables/views |
|
||||
| [mssql_update_source](/api-reference/metadata-api/source.mdx#mssql-update-source) | [mssql_update_source_args](/api-reference/metadata-api/source.mdx#mssql-update-source-syntax) | 1 | Update an MS SQL Server database |
|
||||
| [mssql_create_object_relationship](/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship) | [mssql_create_object_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-create-object-relationship-syntax) | 1 | Define a new object relationship between MS SQL Server tables/views |
|
||||
| [mssql_create_array_relationship](/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship) | [mssql_create_array_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-create-array-relationship-syntax) | 1 | Define a new array relationship between MS SQL Server tables/views |
|
||||
| [mssql_drop_relationship](/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship) | [mssql_drop_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-drop-relationship-syntax) | 1 | Drop an existing MS SQL Server relationship |
|
||||
| [mssql_rename_relationship](/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship) | [mssql_rename_relationship_args](/api-reference/metadata-api/relationship.mdx#mssql-rename-relationship-syntax) | 1 | Modify name of an existing MS SQL Server relationship |
|
||||
| [mssql_set_relationship_comment](/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment) | [mssql_set_relationship_comment_args](/api-reference/metadata-api/relationship.mdx#mssql-set-relationship-comment-syntax) | 1 | Set comment on an existing MS SQL Server relationship |
|
||||
| [mssql_set_table_customization](/api-reference/metadata-api/table-view.mdx#mssql-set-table-customization) | [mssql_set_table_customization_args](/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_insert_permission](/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission) | [mssql_create_insert_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-insert-permission-syntax) | 1 | Specify insert permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_insert_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-insert-permission) | [mssql_drop_insert_permission_args](/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_select_permission](/api-reference/metadata-api/permission.mdx#mssql-create-select-permission) | [mssql_create_select_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-select-permission-syntax) | 1 | Specify select permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_select_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-select-permission) | [mssql_drop_select_permission_args](/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_update_permission](/api-reference/metadata-api/permission.mdx#mssql-create-update-permission) | [mssql_create_update_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-update-permission-syntax) | 1 | Specify update permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_update_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission) | [mssql_drop_update_permission_args](/api-reference/metadata-api/permission.mdx#mssql-drop-update-permission-syntax) | 1 | Remove existing update permission for an MS SQL Server table/view |
|
||||
| [mssql_create_delete_permission](/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission) | [mssql_create_delete_permission_args](/api-reference/metadata-api/permission.mdx#mssql-create-delete-permission-syntax) | 1 | Specify delete permission for an MS SQL Server table/view |
|
||||
| [mssql_drop_delete_permission](/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission) | [mssql_drop_delete_permission_args](/api-reference/metadata-api/permission.mdx#mssql-drop-delete-permission-syntax) | 1 | Remove existing delete permission for an MS SQL Server table/view |
|
||||
| [mssql_set_permission_comment](/api-reference/metadata-api/permission.mdx#mssql-set-permission-comment) | [mssql_set_permission_comment_args](/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_set_apollo_federation_config](/api-reference/metadata-api/table-view.mdx#metadata-mssql-set-apollo-federation-config) | [mssql_set_apollo_federation_config_args](/api-reference/metadata-api/table-view.mdx#metadata-mssql-set-apollo-federation-config-syntax) | 1 | Set Apollo Federation configuration of an already tracked mssql table |
|
||||
| [mssql_track_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-track-logical-model) | [mssql_track_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-track-logical-model-syntax) | 1 | Add a Logical Model |
|
||||
| [mssql_untrack_logical_model](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-untrack-logical-model) | [mssql_untrack_logical_model_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-untrack-logical-model-syntax) | 1 | Remove a Logical Model |
|
||||
| [mssql_create_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-create-logical-model-select-permission) | [mssql_create_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-create-logical-model-select-permission-syntax) | 1 | Add select permissions for a Logical Model |
|
||||
| [mssql_drop_logical_model_select_permission](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-drop-logical-model-select-permission) | [mssql_drop_logical_model_select_permission_args](/api-reference/metadata-api/logical-models.mdx#metadata-mssql-drop-logical-model-select-permission-syntax) | 1 | Remove select permissions for a Logical Model |
|
||||
| [mssql_track_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-track-native-query) | [mssql_track_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-track-native-query-syntax) | 1 | Add a Native Query |
|
||||
| [mssql_untrack_native_query](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-untrack-native-query) | [mssql_untrack_native_query_args](/api-reference/metadata-api/native-queries.mdx#metadata-mssql-untrack-native-query-syntax) | 1 | Remove a Native Query |
|
||||
| [create_cron_trigger](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger) | [create_cron_trigger_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-cron-trigger-syntax) | 1 | Create a cron trigger |
|
||||
| [delete_cron_trigger](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger) | [delete_cron_trigger_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-cron-trigger-syntax) | 1 | Delete an existing cron trigger |
|
||||
| [get_cron_triggers](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-cron-triggers) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Returns all the cron triggers |
|
||||
| [get_scheduled_events](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-events) | [get_scheduled_events_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-events-syntax) | 1 | API to fetch scheduled events |
|
||||
| [get_scheduled_event_invocations](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-event-invocations) | [get_scheduled_event_invocations_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-get-scheduled-event-invocations-syntax) | 1 | API to fetch scheduled event's invocations |
|
||||
| [create_scheduled_event](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event) | [create_scheduled_event_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-create-scheduled-event-syntax) | 1 | Create a new scheduled event |
|
||||
| [delete_scheduled_event](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event) | [delete_scheduled_event_args](/api-reference/metadata-api/scheduled-triggers.mdx#metadata-delete-scheduled-event-syntax) | 1 | Delete a scheduled event |
|
||||
| [cleanup_event_trigger_logs](/api-reference/metadata-api/event-triggers.mdx#metadata-cleanup-event-trigger-logs) | [cleanup_event_trigger_logs_args](/api-reference/metadata-api/event-triggers.mdx#metadata-cleanup-event-trigger-logs-syntax) | 1 | Manually delete Event Trigger logs |
|
||||
| [resume_event_trigger_cleanups](/api-reference/metadata-api/event-triggers.mdx#metadata-resume-event-trigger-cleanups) | [resume_event_trigger_cleanups_args](/api-reference/metadata-api/event-triggers.mdx#metadata-resume-event-trigger-cleanups-syntax) | 1 | Resume log cleaner for Event Triggers |
|
||||
| [pause_event_trigger_cleanups](/api-reference/metadata-api/event-triggers.mdx#metadata-pause-event-trigger-cleanups) | [pause_event_trigger_cleanups_args](/api-reference/metadata-api/event-triggers.mdx#metadata-pause-event-trigger-cleanups-syntax) | 1 | Pause log cleaner for Event Triggers |
|
||||
| [add_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema) | [add_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-add-remote-schema-syntax) | 1 | Add a remote GraphQL server as a Remote Schema |
|
||||
| [update_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema) | [update_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-update-remote-schema-syntax) | 1 | Update the details for a Remote Schema |
|
||||
| [remove_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema) | [remove_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-remove-remote-schema-syntax) | 1 | Remove an existing Remote Schema |
|
||||
| [reload_remote_schema](/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema) | [reload_remote_schema_args](/api-reference/metadata-api/remote-schemas.mdx#metadata-reload-remote-schema-syntax) | 1 | Reload schema of an existing Remote Schema |
|
||||
| [add_remote_schema_permissions](/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-add-remote-schema-permissions) | [add_remote_schema_permissions](/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 |
|
||||
| [drop_remote_schema_permissions](/api-reference/metadata-api/remote-schema-permissions.mdx#metadata-drop-remote-schema-permissions) | [drop_remote_schema_permissions](/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_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship) | [pg_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-create-remote-relationship-syntax) | 1 | Create a remote relationship on a Postgres table |
|
||||
| [pg_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship) | [pg_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [pg_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship) | [pg_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-pg-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [citus_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship) | [citus_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-create-remote-relationship-syntax) | 1 | Create a remote relationship on a citus table |
|
||||
| [citus_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship) | [citus_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [citus_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship) | [citus_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-citus-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [mssql_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship) | [mssql_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-create-remote-relationship-syntax) | 1 | Create a remote relationship on an mssql table |
|
||||
| [mssql_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship) | [mssql_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [mssql_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship) | [mssql_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-mssql-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [bigquery_create_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship) | [bigquery_create_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-create-remote-relationship-syntax) | 1 | Create a remote relationship on a bigquery table |
|
||||
| [bigquery_update_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship) | [bigquery_update_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-update-remote-relationship-syntax) | 1 | Update an existing remote relationship |
|
||||
| [bigquery_delete_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship) | [bigquery_delete_remote_relationship_args](/api-reference/metadata-api/remote-relationships.mdx#metadata-bigquery-delete-remote-relationship-syntax) | 1 | Delete an existing remote relationship |
|
||||
| [create_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-create-remote-schema-remote-relationship) | [create_remote_schema_remote_relationship_args](/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 |
|
||||
| [update_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-update-remote-schema-remote-relationship) | [update_remote_schema_remote_relationship_args](/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 |
|
||||
| [delete_remote_schema_remote_relationship](/api-reference/metadata-api/remote-relationships.mdx#metadata-delete-remote-schema-remote-relationship) | [delete_remote_schema_remote_relationship_args](/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 |
|
||||
| [export_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Export the current Metadata |
|
||||
| [export_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-export-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 2 | Export existing Metadata with resource version included. |
|
||||
| [replace_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 1 | Import and replace existing Metadata |
|
||||
| [replace_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata) | [replace_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-replace-metadata-syntax) | 2 | Replace existing Metadata with check against current resource_version. |
|
||||
| [reload_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata) | [reload_metadata_args](/api-reference/metadata-api/manage-metadata.mdx#metadata-reload-metadata-syntax) | 1 | Reload changes to the underlying Postgres DB |
|
||||
| [clear_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-clear-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Clear/wipe-out the current Metadata state form server |
|
||||
| [get_inconsistent_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-get-inconsistent-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | List all inconsistent Metadata objects |
|
||||
| [drop_inconsistent_metadata](/api-reference/metadata-api/manage-metadata.mdx#metadata-drop-inconsistent-metadata) | [Empty Object](/api-reference/syntax-defs.mdx#empty-object) | 1 | Drop all inconsistent Metadata objects |
|
||||
| [create_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection) | [create_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-create-query-collection-syntax) | 1 | Create a query collection |
|
||||
| [rename_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-rename-query-collection) | [rename_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-rename-query-collection-syntax) | 1 | Rename a query collection |
|
||||
| [drop_query_collection](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection) | [drop_query_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-collection-syntax) | 1 | Drop a query collection |
|
||||
| [add_query_to_collection](/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection) | [add_query_to_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-add-query-to-collection-syntax) | 1 | Add a query to a given collection |
|
||||
| [drop_query_from_collection](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection) | [drop_query_from_collection_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-query-from-collection-syntax) | 1 | Drop a query from a given collection |
|
||||
| [add_collection_to_allowlist](/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist) | [add_collection_to_allowlist_args](/api-reference/metadata-api/query-collections.mdx#metadata-add-collection-to-allowlist-syntax) | 1 | Add a collection to the allow-list |
|
||||
| [drop_collection_from_allowlist](/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist) | [drop_collection_from_allowlist_args](/api-reference/metadata-api/query-collections.mdx#metadata-drop-collection-from-allowlist-syntax) | 1 | Drop a collection from the allow-list |
|
||||
| [set_custom_types](/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types) | [set_custom_types_args](/api-reference/metadata-api/custom-types.mdx#metadata-set-custom-types-syntax) | 1 | Set custom GraphQL types |
|
||||
| [create_action](/api-reference/metadata-api/actions.mdx#metadata-create-action) | [create_action_args](/api-reference/metadata-api/actions.mdx#metadata-create-action-syntax) | 1 | Create an action |
|
||||
| [drop_action](/api-reference/metadata-api/actions.mdx#metadata-drop-action) | [drop_action_args](/api-reference/metadata-api/actions.mdx#metadata-drop-action-syntax) | 1 | Drop an action |
|
||||
| [update_action](/api-reference/metadata-api/actions.mdx#metadata-update-action) | [update_action_args](/api-reference/metadata-api/actions.mdx#metadata-update-action-syntax) | 1 | Update an action |
|
||||
| [create_action_permission](/api-reference/metadata-api/actions.mdx#metadata-create-action-permission) | [create_action_permission_args](/api-reference/metadata-api/actions.mdx#metadata-create-action-permission-syntax) | 1 | Create an action permission |
|
||||
| [drop_action_permission](/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission) | [drop_action_permission_args](/api-reference/metadata-api/actions.mdx#metadata-drop-action-permission-syntax) | 1 | Drop an action permission |
|
||||
| [create_rest_endpoint](/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint) | [create_rest_endpoint_args](/api-reference/metadata-api/restified-endpoints.mdx#metadata-create-rest-endpoint-syntax) | 1 | Create a RESTified GraphQL Endpoint |
|
||||
| [drop_rest_endpoint](/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint) | [drop_rest_endpoint_args](/api-reference/metadata-api/restified-endpoints.mdx#metadata-drop-rest-endpoint-syntax) | 1 | Drop a RESTified GraphQL Endpoint |
|
||||
| [add_inherited_role](/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role) | [add_inherited_role_args](/api-reference/metadata-api/inherited-roles.mdx#metadata-add-inherited-role-syntax) | 1 | Add an inherited role |
|
||||
| [drop_inherited_role](/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role) | [drop_inherited_role_args](/api-reference/metadata-api/inherited-roles.mdx#metadata-drop-inherited-role-syntax) | 1 | Drop an inherited role |
|
||||
| [set_graphql_introspection_options](/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-introspection-options) | [set_graphql_schema_introspection_options_args](/api-reference/metadata-api/introspection.mdx#metadata-set-graphql-schema-introspection-options-syntax) | 1 | Set graphql introspection options |
|
||||
| [add_host_to_tls_allowlist](/api-reference/metadata-api/network.mdx#metadata-add-host-to-tls-allowlist) | [add_host_to_tls_allowlist_args](/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](/api-reference/metadata-api/network.mdx#metadata-drop-host-from-tls-allowlist) | [drop_host_from_tls_allowlist_args](/api-reference/metadata-api/network.mdx#drop-host-from-tls-allowlist-syntax) | 1 | Drop an endpoint from the TLS Allowlist |
|
||||
|
||||
<!--
|
||||
|
||||
|
@ -52,8 +52,9 @@ X-Hasura-Role: admin
|
||||
}
|
||||
```
|
||||
|
||||
The type of each field can be any valid [PostgreSQL data type](/schema/postgres/postgresql-types.mdx), and each field
|
||||
can be marked as nullable or not.
|
||||
The type of each field can be either a [PostgreSQL data type](/schema/postgres/postgresql-types.mdx)
|
||||
or references to other Logical Models, and each field can be marked as nullable or not, see
|
||||
[LogicalModelType](/api-reference/syntax-defs.mdx#logicalmodeltype).
|
||||
|
||||
### Args syntax {#metadata-pg-track-logical-model-syntax}
|
||||
|
||||
|
@ -47,6 +47,8 @@ X-Hasura-Role: admin
|
||||
"description": "<optional field description>"
|
||||
}
|
||||
},
|
||||
"array_relationships": <Native Query relationship>,
|
||||
"object_relationshps": <Native Query relationship>,
|
||||
"code": "<SQL query>",
|
||||
"returns": "<logical model name>"
|
||||
}
|
||||
@ -64,6 +66,10 @@ X-Hasura-Role: admin
|
||||
| code | true | String | The SQL to run on request |
|
||||
| returns | true | [LogicalModelName](/api-reference/syntax-defs.mdx#logicalmodelname) | Name of the logical model representing the resulting schema |
|
||||
|
||||
### Native Query relationships
|
||||
|
||||
See [Native Query relationship](/api-reference/syntax-defs.mdx#nativequeryrelationship).
|
||||
|
||||
## pg_untrack_native_query {#metadata-pg-untrack-native-query}
|
||||
|
||||
`pg_untrack_native_query` is used to remove a Native Query from the GraphQL schema.
|
||||
@ -108,7 +114,7 @@ X-Hasura-Role: admin
|
||||
"type": "query",
|
||||
"arguments": {
|
||||
"<name>": {
|
||||
"type": "<postgres field type>",
|
||||
"type": "<mssql field type>",
|
||||
"nullable": false | true,
|
||||
"description": "<optional field description>"
|
||||
}
|
||||
@ -174,7 +180,7 @@ X-Hasura-Role: admin
|
||||
"type": "query",
|
||||
"arguments": {
|
||||
"<name>": {
|
||||
"type": "<postgres field type>",
|
||||
"type": "<bigquery field type>",
|
||||
"nullable": false | true,
|
||||
"description": "<optional field description>"
|
||||
}
|
||||
|
@ -1251,12 +1251,36 @@ via [Custom Types](/api-reference/metadata-api/custom-types.mdx)
|
||||
|
||||
## LogicalModelField {#logicalmodelfield}
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
| ----------- | -------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------|
|
||||
| name | true | `String` | The name of the Logical Model field |
|
||||
| type | true | [Logical Model Type](#logicalmodeltype) | A Logical Model field type |
|
||||
| description | false | `String` | An extended description of the field |
|
||||
|
||||
## LogicalModelType {#logicalmodeltype}
|
||||
|
||||
A Logical Model type is one of either:
|
||||
|
||||
A scalar:
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
| ----------- | -------- | --------- | ------------------------------------------------------------------------------------------------|
|
||||
| name | true | `String` | The name of the logical model field |
|
||||
| type | true | `String` | The type of the exposed column, according to the underlying data source |
|
||||
| scalar | true | `String` | The type of the exposed column, according to the underlying data source |
|
||||
| nullable | false | `Boolean` | True if the field should be exposed over the GraphQL API as a nullable field (default: `false`) |
|
||||
| description | false | `String` | An extended description of the field |
|
||||
|
||||
An array:
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
| ----------- | -------- | --------- | ------------------------------------------------------------------------------------------------|
|
||||
| array | true | [Logical Model Type](#logicalmodeltype) | A Logical Model type, which this denotes an array of |
|
||||
| nullable | false | `Boolean` | True if the field should be exposed over the GraphQL API as a nullable field (default: `false`) |
|
||||
|
||||
A reference to another logical model:
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
| ----------- | -------- | --------- | -------------------------------------------------------------------------------------------------------|
|
||||
| logical_model | true | [Logical Model Type](#logicalmodeltype) | A Logical Model type, which this refers to. Recursive and mutually recursive references are permitted. |
|
||||
| nullable | false | `Boolean` | True if the field should be exposed over the GraphQL API as a nullable field (default: `false`) |
|
||||
|
||||
## NativeQueryArgument {#nativequeryargument}
|
||||
|
||||
@ -1266,6 +1290,13 @@ via [Custom Types](/api-reference/metadata-api/custom-types.mdx)
|
||||
| nullable | false | `Boolean` | True if the underlying column is nullable (default: `false`) |
|
||||
| description | false | `String` | An extended description of the argument |
|
||||
|
||||
## NativeQueryRelationship {#nativequeryrelationship}
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
| --------------- | -------- | ------------------------------------- | ---------------------------------------------------------------- |
|
||||
| remote_native_query | true | `String` | The Native Query to which the relationship has to be established |
|
||||
| column_mapping | true | Object (local-column : remote-column) | Mapping of columns from current table to remote table |
|
||||
|
||||
## Stored Procedure Argument {#stored-procedure-argument}
|
||||
|
||||
| Key | Required | Schema | Description |
|
||||
|
@ -22,7 +22,7 @@ import ProductBadge from '@site/src/components/ProductBadge';
|
||||
|
||||
:::tip Supported from
|
||||
|
||||
Native queries are supported from `v2.26.0`.
|
||||
Logical Models are supported from `v2.26.0`.
|
||||
|
||||
:::
|
||||
|
||||
@ -62,7 +62,7 @@ X-Hasura-Role: admin
|
||||
"fields": [
|
||||
{
|
||||
"name": "<field name>",
|
||||
"type": "<PostgreSQL field type>",
|
||||
"type": "<PostgreSQL Logical Model type>",
|
||||
"nullable": false | true,
|
||||
"description": "<optional field description>"
|
||||
},
|
||||
@ -75,8 +75,9 @@ X-Hasura-Role: admin
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
The type of each field can be any valid [PostgreSQL data type](/schema/postgres/postgresql-types.mdx), and each field
|
||||
can be marked as nullable or not.
|
||||
The type of each field can be either a [PostgreSQL data type](/schema/postgres/postgresql-types.mdx)
|
||||
or references to other Logical Models, and each field can be marked as nullable or not, see
|
||||
[LogicalModelType](/api-reference/syntax-defs.mdx#logicalmodeltype).
|
||||
|
||||
For example, we could track a representation of an article as follows:
|
||||
|
||||
@ -96,24 +97,39 @@ X-Hasura-Role: admin
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "integer"
|
||||
"type":
|
||||
{
|
||||
"scalar": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"type": "text"
|
||||
"type":
|
||||
{
|
||||
"scalar": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents",
|
||||
"type": "text"
|
||||
"type":
|
||||
{
|
||||
"scalar": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "published_date",
|
||||
"type": "published_date",
|
||||
"nullable": true
|
||||
"type":
|
||||
{
|
||||
"scalar": "date",
|
||||
"nullable": true
|
||||
},
|
||||
},
|
||||
{
|
||||
"name": "is_published",
|
||||
"type": "boolean"
|
||||
"type":
|
||||
{
|
||||
"scalar": "boolean"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -176,6 +192,110 @@ X-Hasura-Role: admin
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Referencing other logical models {#referencing-other-logical-models}
|
||||
|
||||
Logical Model fields are allowed to refer to other Logical Models, even recursively, allowing nested data types.
|
||||
|
||||
Object or array relationships between Native Queries are an example use of this.
|
||||
|
||||
To elaborate on the "article" example above, we can include authors in the data model:
|
||||
|
||||
<Tabs groupId="user-preference" className="api-tabs">
|
||||
<TabItem value="api" label="API">
|
||||
|
||||
```http
|
||||
POST /v1/metadata HTTP/1.1
|
||||
Content-Type: application/json
|
||||
X-Hasura-Role: admin
|
||||
|
||||
{
|
||||
"type": "bulk",
|
||||
"args":
|
||||
[
|
||||
{
|
||||
"type": "pg_track_logical_model",
|
||||
"args": {
|
||||
"source": "default",
|
||||
"name": "article",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type":
|
||||
{
|
||||
"scalar": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"type":
|
||||
{
|
||||
"scalar": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "contents",
|
||||
"type":
|
||||
{
|
||||
"scalar": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "author_id",
|
||||
"type":
|
||||
{
|
||||
"scalar": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "author",
|
||||
"type":
|
||||
{
|
||||
"logical_model": "author",
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "pg_track_logical_model",
|
||||
"args": {
|
||||
"source": "default",
|
||||
"name": "author",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type":
|
||||
{
|
||||
"scalar": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type":
|
||||
{
|
||||
"scalar": "text"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "articles",
|
||||
"type":
|
||||
{
|
||||
"array":
|
||||
{
|
||||
"logical_model": "article"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Permissions
|
||||
|
||||
By default, a model has no permissions, and only the admin account will be able to use it. You can enable the model by
|
||||
@ -278,7 +398,3 @@ X-Hasura-Role: admin
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Relationships
|
||||
|
||||
Currently, Logical Models do not support relationships. They will be supported in a future release.
|
||||
|
@ -276,6 +276,19 @@ X-Hasura-Role: admin
|
||||
"description": "<optional field description>"
|
||||
}
|
||||
},
|
||||
"array_relationships": [
|
||||
{
|
||||
"name": "<relationship name>",
|
||||
"using": {
|
||||
"column_mapping": {
|
||||
"<local column>": "<remote column>"
|
||||
},
|
||||
"remote_native_query: "<remote native query name>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"object_relationships": <same as array_relationships>,
|
||||
"description": "<text>",
|
||||
"code": "<SQL query>",
|
||||
"returns": "<logical model name>"
|
||||
}
|
||||
@ -345,3 +358,129 @@ A future release will allow mutations to be specified using native queries.
|
||||
Native queries will inherit the permissions of the Logical Model that they return. See the
|
||||
[documentation on Logical Models](/schema/postgres/logical-models/index.mdx) for an explanation of how to add
|
||||
permissions.
|
||||
|
||||
## Relationships
|
||||
|
||||
Relationships are supported between Native Queries.
|
||||
This is how Native Queries may implement object and array fields of their referenced Logical Model.
|
||||
|
||||
Unlike tables, relationships for a Native Query have to be given as part of
|
||||
tracking the Native Query: The schema of a Native Query is defined by its
|
||||
Logical Model, and the Native Query needs to implement all the fields of the
|
||||
Logical Model in order to be tracked successfully.
|
||||
|
||||
Currently relationships are only supported between Native Queries residing in the same source.
|
||||
|
||||
As an example, consider the following Native Queries which implement the data
|
||||
model of articles and authors given in the section on [Logical Model references](/schema/postgres/logical-models/index.mdx#referencing-other-logical-models):
|
||||
|
||||
<Tabs groupId="user-preference" className="api-tabs">
|
||||
<TabItem value="api" label="API">
|
||||
|
||||
```http
|
||||
POST /v1/metadata HTTP/1.1
|
||||
Content-Type: application/json
|
||||
X-Hasura-Role: admin
|
||||
|
||||
{
|
||||
"type": "bulk_atomic",
|
||||
"args":
|
||||
[
|
||||
{ "args": {
|
||||
"arguments": {
|
||||
"length": {
|
||||
"nullable": false,
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"array_relationships": [],
|
||||
"code": "
|
||||
SELECT
|
||||
id,
|
||||
title,
|
||||
(substring(content, 1, {{length}}) ||
|
||||
(CASE WHEN length(content) < {{length}}
|
||||
THEN '' ELSE '...' END))
|
||||
AS contents,
|
||||
date
|
||||
FROM article",
|
||||
"object_relationships": [
|
||||
{
|
||||
"name": "author",
|
||||
"using": {
|
||||
"column_mapping": {
|
||||
"author_id": "id"
|
||||
},
|
||||
"remote_native_query": "get_authors"
|
||||
}
|
||||
}
|
||||
],
|
||||
"returns": "article",
|
||||
"root_field_name": "get_articles",
|
||||
"source": "postgres",
|
||||
"type": "query"
|
||||
},
|
||||
"type": "pg_track_native_query"
|
||||
},
|
||||
,{ "args": {
|
||||
"arguments": {},
|
||||
"array_relationships": [
|
||||
{
|
||||
"name": "articles",
|
||||
"using": {
|
||||
"column_mapping": {
|
||||
"id": "author_id"
|
||||
},
|
||||
"remote_native_query": "get_articles"
|
||||
}
|
||||
}
|
||||
],
|
||||
"code": "SELECT * FROM authors",
|
||||
"object_relationships": [],
|
||||
"returns": "author",
|
||||
"root_field_name": "get_authors",
|
||||
"source": "postgres",
|
||||
"type": "query"
|
||||
},
|
||||
"type": "pg_track_native_query"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
:::info Wrap calls in `bulk_atomic`
|
||||
|
||||
Similar to Logical Models, tracking the Native Queries one-by-one would fail,
|
||||
since `get_articles` refers to `get_authors`, which is not yet defined.
|
||||
|
||||
Tracking the Native Queries in one atomic operation postpones coherency checks
|
||||
until all models are tracked, which allows for mutual references.
|
||||
|
||||
:::
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="query" label="Query">
|
||||
The Native Queries in this example enable queries like:
|
||||
|
||||
```graphql
|
||||
query {
|
||||
get_authors
|
||||
{
|
||||
name
|
||||
|
||||
short_excerpt: articles(args: {length: 10})
|
||||
{
|
||||
title
|
||||
contents
|
||||
}
|
||||
|
||||
long_excerpt: articles(args: {length: 100})
|
||||
{
|
||||
title
|
||||
contents
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
Loading…
Reference in New Issue
Block a user