Project

analyze.project.add_acl_group(project_id, group_id, role)

Adds a security group to the list of groups authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • group_id (int) – Unique security group identifier

  • role (str) – Project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.add_acl_member(project_id, member_id, role)

Adds a member to the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • member_id (int) – Unique member identifier

  • role (str) – Project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.add_data_share(project_id, grantee_id, role='read')

Adds a project to the data share access along with their access role

Parameters
  • project_id (str) – Unique granter project identifier

  • grantee_id (int) – Unique grantee project identifier

  • read (bool) – Project data access read allowed

  • write (bool) – Project data access for write allowed

Returns

None

analyze.project.add_label(project_id, label)

Sets a label on a project

Parameters
  • project_id (str) – Unique project identifier

  • label (str) – The label unique name

Returns

None

analyze.project.add_path(project_id, path)

Adds a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

Returns

None

analyze.project.add_paths(additions)

Adds multiple project reference paths in the hierarchy

Parameters

additions (list) – List of additional paths, containing: project_id (str): Unique editor identifier to_path (str): Destination path

Returns

None

analyze.project.archive(account_id, path, project_id)

Archives a project

Parameters
  • account_id (str) – the document account in which to save the archive

  • path (str) – the path within the document account to save the archive as, including file name

  • project_id (str) – the project to archive

Returns

None

analyze.project.copy(project_id, name, memo, access_type='public', include_data=False, update_references=True)

Makes a copy of a project in the same workspace

Parameters
  • project_id (str) – Unique project identifier to copy

  • name (str) – Project name for new project

  • memo (str) – Project memo for new project

  • access_type (str) – Access restriction type. Must be public, acl-user, or acl-group.

  • include_data (bool) – True if data should be copied to new project

  • update_references (bool) – Whether the project references should be updated

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.copy_directory(from_path, to_path)

Copies a folder and all paths in the hierarchy but does not duplicate referenced objects

Parameters
  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

Returns

None

analyze.project.create(name, memo, access_type='public', archive_account_id=None, archive_path=None, archive=None, environment_id='default', update_references=True, progress_id=None)

Creates the project

If acl-user is set for access_type, the user will be added to the ACL automatically.

If acl-group is set for access_type, all of the user’s current security groups will be added automatically.

To restore from an archive, you can use either archive_account_id and archive_path, or archive. Don’t use all three together.

Parameters
  • name (str) – Project name

  • memo (str) – Project memo

  • access_type (str) – Access restriction type. Must be public, acl-user, or acl-group.

  • archive_account_id (str) – If provided, a document account in which to look up an archive to restore

  • archive_path (str) – If provided, the document path at which to look up an archive to restore

  • archive (str) – If provided, a base64 encoded archive to restore

  • environment_id (str) – Data connection environment for project

  • update_references (bool) – Update the project references in the restored archive

  • progress_id (int) – Id of a progress window for a project archive restoration

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.create_directory(path)

Creates a folder in the project hierarchy

Parameters

path (str) – Path to directory

Returns

None

analyze.project.delete(project_id)

Deletes a project

Parameters

project_id (str) – Unique project identifier

Returns

Unique project identifier

Return type

str

analyze.project.delete_directory(path)

Deletes a folder and removes path from all objects in that directory

Parameters

path (str) – Path to directory

Returns

None

analyze.project.delete_log(project_id)

Clears the project log

Parameters

project_id (str) – Unique project identifier

Returns

None

analyze.project.disable(project_ids)

Disables a project or projects

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.enable(project_ids)

Enables a project or projects

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.flashback_backup(project_id)

Schedules a backup of the project

Parameters

project_id (str) – Unique project identifier

Returns

None

analyze.project.flashback_hold(project_id, version_id)

Puts a hold on a version to prevent lifecycle cleanup after retention period

Parameters
  • project_id (str) – Unique project identifier

  • version_id (str) – Version of the table to restore

Returns

None

analyze.project.flashback_projects(project_id)

Provides list of projects stored in flashback

Parameters

project_id (str) – Unique project identifier

Returns

List of projects

Return type

list

analyze.project.flashback_release(project_id, version_id)

Releases a hold on a version to allow lifecycle cleanup after retention period

Parameters
  • project_id (str) – Unique project identifier

  • version_id (str) – Version of the project to release

Returns

None

analyze.project.flashback_restore(project_id, version_id, target_project_id)

Restores project data to the target project specified

Parameters
  • project_id (str) – Unique project identifier

  • version_id (str) – Version of the project to restore

  • target_project_id (str) – Target project UUID

Returns

None

analyze.project.flashback_restore_project(project_id)

Schedules a restore of all projects in the project to their latest version stored

Parameters

project_id (str) – Unique project identifier

Returns

None

analyze.project.flashback_versions(project_id)

Provides list of versions of the project

Parameters

project_id (str) – Unique project identifier

Returns

List of project versions

Return type

list

analyze.project.get_acl_groups(project_id)

Gets the list of security groups authorized to access the project along with their project role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with group_id as key and project role as value

Return type

dict

analyze.project.get_acl_members(project_id)

Gets the list of members authorized to access the project along with their project role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with member_id as key and project role as value

Return type

dict

analyze.project.get_data_share_projects(project_id)

Gets the list of projects authorized to access the project data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

result tuple of dicts with the following properties
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • read (bool): Allow read access to project

  • write (bool): Allow write access to project

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.get_data_shares(project_id)

Gets the list of projects authorized to access the project data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

Dict with project_id as key and access roles as values

Return type

list

analyze.project.get_data_shares_authorized(project_id)

Gets the list of projects this project is authorized to share data along with their access role

Parameters

project_id (str) – Unique project identifier

Returns

result tuple of dicts with the following properties
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • read (bool): Allow read access

  • write (bool): Allow write access

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.get_database_user(project_id)

Returns the username and password of a database role capable of accessing the project’s database.

Parameters

project_id (str) – Unique project identifier

Returns

role authentication parameters
  • user (str): username for the role

  • pass (str): password for the role

Return type

dict

analyze.project.get_log(project_id)

Retrieves the full project log

Parameters

project_id (str) – Unique project identifier

Returns

List of log messages

Return type

list

analyze.project.get_report_user(project_id)

Returns the username and password of a database role capable of selecting from views in the reporting schema for a given project_id.

Parameters

project_id (str) – Unique project identifier

Returns

role authentication parameters
  • user (str): username for the role

  • pass (str): password for the role

Return type

dict

analyze.project.ids_from_path(path)

Provides the canonical id for the from a provided path

Parameters

path (str) – Object rollup path using unix style forward slashes

Returns

id (str): Project unique identifier

Return type

list

analyze.project.is_locked(project_id)

Returns True if project is locked else false

Parameters

project_id (str) – Unique project identifier

Returns

locked state

Return type

bool

analyze.project.labels(project_id)

Provides a list of labels for the project

Parameters

project_id (str) – Unique project identifier

Returns

list of labels associated with project

Return type

list

analyze.project.lock(project_ids)

Locks a project or projects from configuration changes

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.log(project_id, message, level='info')

Logs a project message

Parameters
  • project_id (str) – Unique project identifier

  • message (str) – Log message

  • level (str) – Notification level (info, debug, warn, error)

Returns

None

analyze.project.lookup_by_full_path(path)

Returns ID for path provided

Parameters

path (str) – Unique path to object

Returns

Project unique identifier

Return type

str

analyze.project.lookup_by_name(name)

Returns ID for name provided

Parameters

name (str) – Unique project name

Returns

Project unique identifier

Return type

str

analyze.project.members(project_id, details=False)

Gets the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • details (bool) – Include member profile details else just the UserIDs

Returns

List of Member IDs or Member Dicts if details is True

Return type

list

analyze.project.move_directory(from_path, to_path)

Updates a folder name in the hierarchy

Parameters
  • from_path (str) – Original directory path

  • to_path (str) – Destination directory path

Returns

None

analyze.project.move_path(project_id, from_path, to_path)

Moves a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • from_path (str) – Original path

  • to_path (str) – Destination path

Returns

None

analyze.project.move_paths(moves)

Moves multiple project reference paths in the hierarchy

Parameters

moves (list) – List of move dicts with the following keys: - project_id (str): Unique editor identifier - from_path (str): Original path - to_path (str): Destination path

Returns

None

analyze.project.my_role(auth_id, project_id)

Returns the requestors role for the project: explorer, manager, architect

Parameters

project_id (str) – Unique project identifier

Returns

Project role (explorer, manager, or architect)

Return type

str

analyze.project.paths(path=None)

Provides a list of paths for all projects

Parameters

path (str) – Initial path to search

Returns

List of Dicts consisting of:
  • path (str): Project leaf or branch path

  • type (str): leaf or branch to indicate the path type

  • id (str): For leaf type paths, the object the path points to

Return type

list

analyze.project.paths_from_id(project_id)

Provides a list of paths associated with the canonical id

Parameters

project_id (str) – Unique project identifier

Returns

List of paths that point to the project specified

Return type

list

analyze.project.project(project_id, keys=None details=False)

Returns the details of the specified project

Parameters
  • project_id (str) – Unique project identifier

  • keys (list) – List of keys to return. Defaults to all.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • tags (int): Number of tags

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

If details is set to True, the dict will also contain:
  • workflows (int): Number of workflows in this project

  • steps (int): Total number of steps in this project

  • tables (int): Total number of tables in this project

  • data (int): Total size of this project

  • variables (int): Number of variables in this project

Return type

dict

analyze.project.projects(sort=None, keys=None, details=False, id_filter=None, all_workspaces=False, member_details=False)

Returns the list of projects available

Parameters
  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

  • id_filter (list) – List or tuple of project ids to which to limit the results

  • all_workspaces (bool, optional) – If true then returns projects across all workspaces

  • member_details (bool, optional) – If True then returns member info relating to updated_by

Returns

result tuple of dicts with the following properties
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

If details is set to True, the dict will also contain:
  • workflows (int): Number of workflows in this project

  • steps (int): Total number of steps in this project

  • tables (int): Total number of tables in this project

  • data (int): Total size of this project

  • variables (int): Number of variables in this project

If member_details is set to True, the dict will also contain:
  • updated_by_full_name (str): The User Name of the user that last updated the project

  • updated_by_user_id (int): The id of the user that last updated the project

  • updated_by_gravatar_hash (str): Unique hash to pull gravatar for the user.

Return type

tuple

analyze.project.projects_from_path(path, sort=None, keys=None, details=False)

Provides list of projects based on a path fragment. Path fragment can be to parent level.

Parameters
  • path (str) – Object rollup path using unix style forward slashes

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

result list of dicts with the following properties
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.remove_acl_group(project_id, group_id)

Removes a security group from the list of groups authorized to access the project

Parameters
  • project_id (str) – Unique project identifier

  • group_id (int) – Unique security group identifier

Returns

None

analyze.project.remove_acl_member(project_id, member_id)

Removes a member from the list of members authorized to access the project

Parameters
  • project_id (str) – Unique project identifier

  • member_id (int) – Unique member identifier

Returns

None

analyze.project.remove_data_share(project_id, grantee_id)

Removes a project from the list of projects authorized to access the project data

Parameters
  • project_id (str) – Unique project identifier

  • grantee_id (int) – Unique grantee project identifier

Returns

None

analyze.project.remove_label(project_id, label)

Removes a label on a project

Parameters
  • project_id (str) – Unique project identifier

  • label (str) – The label unique name

Returns

None

analyze.project.remove_path(project_id, path)

Removes a project reference path in the hierarchy

Parameters
  • project_id (str) – Unique project identifier

  • path (str) – Object rollup path using unix style forward slashes

Returns

None

analyze.project.save_acl_groups(project_id, acl)

Saves the list of security groups authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • acl (dict) – Dict with group_id as key and project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.save_acl_members(project_id, acl)

Saves the list of members authorized to access the project along with their project role

Parameters
  • project_id (str) – Unique project identifier

  • acl (dict) – Dict with member_id as key and project role as value (‘architect’, ‘manager’, ‘explorer’)

Returns

None

analyze.project.save_data_shares(project_id, shares)

Saves the list of projects authorized to access the project data along with their access role

Parameters
  • project_id (str) – Unique project identifier

  • shares (dict) – Dict with project_id as key and boolean values for read and write keys

Returns

None

analyze.project.save_variable(project_id, variable_id, value=None, memo=None, view_manager=False, view_explorer=False)

Returns the list of variables in the project and their current values

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – Variable name

  • value (str) – Variable value. If None is passed, the variable is unset.

  • memo (str) – Variable description

  • view_manager (bool) – True if variable should be visible to manager roles

  • view_explorer (bool) – True if variable should be visible to explorer roles

Returns

result dict with
  • memo (str): Variable memo

  • value (str): Variable value

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.search_by_label(text, criteria='contains', sort=None, keys=None, details=False)

Returns list of projects that match the search criteria

Parameters
  • text (str) – The search text to locate

  • criteria (str) – The search criteria (contains, exact, startswith, or endswith)

  • sort (list) – List of sort tuples using syntax (key, reverse). e.g. [(‘name’, False)]

  • keys (list) – List of keys to return. Defaults to all.

  • details (bool) – If set to true, extra details about the project will be returned. Default False

Returns

result list of dicts with the following properties
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time project was created as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

list

analyze.project.set_variable(project_id, variable_id, value=None)

Returns the list of variables in the project and their current values

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – Variable name

  • value (str) – Variable value. If None is passed, the variable is unset.

Returns

result dict with
  • memo (str): Variable memo

  • value (str): Variable value

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.shift_down(project_ids, path)

Move the node below following node within the same generation If bottom within parent, it moves to the next parent below at the same generation as it’s parent (if there is one)

Parameters
  • project_ids (list) – List of Unique project identifier

  • path (str) – Current hierarchy path

Returns

New path or None if cannot be moved

Return type

str

analyze.project.shift_left(project_ids, path)

Move the node one generation up (if possible)

Parameters
  • project_ids (list) – List of Unique project identifier

  • path (str) – Current hierarchy path

Returns

New path or None if cannot be moved

Return type

str

analyze.project.shift_right(project_ids, path)

Move the node one generation down, looking upwards in the hierarchy for a suitable parent (if there is one)

Parameters
  • project_ids (list) – List of Unique project identifier

  • path (str) – Current hierarchy path

Returns

New path or None if cannot be moved

Return type

str

analyze.project.shift_up(project_ids, path)

Move the node above prior node within the same generation If top within parent, it moves to the next parent above at the same generation as it’s parent (if there is one)

Parameters
  • project_ids (list) – List of Unique project identifier

  • path (str) – Current hierarchy path

Returns

New path or None if cannot be moved

Return type

str

analyze.project.unlock(project_ids)

Unlocks a project or projects from configuration changes

Parameters

project_ids (str) – Unique project identifier or list of unique project identifiers

Returns

None

analyze.project.update(project_id, **kwargs)

Updates the project values specified

Parameters

project_id (str) – Unique project identifier

Kwargs:
  • name (str): Project name

  • memo (str): Project memo

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

Returns

result dict with
  • id (str): Unique project identifier

  • name (str): Project name

  • memo (str): Project description

  • backup_frequency (str): Backup frequency

  • backup_retention_policy (int): Number of days to retain backups

  • access_type (str): Access type

  • enabled (bool): True if the project is enabled

  • locked (bool): True if the project is locked from editing

  • environment_id (str): Data connection environment for project

  • update_time (str): Date and time data was updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.variable(project_id, variable_id)

Returns the variable details

Parameters
  • project_id (str) – Unique project identifier

  • variable_id (str) – The variable unique name

Returns

dict with the following properties
  • value (str): Current variable value

  • memo (str): Description of the variable

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict

analyze.project.variable_values(project_id)

Returns a key / value dict of variables and their values

Parameters

project_id (str) – Unique project identifier

Returns

key / value pair of variable name as key and variable value as the value

Return type

dict

analyze.project.variables(project_id)

Returns the dict of variables in the project and their current values

Parameters

project_id (str) – Unique project identifier

Returns

result dict of dicts with the following properties
  • value (str): Current variable value

  • memo (str): Description of the variable

  • view_manager (bool): True if variable is viewable by Manager role

  • view_explorer (bool): True if variable is viewable by Explorer role

  • update_time (timestamp): Date and time workflow was last updated as ISO 8601 compliant time

  • updated_by (int): User ID of last updater

Return type

dict