Dataiku Documentation
  • Discussions
    • Setup & Configuration
    • Using Dataiku DSS
    • Plugins & Extending Dataiku DSS
    • General Discussion
    • Job Board
    • Community Resources
    • Product Ideas
  • Knowledge
    • Getting Started
    • Knowledge Base
    • Documentation
  • Academy
    • Quick Start Programs
    • Learning Paths
    • Certifications
    • Course Catalog
    • Academy Discussions
  • Community Programs
    • Upcoming User Events
    • Find a User Group
    • Past Events
    • Community Conundrums
    • Dataiku Neurons
    • Banana Data Podcast
  • What's New
  • User's Guide
  • DSS concepts
  • Connecting to data
  • Exploring your data
  • Schemas, storage types and meanings
  • Data preparation
  • Charts
  • Interactive statistics
  • Machine learning
  • The Flow
  • Visual recipes
  • Recipes based on code
  • Code notebooks
  • MLOps
  • Webapps
  • Code Studios
  • Code reports
  • Dashboards
  • Workspaces
  • Dataiku Applications
  • Working with partitions
  • DSS and SQL
  • DSS and Python
  • DSS and R
  • DSS and Spark
  • Code environments
  • Collaboration
  • Specific Data Processing
  • Time Series
  • Geographic data
  • Text & Natural Language Processing
  • Images
  • Audio
  • Video
  • Automation & Deployment
  • Automation scenarios, metrics, and checks
  • Production deployments and bundles
  • API Node & API Deployer: Real-time APIs
  • Governance
  • APIs
  • Python APIs
    • Using the APIs inside of DSS
    • Using the APIs outside of DSS
    • Datasets (introduction)
    • Datasets (reading and writing data)
    • Datasets (other operations)
    • Datasets (reference)
    • Feature Store
    • Managed folders
    • Streaming Endpoints
    • Interaction with Pyspark
    • The main DSSClient class
    • Projects
    • Project folders
    • Project libraries
    • Recipes
    • Interaction with saved models
    • Scenarios
    • Scenarios (in a scenario)
    • Flow creation and management
    • Machine learning
    • Experiment Tracking
    • Statistics worksheets
    • Code studios
    • API Designer & Deployer
    • Project Deployer
    • Static insights
    • Jobs
    • Authentication information and impersonation
    • Importing tables as datasets
    • Wikis
    • Discussions
    • Performing SQL, Hive and Impala queries
    • SQL Query
    • Meanings
    • Users and groups
    • Connections
    • Code envs
    • Other topics
    • Plugins
    • Macros
    • Dataiku applications
    • Metrics and checks
    • Model Evaluation Stores
    • Other administration tasks
    • Utilities
    • Reference API documentation of dataiku
    • Reference API documentation of dataikuapi
    • Other topics
    • API for plugin components
    • Clusters
    • Code studios
    • API for Fleet Manager
    • API for Dataiku Govern
      • The main GovernClient class
      • Govern Blueprints and Blueprint versions
      • Govern Artifacts
      • Govern Uploaded Files
      • Govern Time series
      • Govern Artifact Search
        • Search for all the Govern Project artifacts
        • Reference API doc
      • Govern Blueprint Designer
      • Govern Roles and Permissions Handler
      • Authentication information and impersonation
      • Users and groups
      • Other administration tasks
      • Govern Custom Pages
      • Govern Custom Pages Handler
      • Utilities
    • Workspaces
    • Webapps
  • R API
  • Public REST API
  • Additional APIs
  • Installation & Administration
  • Installing and setting up
  • Elastic AI computation
  • DSS in the cloud
  • DSS and Hadoop
  • Metastore catalog
  • Operating DSS
  • Security
  • User Isolation
  • Other topics
  • Plugins
  • Streaming data
  • Formula language
  • Custom variables expansion
  • Sampling methods
  • Accessibility
  • Troubleshooting
  • Release notes
  • Other Documentation
  • Third-party acknowledgements
Dataiku DSS
You are viewing the documentation for version 11 of DSS.
  • »
  • Python APIs »
  • API for Dataiku Govern »
  • Govern Artifact Search

Govern Artifact Search¶

The artifact search handler is used to search among artifacts.

Search for all the Govern Project artifacts¶

import dataikuapi
from dataikuapi.govern.artifact_search import GovernArtifactSearchQuery, GovernArtifactFilterBlueprints

host = "http(s)://DSS_HOST:DSS_PORT"
apiKey = "Your API key secret"
client = dataikuapi.GovernClient(host, apiKey)

# build a query
govern_projects_query = GovernArtifactSearchQuery(artifact_filters=[GovernArtifactFilterBlueprints(blueprint_ids=['bp.system.govern_project'])])

# build a request
request = client.new_artifact_search_request(govern_projects_query)

# perform the search (first batch)
result_1 = request.fetch_next_batch()

# continue the search (next batch)...
result_2 = request.fetch_next_batch()

Reference API doc¶

class dataikuapi.govern.artifact_search.GovernArtifactSearchRequest(client, artifact_search_query)¶

A search request object. Do not create this directly, use new_artifact_search_request() and then run the query using fetch_next_batch()

fetch_next_batch(page_size=20)¶

Run the search request fetching the next batch of results. Use page_size to specify the size of the result page.

Parameters

page_size (int) – (Optional) size of the result page, default value is set to 20.

Returns

The response of a single fetch of the search request

Return type

a GovernArtifactSearchResponse

class dataikuapi.govern.artifact_search.GovernArtifactSearchResponse(client, response)¶

A search request response for a single batch. Do not create this directly, use fetch_next_batch().

get_raw()¶

Get the raw content of the search response

Returns

the raw content of the search response as a dict

Return type

dict

get_response_hits()¶

Get the search response hits (artifacts)

Returns

list of the search response hits (artifacts)

Return type

list of GovernArtifactSearchResponseHit

class dataikuapi.govern.artifact_search.GovernArtifactSearchResponseHit(client, hit)¶

A search request response. Do not create this directly, use get_response_hits().

get_raw()¶

Get the raw content of the search response hit

Returns

the raw content of the search response hit as a dict

Return type

dict

to_artifact()¶

Gets the GovernArtifact corresponding to this search response hit

Returns

the custom page object

Return type

a GovernArtifact

class dataikuapi.govern.artifact_search.GovernArtifactSearchQuery(artifact_search_source=None, artifact_filters=None, artifact_search_sort=None)¶

A definition of an artifact query. Instantiate and interact with this object to customize the query.

Parameters
  • artifact_search_source (GovernArtifactSearchSource) – (Optional) The search source to target a subset of artifacts. For now, by default, the search will be executed on all artifacts using the GovernArtifactSearchSourceAll search source.

  • artifact_filters (list of GovernArtifactFilter) – A list of filters to apply on the query.

  • artifact_search_sort (GovernArtifactSearchSort) – The sort configuration to apply on the query

set_artifact_search_source(artifact_search_source)¶

Set a search source for this query

Parameters

artifact_search_source (GovernArtifactSearchSource) – (Optional) The search source to target a subset of artifacts. For now, by default, the search will be executed on all artifacts using the GovernArtifactSearchSourceAll search source.

Returns

None

clear_artifact_filters()¶

Remove the filters set for this query

Returns

None

add_artifact_filter(artifact_filter)¶

Add a new artifact filter to the filter list of the query.

Parameters

artifact_filter (GovernArtifactFilter) – A filter to add to the filter list.

Returns

None

clear_artifact_search_sort()¶

Remove the sort configuration of this query.

Returns

None

set_artifact_search_sort(artifact_search_sort)¶

Set a new search sort configuration for this request.

Parameters

artifact_search_sort (GovernArtifactSearchSort) – The sort configuration to apply on the query

Returns

None

build()¶
Returns

the search query definition

Return type

(dict, dict)

class dataikuapi.govern.artifact_search.GovernArtifactSearchSource(search_source_type)¶

An abstract class to represent the different search source. Do not instantiate this class but one of its subclasses.

build()¶
class dataikuapi.govern.artifact_search.GovernArtifactSearchSourceAll¶

A generic search source definition.

build()¶
Returns

the search source definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactSearchSort(artifact_search_sort_type, direction)¶

An abstract class to represent the different search sort. Do not instantiate this class but one of its subclasses.

build()¶
class dataikuapi.govern.artifact_search.GovernArtifactSearchSortName(direction='ASC')¶

An artifact sort definition based on their names.

Parameters

direction (str) – (Optional) The direction on which the artifacts will be sorted. Can be either “ASC” or “DESC”

build()¶
Returns

the search sort definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactSearchSortWorkflow(direction='ASC')¶

An artifact sort defintion based on their workflow.

Parameters

direction (str) – (Optional) The direction on which the artifacts will be sorted. Can be either “ASC” or “DESC”

build()¶
Returns

the search sort definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactSearchSortField(fields=None, direction='ASC')¶

An artifact sort definition based on a list of fields.

Parameters
  • fields (list of dict) – (Optional) A list of fields on which the artifacts will be sorted. Use build() to build a field based sort definition.

  • direction (str) – (Optional) The direction on which the artifacts will be sorted. Can be either “ASC” or “DESC”

build()¶
Returns

the search sort definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactSearchSortFieldDefinition(blueprint_id, field_id)¶

A field sort definition builder to use in a search query in order to sort on a field of a blueprint.

Parameters
  • blueprint_id (str) – the Blueprint ID

  • field_id (str) – the field ID

build()¶
Returns

the field search sort definition

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactFilter(filter_type)¶

An abstract class to represent artifact filters. Do not instance this class but one of its subclasses.

build()¶
class dataikuapi.govern.artifact_search.GovernArtifactFilterBlueprints(blueprint_ids=None)¶

An artifact filter definition based on a list of specific blueprints.

Parameters
  • blueprint_ids – (Optional) the list of blueprint IDs to use to filter the artifacts

  • blueprint_ids – lsit of str

build()¶
Returns

the artifact filter definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactFilterBlueprintVersions(blueprint_version_ids=None)¶

An artifact filter definition based on a list of specific blueprint versions.

Parameters

blueprint_version_ids (list of dict) – (Optional) the list of blueprint version IDs to use to filter the artifacts. Use build() to build a blueprint version ID definition.

build()¶
Returns

the artifact filter definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactFilterArtifacts(artifact_ids=None)¶

An artifact filter definition based on a list of specific artifacts.

Parameters

artifact_ids (list of str) – (Optional) the list of artifacts IDs to use to filter the artifacts.

build()¶
Returns

the artifact filter definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactFilterFieldValue(condition_type, condition=None, field_id=None, negate_condition=None, case_sensitive=None)¶

An artifact filter definition based on specific fields value.

Parameters
  • condition_type (str) – the condition type of the filter. Has to be chosen from EQUALS, CONTAINS, START_WITH, END_WITH.

  • condition (str) – (Optional) The value on which the condition will be applied.

  • field_id (str) – (Optional) The ID of the field on which the condition will be applied. If not specified the filter will apply on the name.

  • negate_condition (boolean) – (Optional) A boolean to negate the condition. By default, the condition is not negated.

  • case_sensitive (str) – (Optional) Can be used to activate case-sensitive filtering. By default, filters will not be case-sensitive.

build()¶
Returns

the artifact filter definition as a dict

Return type

dict

class dataikuapi.govern.artifact_search.GovernArtifactFilterArchivedStatus(is_archived)¶

An artifact filter definition based on the archived status.

Parameters

is_archived (boolean) – the value for filtering. If is_archived is set to True, all artifacts including archived ones will be part of the search result

build()¶
Returns

the artifact filter definition as a dict

Return type

dict

Next Previous

© Copyright 2022, Dataiku

Built with Sphinx using a theme provided by Read the Docs.