# Product updates: August, 2020

# The Cognite Power BI Connector

# New function: Time series aggregates

The time series aggregation now accepts a list of IDs instead of a comma separated string. You can now use a column from another query directly as input to the function, making it much easier to use.

# Setting the CDF environment for a custom cluster

If a CDF project is on a custom cluster, you can set the CDF Environment to the URL of the API server for the cluster when you connect to CDF.

You can also set a specific API version by appending it to the URL, for example v1. We also support shorthand notations. For example, api/v1 uses the default API endpoint and v1 of the API.

Examples of supported CDF environment values:

  • (blank) - uses the default setting (https://api.cognitedata.com)
  • api - the same as https://api.cognitedata.com
  • api/v1 - the same as https://api.cognitedata.com/v1
  • https://api.cognitedata.com
  • https://api.cognitedata.com/v1
  • xyz - a custom cluster. The same as https://xyz.cognitedata.com
  • xyz/v1
  • https://xyz.cognitedata.com
  • https://xyz.cognitedata.com/v1

Learn more about the Cognite Power BI connector.

# New SDK section in the developer portal

The new section gathers the most useful resources and links related to the CDF SDKs:

  • Getting started with JavaScript SDK and Python SDK.
  • Quick links to reference documentation and GitHub repositories.
  • Additional guides such as authentication, upgrade guides for JavaScript SDKs.
  • Release notes for SDKs are now part of the developer portal.

# Python SDK 2.1

The new release introduces an improved interface to make it easier to work with labels.

# create label definition(s)
client.labels.create(LabelDefinition(
    external_id="PUMP",
    name="Pump",
    description="Pump equipment"))
# ... or multiple
client.labels.create([
    LabelDefinition(external_id="PUMP"),
    LabelDefinition(external_id="VALVE")])
# list label definitions
label_definitions = client.labels.list(name="Pump")
# delete label definitions
client.labels.delete("PUMP")
# ... or multiple
client.labels.delete(["PUMP", "VALVE"])
# create an asset with label
asset = Asset(name="my_pump", labels=[Label(external_id="PUMP")])
client.assets.create(assets)
# filter assets by labels
my_label_filter = LabelFilter(contains_all=["PUMP", "VERIFIED"])
asset_list = client.assets.list(labels=my_label_filter)
# attach/detach labels to/from assets
my_update = AssetUpdate(id=1)
    .labels.add(["PUMP"])
    .labels.remove(["VALVE"])
res = c.assets.update(my_update)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

To learn more about the changes in new release, see the release notes.

# JavaScript SDK 3.0

New major release separates SDK into 3 different packages:

  • A core package that contains the SDKs infrastructure. This is used by the other packages and allows users to easily create their own SDK by just defining the interface.
  • The stable package contains all the stable API endpoints.
  • The beta package extends the stable SDK with beta API functionality.

In addition to structural changes, the new version of the SDK introduces these changes:

  • unit attribute is now exposed in data points objects.
  • Fields that can have arbitrary string names (Raw, Metadata) are no longer converted to Date objects if their names are: createdTime, lastUpdatedTime, uploadedTime, deletedTime, timestamp, sourceCreatedTime or sourceModifiedTime.

To learn more about the new release, see the release notes.

TIP

To upgrade to the newest version, follow the migration guidelines.

# Resources

Find up-to-date release information for tools and libraries here: