Using values from environment variables
The configuration file allows substitutions with environment variables. For example:COGNITE_CLIENT_SECRET environment variable into the cognite/secret parameter. You can also do string interpolation with environment variables, for example:
Implicit substitutions only work for unquoted value strings. For quoted strings, use the
!env tag to activate environment substitution:Using values from Azure Key Vault
The DB extractor also supports loading values from Azure Key Vault. To load a configuration value from Azure Key Vault, use the!keyvault tag followed by the name of the secret you want to load. For example, to load the value of the my-secret-name secret in Key Vault into a password parameter, configure your extractor like this:
azure-keyvault section in your configuration, with the following parameters:
Example:
cognite
Global parameter.
The cognite section describes which CDF project the extractor will load data into and how to connect to the project.
idp-authentication
Part of cognite configuration.
The idp-authentication section enables the extractor to authenticate to CDF using an external identity provider (IdP), such as Microsoft Entra ID (formerly Azure Active Directory).
scopes
Part of idp-authentication configuration.
Enter a list of scopes requested for the token
Each element of this list should be a string.
certificate
Part of idp-authentication configuration.
Authenticate with a client certificate
data-set
Part of cognite configuration.
Enter a data set the extractor should write data into
extraction-pipeline
Part of cognite configuration.
Enter the extraction pipeline used for remote config and reporting statuses
connection
Part of cognite configuration.
Configure network connection details
proxies
Part of connection configuration.
Dictionary mapping from protocol to url.
logger
Global parameter.
The optional logger section sets up logging to a console and files.
console
Part of logger configuration.
Include the console section to enable logging to a standard output, such as a terminal window.
file
Part of logger configuration.
Include the file section to enable logging to a file. The files are rotated daily.
files
Global parameter.
Configure files to be extracted to CDF.
The
missing-as-deleted and delete-behavior parameters require a configured state store to track files between runs. Without a state store, the extractor will not delete or mark files as deleted.file-provider
Part of files configuration.
Configure a file provider for where the files are extracted from.
Either one of the following options:
- Local Files
- Sharepoint Online
- FTP/FTPS
- SFTP
- GCP Cloud Storage
- Azure Blob Storage
- Azure Data Lake Storage
- Samba
- AWS S3
- Documentum
local_files
Part of file-provider configuration.
Read files from a local folder. This file provider will recursively traverse the given path and extract all discovered files.
Examples:
ignore_patterns
Part of local_files configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
sharepoint_online
Part of file-provider configuration.
Read files from one or more sharepoint online sites.
Example:
paths
Part of sharepoint_online configuration.
Enter a list of sharepoint base URLs to extract from.
Each element of this list should be an a sharepoint base URL to extract from.
extract-columns
Part of sharepoint_online configuration.
Extract Sharepoint columns as metadata. This is a map from column names in Sharepoint to the name you want to extracted columns to have in file metadata in CDF.
Example:
restrict-to
Part of sharepoint_online configuration.
Restrict to extract only files visible to a given Sharepoint Group or SiteUser.
Important: In order to use this, the extractor MUST authenticate to Sharepoint online using a certificate, NOT a client secret.
performance
Part of sharepoint_online configuration.
Configuration to tune the parallel calls made to Sharepoint MS Graph API.
ignore_patterns
Part of sharepoint_online configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
ftp/ftps
Part of file-provider configuration.
Read files from an FTP server.
Example:
ignore_patterns
Part of ftp/ftps configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
sftp
Part of file-provider configuration.
Read files from an SFTP server, file transfer over SSH.
Example:
ignore_patterns
Part of sftp configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
pattern_with_flags
Part of ignore_patterns configuration.
gcp_cloud_storage
Part of file-provider configuration.
Read files from a GCP Cloud Storage bucket.
Example:
folders
Part of gcp_cloud_storage configuration.
List of folders in bucket to fetch files from.
Each element of this list should be a string.
ignore_patterns
Part of gcp_cloud_storage configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
azure_blob_storage
Part of file-provider configuration.
Read files from an Azure Blob Store.
Example:
containers
Part of azure_blob_storage configuration.
Optional list of containers to extract from. If left out or empty, all files will be read.
Each element of this list should be a string.
ignore_patterns
Part of azure_blob_storage configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
azure_data_lake_storage
Part of file-provider configuration.
Read files from an Azure Data Lake Storage.
Example:
To authenticate using a connection-string:
authentication
Part of azure_data_lake_storage configuration.
The authentication section is used to define how the extractor authenticates with Azure Data Lake Storage.
file-systems
Part of azure_data_lake_storage configuration.
Optional list of file systems to extract from. If left out or empty, all files will be read.
Each element of this list should be a string.
ignore_patterns
Part of azure_data_lake_storage configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
samba
Part of file-provider configuration.
Read files from a Samba file share.
Example:
ignore_patterns
Part of samba configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
aws_s3
Part of file-provider configuration.
Read files from an AWS S3 cloud bucket.
Example:
ignore_patterns
Part of aws_s3 configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
documentum
Part of file-provider configuration.
Read files from an OpenText Documentum server.
Example:
repositories
Part of documentum configuration.
List of documentum repositories to read from, and the query to make towards each repository.
Each element of this list should be an a documentum repository the file extractor should read from, and the query it should use.
field-map
Part of documentum configuration.
For each supported field-map parameter, list Documentum property names in priority order.
The extractor reads the document’s properties and uses the first property name in each list that exists on the document. If none of those properties exist, it follows the behavior in the table.
Each list item is a string (a property name). The Documentum example shows field-map with prioritized property names for the name and external-id parameters.
Default field-map when you omit the section:
The file external ID in CDF combines the Documentum value resolved for
external-id, external-id-separator, and the resolved file extension.performance
Part of documentum configuration.
Configuration to tune the parallelism of the file extractor.
ignore_patterns
Part of documentum configuration.
Any file path that matches this pattern will be ignored.
Either one of the following options:
- String
- Pattern with flags
pattern_with_flags
Part of ignore_patterns configuration.
extensions
Part of files configuration.
List of file extensions to include. If left out, all file extensions will be allowed.
Each element of this list should be a string.
labels
Part of files configuration.
List of label external IDs to add to extracted files.
Each element of this list should be a string.
security-categories
Part of files configuration.
List of security category IDs to add to extracted files.
Each element of this list should be an integer.
metadata-to-raw
Part of files configuration.
If this is configured, write metadata to a table in CDF RAW instead of files.
data_model
Part of files configuration.
When this is provided, all files metadata are uploaded to data models, hence metadata-to-raw becomes redundant.
source
Part of files configuration.
Sets the Source metadata field for the related files. When data modelling is set, it updates the underlying CogniteSourceSystem with the correspondent source. This is an optional parameter.
filter
Part of files configuration.
Either one of the following options:
- And
- Or
- Not
- Equals
- In
and
Part of filter configuration.
Matches if all sub filters match.
and
Part of and configuration.
List of sub filters, all of these must match.
Each element of this list should be a configuration for either And, Or, Not, Equals or In.
or
Part of filter configuration.
Matches if any of the sub filters match.
or
Part of or configuration.
List of sub filters, at least one of these must match.
Each element of this list should be a configuration for either And, Or, Not, Equals or In.
not
Part of filter configuration.
Matches if the sub filter does not match.
equals
Part of filter configuration.
Matches if the property on the file is equal to the given value.
equals
Part of equals configuration.
Equality filter.
in
Part of filter configuration.
Matches if the property on the file is equal to one of the given values.
in
Part of in configuration.
In filter.
values
Part of in configuration.
Property values. One of these must match.
Each element of this list should be a string.
delete-behavior
Part of files configuration.
Configures how to handle files no longer present at the source when missing-as-deleted is enabled.
The ‘missing-as-deleted’ and ‘delete-behavior’ parameters require a configured state store to track files between runs. Without a state store, the extractor will not delete or mark files as deleted.
extractor
Global parameter.
General configuration for the file extractor.
state-store
Part of extractor configuration.
Include the state store section to save extraction states between runs. Use this if data is loaded incrementally. The state store is also required for deletion (missing-as-deleted and delete-behavior) to take effect. We support multiple state stores, but you can only configure one at a time.
raw
Part of state-store configuration.
A RAW state store stores the extraction state in a table in CDF RAW.
local
Part of state-store configuration.
A local state store stores the extraction state in a JSON file on the local machine.
schedule
Part of extractor configuration.
File extractor schedule.
Either one of the following options:
- Cron Expression
- Interval
cron_expression
Part of schedule configuration.
interval
Part of schedule configuration.
metrics
Global parameter.
The metrics section describes where to send metrics on extractor performance for remote monitoring of the extractor. We recommend sending metrics to a Prometheus pushgateway, but you can also send metrics as time series in the CDF project.
push-gateways
Part of metrics configuration.
List of prometheus pushgateway configurations
Each element of this list should be a the push-gateways sections contain a list of metric destinations.
cognite
Part of metrics configuration.
Push metrics to CDF timeseries. Requires CDF credentials to be configured
data-set
Part of cognite configuration.
Data set the metrics will be created under
server
Part of metrics configuration.
The extractor can also be configured to expose a HTTP server with prometheus metrics for scraping