update_datasource_dataflow

DatasourcesApi.update_datasource_dataflow(datasource_id, id, role_id, content_type=None, action=None, datasource_flows_update=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Update a datasource dataflow

Updates an existing dataflow. The caller (identified by role_id) must have at least edit permission on the datasource (else AUTH-1012). Supports JDBC Bulkload, JDBC Advanced Load, SaaS, Streams, and ArcGIS. For JDBC Bulkload and Advanced Load, query action=update-dataflow is required. JDBC Bulkload also supports action=reload-tables. SaaS, Streams, and ArcGIS do not use the action query param.

Parameters:
  • datasource_id (str) – UUID of the parent datasource. Rejected with IPV-1045 if missing. Advanced Load / ArcGIS disabled by admin return DTSC-1025. (required)

  • id (str) – UUID of the dataflow (DataflowId). Rejected with IPV-1045 if missing. (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to with at least edit access on the datasource. (required)

  • content_type (str)

  • action (str) – Required for JDBC Bulkload and JDBC Advanced Load. update-dataflow updates configuration. reload-tables (Bulkload only) reloads up to 10 tables via body.ReloadTables. Not used for SaaS, Streams, or ArcGIS.

  • datasource_flows_update (DatasourceFlowsUpdate)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

UpdateDatasourceDataflowResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /datasources/{datasource_id}/dataflows/{id}

Request

JDBC Bulkload action=update-dataflow (body keys vary by type)

{
  "DataflowConfig": {
    "SharedInstance": "yes"
  },
  "DatasetDetails": [
    {
      "SchemaName": "sales",
      "TableName": "orders",
      "DatasetName": "orders",
      "Domain": "sales",
      "Keywords": [
        "orders"
      ]
    }
  ]
}

Success (HTTP 200)

Update accepted. Typical messages: “Successfully triggered dataflow updation and is running in background” (JDBC Bulk/Advanced async; ArcGIS when new datasets are registered), “Successfully updated dataflow” (SaaS/Streams/ArcGIS sync), “Successfully triggered dataflow reload tables” (Bulk reload-tables).

JDBC Bulkload / Advanced Load update-dataflow

{
  "Message": "Successfully triggered dataflow updation and is running in background"
}

SaaS, Streams, or ArcGIS sync update

{
  "Message": "Successfully updated dataflow"
}

JDBC Bulkload action=reload-tables

{
  "Message": "Successfully triggered dataflow reload tables"
}

Errors

Documented error codes: IPV-1045, AUTH-1012, GE-1043, IPV-1046, IPV-1001, IPV-1004, GE-1020.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: IPV-1045 (missing action for JDBC, or invalid input), AUTH-1012 (no edit access), GE-1043 (invalid dataflow state or metadata update already in progress), IPV-1046 (Streams AWSConsole edit limits), IPV-1001 / IPV-1004 (Streams validation).

JDBC missing query action

{
  "Message": "IPV-1045 - Invalid parameter - query_param `action`, value either missing or is invalid."
}

Caller lacks edit access

{
  "Message": "AUTH-1012 - User: user1 requires at least edit access on the resource to perform this action."
}

Dataflow not in an updatable state

{
  "Message": "GE-1043 - Invalid dataflow state, dataflow can be updated only in state ['running', 'terminated', 'failed', 'ready', ...]"
}

Metadata update already in progress

{
  "Message": "GE-1043 - A metadata update is already in progress for this dataflow. Please wait for it to complete before submitting another update."
}

HTTP 500

Backend failure. Body is {“Message”: “<CODE> - <text>”}. Example: GE-1020 (failed to persist ArcGIS dataflow update).

Failed to update dataflow record

{
  "Message": "GE-1020 - Unable to update Dataflows table, please retry or contact administrator"
}