docs/docs/schema/bigquery/table-relationships/rename.mdx
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
An existing relationship can be renamed as follows:
<Tabs groupId="user-preference" className="api-tabs"> <TabItem value="console" label="Console">Data -> [table-name] -> Relationships in the ConsoleYou can rename a relationship by using the bigquery_rename_relationship metadata API:
POST /v1/metadata HTTP/1.1
Content-Type: application/json
X-Hasura-Role: admin
{
"type": "bigquery_rename_relationship",
"args": {
"source": "<db_name>",
"dataset": "bigquery",
"table": "articles",
"name": "article_details",
"new_name": "article_detail"
}
}
:::info Note
You might not be allowed to drop a relationship if it has been referenced elsewhere (e.g. in a permissions rule).
In this case you will have to delete the references first, rename the relationship, and then re-add the references.
:::