Page tree

 

As of Release 6.4, the v3 APIs are End of Life (EOL). Before using this release or a later one, you should migrate to using the latest available API version. For more information, see API Version Support Matrix.
Latest version of this endpoint: API JobGroups Put Publish v4.

Contents:


For a specified jobGroup, this endpoint performs an ad-hoc publish of the results to the designated target.

  • Target information is based on the specified connection.
  • Job results to published are based on the specified jobGroup. 

You can specify:

  • Database and table to which to publish
  • Type of action to be applied to the target table. Details are below.

Supported targets:

  • Hive
  • Redshift

For more information on jobGroups, see API JobGroups Get v3.

Version: v3

Required Permissions

NOTE: Each request to the Trifacta® platform must include authentication credentials. See API Authentication.

Request

Request Type: PUT

Endpoint:

/v3/jobGroups/<id>/publish

where:

ParameterDescription
<id>Internal identifier for the job group

Request URI - Example:

/v3/jobGroups/2/publish

Request Body:

{
  "connection": {
    "id": 1
  },
  "path": ["default"],
  "table": "test_table3",
  "action": "create",
  "inputFormat": "avro",
  "flowNodeId": 10
}

Response

Response Status Code - Success: 200 - OK

Response Body Example:

{
  "jobgroupId": 2,
  "jobIds": [
    11
  ],
  "reason": "JobStarted",
  "sessionId": "d9f13aa0-3b35-11e7-9bff-c764dff4fad8"
}

Reference

Request Reference:

PropertyDescription
connectionInternal identifier of the connection to use to write the results.
pathPath to the database to which to write the results.
tableName of table in the database to which to write the results.
action

Type of writing action to perform with the results. Supported actions:

  • create - Create a new table with each publication. This table is empty except for the schema, which is taken from the results. A new table receives a timestamp extension to its name.
  • load - Append a pre-existing table with the results of the data. The schema of the results and the table must match.
  • createAndLoad - Create a new table with each publication and load it with the results data. A new table receives a timestamp extension to its name.
  • truncateAndLoad - Truncate a pre-existing table and load it with fresh data from the results.
  • dropAndLoad - Drop the target table and load a new table with the schema and data from the results.
inputFormat

Source format of the results. Supported values:

Hive:

  • avro
  • pqt

Redshift:

NOTE: For results to be written to Redshift, the source must be stored in S3 and accessed through an S3 connection.

NOTE: By default, data is published to Redshift using the public schema. To publish using a different schema, preface the table value with the name of the schema to use: MySchema.MyTable.

 

  • csv
  • json
  • avro

 

For more information on the available status messages, see API JobGroups Get v3.

This page has no comments.