Update model
⚠️ DEPRECATED: This endpoint is deprecated and will be removed in a future version. Please migrate to the new Datasets API instead.
Update certain values of a specified model
Request schema
Path parameters
ID of the source
ID of the model
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
The name of this model.
The SQL query associated with this model.
The description for this model.
PATCH /api/v1/sources/{source_id}/models/{model_id} HTTP/1.1 Authorization: Bearer REPLACE_BEARER_TOKEN Content-Type: application/json Host: app.getcensus.com Content-Length: 147 { "name": "New App Users", "query": "SELECT * FROM \"users\"", "description": "Users that have signed up for our product in the last week." }
Responses
200
Outcome of the operation.
The type of this source object, will always be model.
The id of this model.
The name of this model.
The identifier for the dataset that corresponds to this model. A model will always have a corresponding dataset unless the model belongs to a dbt, looker, sigma recipe that has not been used in Census
The description for this model.
The SQL query associated with this model.
When this model was created.
When this model was last updated.
The compiled query associated with this model if it is built atop a DBT instance.
A list of columns from this model.
The name of the column.
The data type of the column.
[Deprecated] Identical to dataset_id but with a typo. Will be removed in a future version.
[Deprecated] The source object ID for this model. You can typically ignore this.
They key that can be used to check the status of the refresh job, which is run automatically when the model query is updated.
{ "status": "updated", "data": { "type": "model", "id": 18, "name": "New App Users", "dataset_id": 12, "description": "Users that have signed up for our product in the last week.", "query": "SELECT * FROM \"users\"", "created_at": "2021-10-20T02:43:07.120Z", "updated_at": "2021-10-20T02:50:35.477Z", "compiled_query": "string", "columns": [ { "name": "user_id", "type": "character varying (256)" }, { "name": "full_name", "type": "character varying (256)" } ], "dataset_id=": 12, "source_object_id": 20 }, "refresh_key": 1647978948 }