transformation_projects
Creates, updates, deletes, gets or lists a transformation_projects resource.
Overview
| Name | transformation_projects |
| Type | Resource |
| Id | fivetran.transformations.transformation_projects |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for the transformation project within the Fivetran system |
created_by_id | string | The unique identifier for the actor (user or system key) within the Fivetran system |
group_id | string | The unique identifier for the group within the Fivetran system |
created_at | string (date-time) | The timestamp when the transformation project was created |
errors | array | The list of errors occurred during project processing and setup |
project_config | object | Depends on type (DBT_CORE). |
setup_tests | array | The setup tests results |
status | string | The status of transformation project (NOT_READY, READY, ERROR) |
type | string | Transformation project type (DBT_CORE) |
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier for the transformation project within the Fivetran system |
created_by_id | string | The unique identifier for the actor (user or system key) within the Fivetran system |
group_id | string | The unique identifier for the group within the Fivetran system |
created_at | string (date-time) | The timestamp when the transformation project was created |
type | string | Transformation project type (DBT_CORE) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project_id | Returns transformation project details if a valid identifier was provided. | |
list | select | cursor, limit | Returns a list of all transformation projects available via API within your Fivetran account. | |
create | insert | Creates a new transformation project. | ||
update | update | project_id | Updates transformation project if a valid identifier was provided. | |
delete | delete | project_id | Deletes transformation project if a valid identifier was provided. | |
test | exec | project_id | Triggers tests for an existing transformation project. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
project_id | string | The unique identifier for the transformation project within the Fivetran system |
cursor | string | Paging cursor, [read more about pagination](https://fivetran.com/docs/rest-api/pagination) |
limit | integer (int32) | Number of records to fetch per page. Accepts a number in the range 1..1000; the default value is 100. |
SELECT examples
- get
- list
Returns transformation project details if a valid identifier was provided.
SELECT
id,
created_by_id,
group_id,
created_at,
errors,
project_config,
setup_tests,
status,
type
FROM fivetran.transformations.transformation_projects
WHERE project_id = '{{ project_id }}' -- required
;
Returns a list of all transformation projects available via API within your Fivetran account.
SELECT
id,
created_by_id,
group_id,
created_at,
type
FROM fivetran.transformations.transformation_projects
WHERE "limit" = '{{ limit }}'
;
INSERT examples
- create
- Manifest
Creates a new transformation project.
INSERT INTO fivetran.transformations.transformation_projects (
group_id,
type,
run_tests,
project_config
)
SELECT
'{{ group_id }}',
'{{ type }}',
{{ run_tests }},
'{{ project_config }}'
RETURNING
id,
created_by_id,
group_id,
created_at,
errors,
project_config,
setup_tests,
status,
type
;
# Description fields are for documentation purposes
- name: transformation_projects
props:
- name: group_id
value: "{{ group_id }}"
description: |
The unique identifier for the group within the Fivetran system
- name: type
value: "{{ type }}"
description: |
Transformation project type
valid_values: ['DBT_CORE']
- name: run_tests
value: {{ run_tests }}
description: |
The boolean flag specifies if the project should be tested after creation or update operation
- name: project_config
description: |
Depends on `type` (DBT_CORE).
value:
dbt_version: "{{ dbt_version }}"
default_schema: "{{ default_schema }}"
git_remote_url: "{{ git_remote_url }}"
folder_path: "{{ folder_path }}"
git_branch: "{{ git_branch }}"
threads: {{ threads }}
target_name: "{{ target_name }}"
environment_vars:
- "{{ environment_vars }}"
UPDATE examples
- update
Updates transformation project if a valid identifier was provided.
UPDATE fivetran.transformations.transformation_projects
SET
run_tests = {{ run_tests }},
project_config = '{{ project_config }}'
WHERE
project_id = '{{ project_id }}' --required
RETURNING
id,
created_by_id,
group_id,
created_at,
errors,
project_config,
setup_tests,
status,
type;
DELETE examples
- delete
Deletes transformation project if a valid identifier was provided.
DELETE FROM fivetran.transformations.transformation_projects
WHERE project_id = '{{ project_id }}' --required
;
Lifecycle Methods
EXEC variables use wire (API) names.
- test
Triggers tests for an existing transformation project.
EXEC fivetran.transformations.transformation_projects.test
@project_id='{{ project_id }}' --required
;