Data Ingestion¶
Raw¶
Databases¶
List databases¶
-
RawDatabasesAPI.
list
(limit: int = 25) → cognite.client.data_classes.raw.DatabaseList¶ -
Parameters: limit (int, optional) – Maximum number of databases to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items. Returns: List of requested databases. Return type: DatabaseList Examples
List the first 5 databases:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> db_list = c.raw.databases.list(limit=5)
Iterate over databases:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for db in c.raw.databases: ... db # do something with the db
Iterate over chunks of databases to reduce memory load:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for db_list in c.raw.databases(chunk_size=2500): ... db_list # do something with the dbs
Create new databases¶
-
RawDatabasesAPI.
create
(name: Union[str, List[str]]) → Union[cognite.client.data_classes.raw.Database, cognite.client.data_classes.raw.DatabaseList]¶ -
Parameters: name (Union[str, List[str]]) – A db name or list of db names to create. Returns: Database or list of databases that has been created. Return type: Union[Database, DatabaseList] Examples
Create a new database:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.raw.databases.create("db1")
Delete databases¶
-
RawDatabasesAPI.
delete
(name: Union[str, Sequence[str]], recursive: bool = False) → None¶ -
Parameters: - name (Union[str, Sequence[str]]) – A db name or list of db names to delete.
- recursive (bool) – Recursively delete all tables in the database(s).
Returns: None
Examples
Delete a list of databases:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> c.raw.databases.delete(["db1", "db2"])
Tables¶
List tables in a database¶
-
RawTablesAPI.
list
(db_name: str, limit: int = 25) → cognite.client.data_classes.raw.TableList¶ -
Parameters: - db_name (str) – The database to list tables from.
- limit (int, optional) – Maximum number of tables to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
Returns: List of requested tables.
Return type: Examples
List the first 5 tables:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> table_list = c.raw.tables.list("db1", limit=5)
Iterate over tables:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for table in c.raw.tables(db_name="db1"): ... table # do something with the table
Iterate over chunks of tables to reduce memory load:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for table_list in c.raw.tables(db_name="db1", chunk_size=2500): ... table_list # do something with the tables
Create new tables in a database¶
-
RawTablesAPI.
create
(db_name: str, name: Union[str, List[str]]) → Union[cognite.client.data_classes.raw.Table, cognite.client.data_classes.raw.TableList]¶ -
Parameters: - db_name (str) – Database to create the tables in.
- name (Union[str, List[str]]) – A table name or list of table names to create.
Returns: Table or list of tables that has been created.
Return type: Examples
Create a new table in a database:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.raw.tables.create("db1", "table1")
Delete tables from a database¶
-
RawTablesAPI.
delete
(db_name: str, name: Union[str, Sequence[str]]) → None¶ -
Parameters: - db_name (str) – Database to delete tables from.
- name (Union[str, Sequence[str]]) – A table name or list of table names to delete.
Returns: None
Examples
Delete a list of tables:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.raw.tables.delete("db1", ["table1", "table2"])
Rows¶
Get a row from a table¶
-
RawRowsAPI.
retrieve
(db_name: str, table_name: str, key: str) → Optional[cognite.client.data_classes.raw.Row]¶ -
Parameters: - db_name (str) – Name of the database.
- table_name (str) – Name of the table.
- key (str) – The key of the row to retrieve.
Returns: The requested row.
Return type: Optional[Row]
Examples
Retrieve a row with key ‘k1’ from tablew ‘t1’ in database ‘db1’:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> row = c.raw.rows.retrieve("db1", "t1", "k1")
List rows in a table¶
-
RawRowsAPI.
list
(db_name: str, table_name: str, min_last_updated_time: Optional[int] = None, max_last_updated_time: Optional[int] = None, columns: Optional[List[str]] = None, limit: int = 25) → cognite.client.data_classes.raw.RowList¶ -
Parameters: - db_name (str) – Name of the database.
- table_name (str) – Name of the table.
- min_last_updated_time (int) – Rows must have been last updated after this time (exclusive). ms since epoch.
- max_last_updated_time (int) – Rows must have been last updated before this time (inclusive). ms since epoch.
- columns (List[str]) – List of column keys. Set to None for retrieving all, use [] to retrieve only row keys.
- limit (int) – The number of rows to retrieve. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
Returns: The requested rows.
Return type: Examples
List rows:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> row_list = c.raw.rows.list("db1", "t1", limit=5)
Iterate over rows:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for row in c.raw.rows(db_name="db1", table_name="t1", columns=["col1","col2"]): ... row # do something with the row
Iterate over chunks of rows to reduce memory load:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> for row_list in c.raw.rows(db_name="db1", table_name="t1", chunk_size=2500): ... row_list # do something with the rows
Insert rows into a table¶
-
RawRowsAPI.
insert
(db_name: str, table_name: str, row: Union[Sequence[cognite.client.data_classes.raw.Row], cognite.client.data_classes.raw.Row, Dict[KT, VT]], ensure_parent: bool = False) → None¶ Insert one or more rows into a table.
Parameters: Returns: None
Examples
Insert new rows into a table:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> rows = {"r1": {"col1": "val1", "col2": "val1"}, "r2": {"col1": "val2", "col2": "val2"}} >>> c.raw.rows.insert("db1", "table1", rows)
Delete rows from a table¶
-
RawRowsAPI.
delete
(db_name: str, table_name: str, key: Union[str, Sequence[str]]) → None¶ -
Parameters: - db_name (str) – Name of the database.
- table_name (str) – Name of the table.
- key (Union[str, Sequence[str]]) – The key(s) of the row(s) to delete.
Returns: None
Examples
Delete rows from table:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> keys_to_delete = ["k1", "k2", "k3"] >>> c.raw.rows.delete("db1", "table1", keys_to_delete)
Retrieve pandas dataframe¶
-
RawRowsAPI.
retrieve_dataframe
(db_name: str, table_name: str, min_last_updated_time: int = None, max_last_updated_time: int = None, columns: List[str] = None, limit: int = 25) → pandas.DataFrame¶ Retrieve rows in a table as a pandas dataframe.
Rowkeys are used as the index.
Parameters: - db_name (str) – Name of the database.
- table_name (str) – Name of the table.
- min_last_updated_time (int) – Rows must have been last updated after this time. ms since epoch.
- max_last_updated_time (int) – Rows must have been last updated before this time. ms since epoch.
- columns (List[str]) – List of column keys. Set to None for retrieving all, use [] to retrieve only row keys.
- limit (int) – The number of rows to retrieve. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
Returns: The requested rows in a pandas dataframe.
Return type: pandas.DataFrame
Examples
Get dataframe:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> df = c.raw.rows.retrieve_dataframe("db1", "t1", limit=5)
Insert pandas dataframe¶
-
RawRowsAPI.
insert_dataframe
(db_name: str, table_name: str, dataframe: Any, ensure_parent: bool = False) → None¶ Insert pandas dataframe into a table
Use index as rowkeys.
Parameters: - db_name (str) – Name of the database.
- table_name (str) – Name of the table.
- dataframe (pandas.DataFrame) – The dataframe to insert. Index will be used as rowkeys.
- ensure_parent (bool) – Create database/table if they don’t already exist.
Returns: None
Examples
Insert new rows into a table:
>>> import pandas as pd >>> from cognite.client import CogniteClient >>> >>> c = CogniteClient() >>> df = pd.DataFrame(data={"a": 1, "b": 2}, index=["r1", "r2", "r3"]) >>> res = c.raw.rows.insert_dataframe("db1", "table1", df)
RAW Data classes¶
-
class
cognite.client.data_classes.raw.
Database
(name: str = None, created_time: int = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
A NoSQL database to store customer data.
Parameters: - name (str) – Unique name of a database.
- created_time (int) – Time the database was created.
- cognite_client (CogniteClient) – The client to associate with this object.
-
class
cognite.client.data_classes.raw.
DatabaseList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
-
class
cognite.client.data_classes.raw.
Row
(key: str = None, columns: Dict[str, Any] = None, last_updated_time: int = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
No description.
Parameters: - key (str) – Unique row key
- columns (Dict[str, Any]) – Row data stored as a JSON object.
- last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- cognite_client (CogniteClient) – The client to associate with this object.
-
to_pandas
() → pandas.DataFrame¶ Convert the instance into a pandas DataFrame.
Returns: The pandas DataFrame representing this instance. Return type: pandas.DataFrame
-
class
cognite.client.data_classes.raw.
RowList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
-
to_pandas
() → pandas.DataFrame¶ Convert the instance into a pandas DataFrame.
Returns: The pandas DataFrame representing this instance. Return type: pandas.DataFrame
-
-
class
cognite.client.data_classes.raw.
Table
(name: str = None, created_time: int = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
A NoSQL database table to store customer data
Parameters: - name (str) – Unique name of the table
- created_time (int) – Time the table was created.
- cognite_client (CogniteClient) – The client to associate with this object.
-
rows
(key: Optional[str] = None, limit: Optional[int] = None) → Union[cognite.client.data_classes.raw.Row, cognite.client.data_classes.raw.RowList]¶ Get the rows in this table.
Parameters: - key (str) – Specify a key to return only that row.
- limit (int) – The number of rows to return.
Returns: List of tables in this database.
Return type:
-
class
cognite.client.data_classes.raw.
TableList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
Extraction pipelines¶
List extraction pipelines¶
-
ExtractionPipelinesAPI.
list
(limit: int = 25) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineList¶ -
Parameters: limit (int, optional) – Maximum number of ExtractionPipelines to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items. Returns: List of requested ExtractionPipelines Return type: ExtractionPipelineList Examples
List ExtractionPipelines:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> ep_list = c.extraction_pipelines.list(limit=5)
Create extraction pipeline¶
-
ExtractionPipelinesAPI.
create
(extraction_pipeline: Union[cognite.client.data_classes.extractionpipelines.ExtractionPipeline, Sequence[cognite.client.data_classes.extractionpipelines.ExtractionPipeline]]) → Union[cognite.client.data_classes.extractionpipelines.ExtractionPipeline, cognite.client.data_classes.extractionpipelines.ExtractionPipelineList]¶ Create one or more extraction pipelines.
You can create an arbitrary number of extraction pipelines, and the SDK will split the request into multiple requests if necessary.
Parameters: extraction_pipeline (Union[ExtractionPipeline, List[ExtractionPipeline]]) – Extraction pipeline or list of extraction pipelines to create. Returns: Created extraction pipeline(s) Return type: Union[ExtractionPipeline, ExtractionPipelineList] Examples
Create new extraction pipeline:
>>> from cognite.client import CogniteClient >>> from cognite.client.data_classes import ExtractionPipeline >>> c = CogniteClient() >>> extpipes = [ExtractionPipeline(name="extPipe1",...), ExtractionPipeline(name="extPipe2",...)] >>> res = c.extraction_pipelines.create(extpipes)
Retrieve an extraction pipeline by ID¶
-
ExtractionPipelinesAPI.
retrieve
(id: Optional[int] = None, external_id: Optional[str] = None) → Optional[cognite.client.data_classes.extractionpipelines.ExtractionPipeline]¶ Retrieve a single extraction pipeline by id.
Parameters: - id (int, optional) – ID
- external_id (str, optional) – External ID
Returns: Requested extraction pipeline or None if it does not exist.
Return type: Optional[ExtractionPipeline]
Examples
Get extraction pipeline by id:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.retrieve(id=1)
Get extraction pipeline by external id:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.retrieve(external_id="1")
Retrieve multiple extraction pipelines by ID¶
-
ExtractionPipelinesAPI.
retrieve_multiple
(ids: Optional[Sequence[int]] = None, external_ids: Optional[Sequence[str]] = None, ignore_unknown_ids: bool = False) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineList¶ Retrieve multiple extraction pipelines by ids and external ids.
Parameters: - ids (Sequence[int], optional) – IDs
- external_ids (Sequence[str], optional) – External IDs
- ignore_unknown_ids (bool) – Ignore IDs and external IDs that are not found rather than throw an exception.
Returns: The requested ExtractionPipelines.
Return type: Examples
Get ExtractionPipelines by id:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.retrieve_multiple(ids=[1, 2, 3])
Get assets by external id:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.retrieve_multiple(external_ids=["abc", "def"], ignore_unknown_ids=True)
Update extraction pipelines¶
-
ExtractionPipelinesAPI.
update
(item: Union[cognite.client.data_classes.extractionpipelines.ExtractionPipeline, cognite.client.data_classes.extractionpipelines.ExtractionPipelineUpdate, Sequence[Union[cognite.client.data_classes.extractionpipelines.ExtractionPipeline, cognite.client.data_classes.extractionpipelines.ExtractionPipelineUpdate]]]) → Union[cognite.client.data_classes.extractionpipelines.ExtractionPipeline, cognite.client.data_classes.extractionpipelines.ExtractionPipelineList]¶ Update one or more extraction pipelines
Parameters: item (Union[ExtractionPipeline, ExtractionPipelineUpdate, Sequence[Union[ExtractionPipeline, ExtractionPipelineUpdate]]]) – Extraction pipeline(s) to update Returns: Updated extraction pipeline(s) Return type: Union[ExtractionPipeline, ExtractionPipelineList] Examples
Update an extraction pipeline that you have fetched. This will perform a full update of the extraction pipeline:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> update = ExtractionPipelineUpdate(id=1) >>> update.description.set("Another new extpipe") >>> res = c.extraction_pipelines.update(update)
Delete extraction pipelines¶
-
ExtractionPipelinesAPI.
delete
(id: Union[int, Sequence[int], None] = None, external_id: Union[str, Sequence[str], None] = None) → None¶ Delete one or more extraction pipelines
Parameters: - id (Union[int, Sequence[int]) – Id or list of ids
- external_id (Union[str, Sequence[str]]) – External ID or list of external ids
Returns: None
Examples
Delete extraction pipelines by id or external id:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> c.extraction_pipelines.delete(id=[1,2,3], external_id="3")
Extraction pipeline runs¶
List runs for an extraction pipeline¶
-
ExtractionPipelineRunsAPI.
list
(external_id: str, statuses: Optional[Sequence[str]] = None, message_substring: Optional[str] = None, created_time: Union[Dict[str, Any], cognite.client.data_classes.shared.TimestampRange, None] = None, limit: int = 25) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineRunList¶ List runs for an extraction pipeline with given external_id
Parameters: - external_id (str) – Extraction pipeline external Id.
- statuses (Sequence[str]) – One or more among “success” / “failure” / “seen”.
- message_substring (str) – Failure message part.
- created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- limit (int, optional) – Maximum number of ExtractionPipelines to return. Defaults to 25. Set to -1, float(“inf”) or None to return all items.
Returns: List of requested extraction pipeline runs
Return type: Examples
List extraction pipeline runs:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> runsList = c.extraction_pipelines.runs.list(external_id="test ext id", limit=5)
Filter extraction pipeline runs on a given status:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> runsList = c.extraction_pipelines.runs.list(external_id="test ext id", statuses=["seen"], statuslimit=5)
Report new runs¶
-
ExtractionPipelineRunsAPI.
create
(run: Union[cognite.client.data_classes.extractionpipelines.ExtractionPipelineRun, Sequence[cognite.client.data_classes.extractionpipelines.ExtractionPipelineRun]]) → Union[cognite.client.data_classes.extractionpipelines.ExtractionPipelineRun, cognite.client.data_classes.extractionpipelines.ExtractionPipelineRunList]¶ Create one or more extraction pipeline runs.
You can create an arbitrary number of extraction pipeline runs, and the SDK will split the request into multiple requests.
Parameters: run (Union[ExtractionPipelineRun, Sequence[ExtractionPipelineRun]]) – Extraction pipeline or list of extraction pipeline runs to create. Returns: Created extraction pipeline run(s) Return type: Union[ExtractionPipelineRun, ExtractionPipelineRunList] Examples
Report a new extraction pipeline run:
>>> from cognite.client import CogniteClient >>> from cognite.client.data_classes import ExtractionPipelineRun >>> c = CogniteClient() >>> res = c.extraction_pipelines.runs.create( ... ExtractionPipelineRun(status="success", extpipe_external_id="extId"))
Extraction pipeline configs¶
Get the latest or a specific config revision¶
-
ExtractionPipelineConfigsAPI.
retrieve
(external_id: str, revision: Optional[int] = None, active_at_time: Optional[int] = None) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfig¶ Retrieve a specific configuration revision, or the latest by default <https://docs.cognite.com/api/v1/#operation/getExtPipeConfigRevision>
By default the latest configuration revision is retrieved, or you can specify a timestamp or a revision number.
Parameters: - external_id (str) – External id of the extraction pipeline to retrieve config from.
- revision (Optional[int]) – Optionally specify a revision number to retrieve.
- active_at_time (Optional[int]) – Optionally specify a timestamp the configuration revision should be active.
Returns: Retrieved extraction pipeline configuration revision
Return type: Examples
Retrieve latest config revision:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.config.retrieve("extId")
List configuration revisions¶
-
ExtractionPipelineConfigsAPI.
list
(external_id: str) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfigRevisionList¶ Retrieve all configuration revisions from an extraction pipeline <https://docs.cognite.com/api/v1/#operation/listExtPipeConfigRevisions>
Parameters: external_id (str) – External id of the extraction pipeline to retrieve config from. Returns: Retrieved extraction pipeline configuration revisions Return type: ExtractionPipelineConfigRevisionList Examples
Retrieve a list of config revisions:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.config.list("extId")
Create a config revision¶
-
ExtractionPipelineConfigsAPI.
create
(config: cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfig) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfig¶ Create a new configuration revision <https://docs.cognite.com/api/v1/#operation/createExtPipeConfig>
Parameters: config (ExtractionPipelineConfig) – Configuration revision to create. Returns: Created extraction pipeline configuration revision Return type: ExtractionPipelineConfig Examples
Create a config revision:
>>> from cognite.client import CogniteClient >>> from cognite.client.config import ExtractionPipelineConfig >>> c = CogniteClient() >>> res = c.extraction_pipelines.config.create(ExtractionPipelineConfig(external_id="extId", config="my config contents"))
Revert to an earlier config revision¶
-
ExtractionPipelineConfigsAPI.
revert
(external_id: str, revision: int) → cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfig¶ Revert to a previous configuration revision <https://docs.cognite.com/api/v1/#operation/createExtPipeConfig>
Parameters: - external_id (str) – External id of the extraction pipeline to revert revision for.
- revision (int) – Revision to revert to.
Returns: New latest extraction pipeline configuration revision.
Return type: Examples
Revert a config revision:
>>> from cognite.client import CogniteClient >>> c = CogniteClient() >>> res = c.extraction_pipelines.config.revert("extId", 5)
Extractor Config Data classes¶
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipeline
(id: int = None, external_id: str = None, name: str = None, description: str = None, data_set_id: int = None, raw_tables: List[Dict[str, str]] = None, last_success: int = None, last_failure: int = None, last_message: str = None, last_seen: int = None, schedule: str = None, contacts: List[ExtractionPipelineContact] = None, metadata: Dict[str, str] = None, source: str = None, documentation: str = None, created_time: int = None, last_updated_time: int = None, created_by: str = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
An extraction pipeline is a representation of a process writing data to CDF, such as an extractor or an ETL tool.
Parameters: - id (int) – A server-generated ID for the object.
- external_id (str) – The external ID provided by the client. Must be unique for the resource type.
- name (str) – The name of the extraction pipeline.
- description (str) – The description of the extraction pipeline.
- data_set_id (int) – The id of the dataset this extraction pipeline related with.
- raw_tables (List[Dict[str, str]) – list of raw tables in list format: [{“dbName”: “value”, “tableName” : “value”}].
- last_success (int) – Milliseconds value of last success status.
- last_failure (int) – Milliseconds value of last failure status.
- last_message (str) – Message of last failure.
- last_seen (int) – Milliseconds value of last seen status.
- schedule (str) – None/On trigger/Continuous/cron regex.
- contacts (List[ExtractionPipelineContact]) – list of contacts
- metadata (Dict[str, str]) – Custom, application specific metadata. String key -> String value. Limits: Maximum length of key is 128 bytes, value 10240 bytes, up to 256 key-value pairs, of total size at most 10240.
- source (str) – Source text value for extraction pipeline.
- documentation (str) – Documentation text value for extraction pipeline.
- created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- last_updated_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- created_by (str) – Extraction pipeline creator, usually an email.
- cognite_client (CogniteClient) – The client to associate with this object.
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineConfig
(external_id: str = None, config: str = None, revision: int = None, description: str = None, created_time: int = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes.extractionpipelines.ExtractionPipelineConfigRevision
An extraction pipeline config
Parameters: - external_id (str) – The external ID of the associated extraction pipeline.
- config (str) – Contents of this configuration revision.
- revision (int) – The revision number of this config as a positive integer.
- description (str) – Short description of this configuration revision.
- created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- cognite_client (CogniteClient) – The client to associate with this object.
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineConfigRevision
(external_id: str = None, revision: int = None, description: str = None, created_time: int = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
An extraction pipeline config revision
Parameters: - external_id (str) – The external ID of the associated extraction pipeline.
- revision (int) – The revision number of this config as a positive integer.
- description (str) – Short description of this configuration revision.
- created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- cognite_client (CogniteClient) – The client to associate with this object.
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineConfigRevisionList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineContact
(name: str, email: str, role: str, send_notification: bool)¶ Bases:
dict
A contact for an extraction pipeline
Parameters: - name (str) – Name of contact
- email (str) – Email address of contact
- role (str) – Role of contact, such as Owner, Maintainer, etc.
- send_notification (bool) – Whether to send notifications to this contact or not
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineRun
(extpipe_external_id: str = None, status: str = None, message: str = None, created_time: int = None, cognite_client: CogniteClient = None, id: int = None)¶ Bases:
cognite.client.data_classes._base.CogniteResource
A representation of an extraction pipeline run.
Parameters: - id (int) – A server-generated ID for the object.
- extpipe_external_id (str) – The external ID of the extraction pipeline.
- status (str) – success/failure/seen.
- message (str) – Optional status message.
- created_time (int) – The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.
- cognite_client (CogniteClient) – The client to associate with this object.
-
dump
(camel_case: bool = False) → Dict[str, Any]¶ Dump the instance into a json serializable Python data type.
Parameters: camel_case (bool) – Use camelCase for attribute names. Defaults to False. Returns: A dictionary representation of the instance. Return type: Dict[str, Any]
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineRunFilter
(external_id: str = None, statuses: Sequence[str] = None, message: StringFilter = None, created_time: Union[Dict[str, Any], TimestampRange] = None, cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteFilter
Filter runs with exact matching
Parameters: - external_id (str) – The external ID of related ExtractionPipeline provided by the client. Must be unique for the resource type.
- statuses (Sequence[str]) – success/failure/seen.
- message (StringFilter) – message filter.
- created_time (Union[Dict[str, Any], TimestampRange]) – Range between two timestamps.
- cognite_client (CogniteClient) – The client to associate with this object.
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineRunList
(resources: Collection[Any], cognite_client: CogniteClient = None)¶ Bases:
cognite.client.data_classes._base.CogniteResourceList
-
class
cognite.client.data_classes.extractionpipelines.
ExtractionPipelineUpdate
(id: Optional[int] = None, external_id: Optional[str] = None)¶ Bases:
cognite.client.data_classes._base.CogniteUpdate
Changes applied to an extraction pipeline
Parameters: - id (int) – A server-generated ID for the object.
- external_id (str) – The external ID provided by the client. Must be unique for the resource type.
-
class
cognite.client.data_classes.extractionpipelines.
StringFilter
(substring: Optional[str] = None)¶ Bases:
cognite.client.data_classes._base.CogniteFilter
Filter runs on substrings of the message
Parameters: substring (str) – Part of message