Data Types
Data models and type definitions used throughout the DASL client. These classes represent the structure of datasources, rules, configurations, and other DASL objects.
Core Data Models
- class dasl_client.types.datasource.DataSource(**data)[source]
Bases:
BaseModelA DataSource resource.
- metadata
Standard object metadata.
- Type:
Optional[Metadata]
- source
The name of the originator of the data.
- Type:
Optional[str]
- source_type
The type of data being imported.
- Type:
Optional[str]
- custom
A custom notebook for the datasource.
- Type:
Optional[DataSource.CustomNotebook]
- primary_key
Primary key configuration of the datasource.
- Type:
Optional[PrimaryKey]
- use_preset
The name of the preset to use for this data source.
- Type:
Optional[str]
- autoloader
Autoloader configuration.
- Type:
Optional[DataSource.Autoloader]
- bronze
Bronze table configuration.
- Type:
Optional[BronzeSpec]
- compute_mode
The compute mode to use for this datasource’s job.
- Type:
Optional[str]
- silver
Silver transformation configuration.
- Type:
Optional[SilverSpec]
- status
The current status of the datasource.
- Type:
Optional[ResourceStatus]
- Parameters:
data (
Any)
- class CustomNotebook(**data)[source]
Bases:
BaseModelA custom notebook for generating data.
- notebook
Path to the notebook in the Databricks workspace.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
notebook:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecCustom])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PrimaryKey(**data)[source]
Bases:
BaseModelPrimaryKey configuration for DataSource
- time_column
column name used as timestamp portion of the sortable synthetic key
- Type:
str
- additionalColumns
list of columns to compute hashkey over
- Type:
List[str]
- Parameters:
data (
Any)
-
time_column:
str
-
additional_columns:
List[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourcePrimaryKeySpec])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Autoloader(**data)[source]
Bases:
BaseModelAutoloader configuration for the DataSource.
- format
The format of the data (e.g., json, parquet, csv, etc.).
- Type:
Optional[str]
- location
External location for the volume in Unity Catalog.
- Type:
str
- schema_file
An optional file containing the schema of the data source.
- Type:
Optional[str]
- cloud_files
CloudFiles configuration.
- Type:
Optional[DataSource.Autoloader.CloudFiles]
- Parameters:
data (
Any)
- class CloudFiles(**data)[source]
Bases:
BaseModelCloudFiles configuration for the Autoloader.
- schema_hints_file
- Type:
Optional[str]
- schema_hints
- Type:
Optional[str]
- Parameters:
data (
Any)
-
schema_hints_file:
Optional[str]
-
schema_hints:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[ContentV1DatasourcePresetAutoloaderCloudFiles])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
format:
Optional[str]
-
location:
str
-
schema_file:
Optional[str]
-
cloud_files:
Optional[DataSource.Autoloader.CloudFiles]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceAutoloaderSpec])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
metadata:
Optional[Metadata]
-
source:
Optional[str]
-
source_type:
Optional[str]
-
custom:
Optional[DataSource.CustomNotebook]
-
primary_key:
Optional[DataSource.PrimaryKey]
-
use_preset:
Optional[str]
-
use_preset_version:
Optional[int]
-
autoloader:
Optional[DataSource.Autoloader]
-
compute_mode:
Optional[str]
-
bronze:
Optional[BronzeSpec]
-
silver:
Optional[SilverSpec]
-
status:
Optional[ResourceStatus]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.rule.Rule(**data)[source]
Bases:
BaseModelRules define how to generate notables from input data.
- metadata
Standard object metadata.
- Type:
Optional[Metadata]
- rule_metadata
The rule configuration metadata.
- Type:
Optional[Rule.RuleMetadata]
- input
The rule input configuration.
- Type:
- observables
A list of observables.
- Type:
Optional[List[Rule.Observable]]
- output
The rule output configuration.
- Type:
- collate
The collate configuration.
- Type:
Optional[Rule.Collate]
- status
The current status of the rule.
- Type:
Optional[ResourceStatus]
- Parameters:
data (
Any)
- class RuleMetadata(**data)[source]
Bases:
BaseModelRuleMetadata object wrapping CoreV1RuleSpecMetadata.
- version
The current version of the rule.
- Type:
Optional[Union[float, int]]
- category
The category of this detection. The available values are configured in workspace config.
- Type:
Optional[str]
- severity
The threat level associated with the notable.
- Type:
Optional[str]
- fidelity
Fidelity is used to capture the maturity of a rule. Newly created, untested rules should be marked as Investigative fidelity. Older, more well-tested rules should be marked as High fidelity. This helps an analyst determine how likely a notable is a false positive.
- Type:
Optional[str]
- mitre
Mitre ATT&CK tactic information.
- Type:
Optional[List[Rule.RuleMetadata.Mitre]]
- objective
A longer form description of what this rule is attempting to detect (objectMeta.comment is a summary).
- Type:
Optional[str]
- response
Response configuration for the rule.
- Type:
Optional[Rule.RuleMetadata.Response]
- Parameters:
data (
Any)
- class Mitre(**data)[source]
Bases:
BaseModelMitre ATT&CK details associated with a Rule.
- taxonomy
Mitre ATT&CK taxonomy.
- Type:
Optional[str]
- tactic
Mitre ATT&CK tactic.
- Type:
Optional[str]
- technique_id
The Mitre ATT&CK technique identifier.
- Type:
Optional[str]
- technique
The Mitre ATT&CK technique human-readable name.
- Type:
Optional[str]
- sub_technique_id
The Mitre ATT&CK sub-technique identifier.
- Type:
Optional[str]
- sub_technique
The Mitre ATT&CK sub-technique human-readable name.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
taxonomy:
Optional[str]
-
tactic:
Optional[str]
-
technique_id:
Optional[str]
-
technique:
Optional[str]
-
sub_technique_id:
Optional[str]
-
sub_technique:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecMetadataMitreInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Response(**data)[source]
Bases:
BaseModelDetails regarding how to respond to a notable generated by the Rule.
- guidelines
Response guidelines.
- Type:
Optional[str]
- playbooks
Suggested response playbooks.
- Type:
Optional[List[Rule.RuleMetadata.Response.Playbook]]
- Parameters:
data (
Any)
- class Playbook(**data)[source]
Bases:
BaseModelDatabricks notebook and template values to generate a playbook for the analyst from the notable.
- notebook
Notebook to run.
- Type:
Optional[str]
- options
These are templated, if they contain ${} this will be filled in using the notable.
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
notebook:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecMetadataResponsePlaybooksInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
guidelines:
Optional[str]
-
playbooks:
Optional[List[Rule.RuleMetadata.Response.Playbook]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecMetadataResponse])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
version:
Union[float,int,None]
-
category:
Optional[str]
-
severity:
Optional[str]
-
fidelity:
Optional[str]
-
mitre:
Optional[List[Rule.RuleMetadata.Mitre]]
-
objective:
Optional[str]
-
response:
Optional[Rule.RuleMetadata.Response]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Input(**data)[source]
Bases:
BaseModelSpecification of input data for the Rule.
- stream
Input if the Rule should operate on streaming input data.
- Type:
Optional[Rule.Input.Stream]
- batch
Input if the rule should operate on batched input data.
- Type:
Optional[Rule.Input.Batch]
- Parameters:
data (
Any)
- class CustomStream(**data)[source]
Bases:
BaseModelSpecification of a stream custom notebook for generating input to the Rule.
- notebook
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
notebook:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecInputStreamCustom])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class CustomBatch(**data)[source]
Bases:
BaseModelSpecification of a batch custom notebook for generating input to the Rule.
- notebook
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
notebook:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecInputBatchCustom])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Stream(**data)[source]
Bases:
BaseModelSpecification for streaming input from a table or tables, from a custom notebook, or directly from a SQL statement.
- tables
List of input tables and join rules.
- Type:
Optional[List[Rule.Input.Stream.Table]]
- filter
A filter expression to be applied to the input stream. Note that this cannot be used in conjunction with a custom SQL expression (i.e. the sql field).
- Type:
Optional[str]
- sql
A custom SQL expression to apply to the input stream before matching. Note that this cannot be used in conjunction with a filter expression (i.e. the filter member).
- Type:
Optional[str]
- custom
- Type:
Optional[Rule.Input.CustomStream]
- starting_timestamp
Starting timestamp for streaming input data. If this value is not specified, then the timestamp when this rule was created will be used. This setting is used to determine the starting point for streaming historical data, and only applies on the first run of the rule. Once some data has been streamed and a checkpoint has been created, this setting no longer has any impact.
- Type:
Optional[datetime]
- Parameters:
data (
Any)
- class Table(**data)[source]
Bases:
BaseModelSpecification of a table for streaming input.
- name
Name of the table.
- Type:
Optional[str]
- watermark
Watermark configuration.
- Type:
Optional[Rule.Input.Stream.Table.Watermark]
- alias
Alias name for the table.
- Type:
Optional[str]
- join_type
For tables other than the first, how to join to the preceding table.
- Type:
Optional[str]
- join_expr
For tables other than the first, the join condition expression to join with the preceding table.
- Type:
Optional[str]
- streaming
For tables other than the first, is this a streaming join or static. Default is false, except on the first table.
- Type:
Optional[bool]
- Parameters:
data (
Any)
- class Watermark(**data)[source]
Bases:
BaseModelWatermark for a streaming input table.
- event_time_column
Which column is the event time for the delay threshold.
- Type:
str
- delay_threshold
A time duration string for the watermark delay.
- Type:
str
- drop_duplicates
Pass into pyspark dropDuplicates (effectively columns for group by).
- Type:
Optional[List[str]]
- Parameters:
data (
Any)
-
event_time_column:
str
-
delay_threshold:
str
-
drop_duplicates:
Optional[List[str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecInputStreamTablesInnerWatermark])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
Optional[str]
-
watermark:
Optional[Rule.Input.Stream.Table.Watermark]
-
alias:
Optional[str]
-
join_type:
Optional[str]
-
join_expr:
Optional[str]
-
streaming:
Optional[bool]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecInputStreamTablesInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
tables:
Optional[List[Rule.Input.Stream.Table]]
-
filter:
Optional[str]
-
sql:
Optional[str]
-
custom:
Optional[Rule.Input.CustomStream]
-
starting_timestamp:
Optional[datetime]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1RuleSpecInputStream])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Batch(**data)[source]
Bases:
BaseModelSpecification for batch input to a Rule, either from a SQL statement or a custom notebook.
- sql
- Type:
Optional[str]
- custom
- Type:
Optional[Rule.Input.CustomBatch]
- Parameters:
data (
Any)
-
sql:
Optional[str]
-
custom:
Optional[Rule.Input.CustomBatch]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
stream:
Optional[Rule.Input.Stream]
-
batch:
Optional[Rule.Input.Batch]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Observable(**data)[source]
Bases:
BaseModelObservable associated with a Rule.
- kind
- Type:
str
- value
- Type:
str
- relationship
- Type:
str
- risk
- Type:
- Parameters:
data (
Any)
- class Risk(**data)[source]
Bases:
BaseModelRisk level associated with an Observable.
- impact
A SQL expression indicating the impact (should evaluate to a number between 0-100).
- Type:
str
- confidence
A SQL expression indicating the confidence (should evaluate to a number between 0-100).
- Type:
str
- Parameters:
data (
Any)
-
impact:
str
-
confidence:
str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
kind:
str
-
value:
str
-
relationship:
str
- risk: Rule.Observable.Risk
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Output(**data)[source]
Bases:
BaseModelOutput from a Rule after matching.
- summary
- Type:
Optional[str]
- context
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
summary:
Optional[str]
-
context:
Optional[Dict[str,str]]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Collate(**data)[source]
Bases:
BaseModelConfiguration for collating multiple notables generated from a Rule within a given timeframe.
- collate_on
SQL column(s) to collate notables on. This must be either ‘summary’, ‘context’, or a JSON key within ‘context’. Only one level of nesting is currently supported.
- Type:
Optional[List[str]]
- within
A time duration string for the window to collate within.
- Type:
Optional[str]
- action
append | updateStats | inhibit.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
collate_on:
Optional[List[str]]
-
within:
Optional[str]
-
action:
Optional[str]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
metadata:
Optional[Metadata]
-
rule_metadata:
Optional[Rule.RuleMetadata]
- input: Rule.Input
-
observables:
Optional[List[Rule.Observable]]
- output: Rule.Output
-
collate:
Optional[Rule.Collate]
-
status:
Optional[ResourceStatus]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.workspace_config.WorkspaceConfig(**data)[source]
Bases:
BaseModelGeneral configuration settings for the Workspace.
- metadata
Common resource metadata; generally managed by the control plane.
- Type:
Optional[Metadata]
- system_tables_config
Configuration for the storage of metadata by the control plane.
- Type:
SystemTablesConfig
- default_sql_warehouse
Default SQL warehouse to use for executing certain queries. May be overridden in some cases.
- Type:
Optional[str]
- detection_rule_metadata
Detection rule metadata.
- Type:
Optional[DetectionRuleMetadata]
- notable_export
Settings related to the export of notables to various destinations.
- Type:
Optional[ExportConfig]
- operational_alert_export
Settings related to the export of operational alerts to various destinations.
- Type:
Optional[ExportConfig]
- observables
Declaration of the types of observables generated by the system.
- Type:
Optional[WorkspaceConfigObservables]
- dasl_storage_path
The path to a directory where DASL can store internal files and state.
- Type:
Optional[str]
- dasl_custom_presets_path
An optional path to a directory containing user defined presets.
- Type:
Optional[str]
- default_rule_schedule
A default schedule for detections. If a detection is created without a schedule, it will inherit the schedule provided here. Note that, should this schedule be updated, it will affect all detections inheriting it.
- Type:
Optional[str]
- default_config
(DEPRECATED) Configuration settings regarding storage of bronze, silver, and gold tables and related assets for each resource type.
- Type:
Optional[DefaultConfig]
- default_custom_notebook_location
The storage location for custom user-provided notebooks. Also used as the prefix for relative paths to custom notebooks.
- Type:
Optional[str]
- datasources
Configuration items that apply specifically to datasources.
- Type:
Optional[DatasourcesConfig]
- rules
Configuration items that apply specifically to rules.
- Type:
Optional[RulesConfig]
- managed_retention
Configuration of regular cleanup (i.e. pruning) jobs for various catalogs, schemas, and tables.
- Type:
Optional[List[ManagedRetention]]
- status
Common resource status; wholly managed by the control plane.
- Type:
Optional[ResourceStatus]
- Parameters:
data (
Any)
-
metadata:
Optional[Metadata]
-
system_tables_config:
SystemTablesConfig
-
default_sql_warehouse:
Optional[str]
-
detection_rule_metadata:
Optional[DetectionRuleMetadata]
-
notable_export:
Optional[ExportConfig]
-
operational_alert_export:
Optional[ExportConfig]
-
observables:
Optional[WorkspaceConfigObservables]
-
dasl_storage_path:
Optional[str]
-
dasl_custom_presets_path:
Optional[str]
-
default_config:
Optional[DefaultConfig]
-
default_custom_notebook_location:
Optional[str]
-
datasources:
Optional[DatasourcesConfig]
-
rules:
Optional[RulesConfig]
-
managed_retention:
Optional[List[ManagedRetention]]
-
status:
Optional[ResourceStatus]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Common Helper Types
- class dasl_client.types.types.Schedule(**data)[source]
Bases:
BaseModelA schedule for recurring dispatch of the Job(s) associated with a resource.
- at_least_every
A duration string defining the schedule. The string may contain components for days, hours, minutes and seconds. Examples include ‘5d’, ‘5d3h’, ‘3d2h5m12s’, and ‘12m16s’.
- Type:
Optional[str]
- exactly
A quartz cron expression defining the precise schedule for dispatch.
- Type:
Optional[str]
- continuous
True if the Job should be continuously dispatched, False/None otherwise.
- Type:
Optional[bool]
- compute_group
‘dedicated’, ‘automatic’ or a custom group name.
- Type:
Optional[str]
- enabled
Whether the schedule (and hence Job associated with the resource) is active.
- Type:
Optional[bool]
- Parameters:
data (
Any)
-
at_least_every:
Optional[str]
-
exactly:
Optional[str]
-
continuous:
Optional[bool]
-
compute_group:
Optional[str]
-
enabled:
Optional[bool]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Datasource Helper Types
- class dasl_client.types.datasource.BronzeSpec(**data)[source]
Bases:
BaseModelConfiguration for bronze table within a DataSource.
- clustering
Describes optional liquid clustering configuration for the bronze table.
- Type:
Optional[BronzeSpec.Clustering]
- bronze_table
The name of the bronze table to create and hold the imported data.
- Type:
Optional[str]
- skip_bronze_loading
Indicates whether to skip the bronze loading step.
- Type:
Optional[bool]
- load_as_single_variant
Indicates whether to ingest data into a single VARIANT-typed column called data
- Type:
Optional[bool]
- pre_transform
A list of pre-transform steps to execute. The outer list form stages and the inner list contains SQL select expressions to be executed within each stage
- Type:
Optional[List[List[str]]]
- Parameters:
data (
Any)
- class Clustering(**data)[source]
Bases:
BaseModelConfiguration of liquid clustering for a bronze table.
- column_names
List of column names to include in liquid clustering.
- Type:
Optional[List[str]]
- time_column
Name of the column that holds ‘time’ information for clustering.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
column_names:
Optional[List[str]]
-
time_column:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecBronzeClustering])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
clustering:
Optional[BronzeSpec.Clustering]
-
bronze_table:
Optional[str]
-
skip_bronze_loading:
Optional[bool]
-
load_as_single_variant:
Optional[bool]
-
pre_transform:
Optional[List[List[str]]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecBronze])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.datasource.SilverSpec(**data)[source]
Bases:
BaseModelConfiguration for silver table in a DataSource.
- bronze_tables
A list of bronze tables to be joined for silver transformation.
- Type:
Optional[List[SilverSpec.BronzeTable]]
- pre_transform
Pretransformation configuration.
- Type:
Optional[SilverSpec.PreTransform]
- transform
Transformation configuration for silver processing.
- Type:
Optional[SilverSpec.Transform]
- Parameters:
data (
Any)
- class BronzeTable(**data)[source]
Bases:
BaseModelReference to a bronze table for a silver table.
- name
Name of the bronze table.
- Type:
Optional[str]
- streaming
True if the input should be streamed from the bronze table.
- Type:
Optional[bool]
- watermark
Bronze table watermark.
- Type:
Optional[SilverSpec.BronzeTable.Watermark]
- alias
Alias name for the table.
- Type:
Optional[str]
- join_type
How to join to the preceding table.
- Type:
Optional[str]
- join_expr
The join condition expression.
- Type:
Optional[str]
- Parameters:
data (
Any)
- class Watermark(**data)[source]
Bases:
BaseModelWatermark for a bronze source table within a silver table.
- event_time_column
Which column is the event time for the delay threshold.
- Type:
Optional[str]
- delay_threshold
A time duration string for the watermark delay.
- Type:
Optional[str]
- drop_duplicates
Columns to pass to pyspark dropDuplicates.
- Type:
Optional[List[str]]
- Parameters:
data (
Any)
-
event_time_column:
Optional[str]
-
delay_threshold:
Optional[str]
-
drop_duplicates:
Optional[List[str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverBronzeTablesInnerWatermark])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
Optional[str]
-
streaming:
Optional[bool]
-
watermark:
Optional[SilverSpec.BronzeTable.Watermark]
-
alias:
Optional[str]
-
join_type:
Optional[str]
-
join_expr:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverBronzeTablesInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PreTransform(**data)[source]
Bases:
BaseModelPre-transform for a silver table.
- use_preset
Preset to use.
- Type:
Optional[str]
- skip_pre_transform
If True, skip pre-transform entirely.
- Type:
Optional[bool]
- custom
Custom pretransform function and options.
- Type:
Optional[SilverSpec.PreTransform.Custom]
- filter
A SQL filter to apply at the beginning of the preTransform phase.
- Type:
Optional[str]
- post_filter
A SQL filter to apply at the end of the preTransform phase.
- Type:
Optional[str]
- preset_overrides
Overrides for preset filters.
- Type:
Optional[SilverSpec.PreTransform.PresetOverrides]
- Parameters:
data (
Any)
- class Custom(**data)[source]
Bases:
BaseModelCustom pre-transform function for silver table.
- function
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
function:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverPreTransformCustom])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class PresetOverrides(**data)[source]
Bases:
BaseModelOverrides for the preset.
- omit_fields
A list of fields to omit from the chosen preset.
- Type:
Optional[List[str]]
- Parameters:
data (
Any)
-
omit_fields:
Optional[List[str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverPreTransformPresetOverrides])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
use_preset:
Optional[str]
-
skip_pre_transform:
Optional[bool]
-
custom:
Optional[SilverSpec.PreTransform.Custom]
-
filter:
Optional[str]
-
post_filter:
Optional[str]
-
preset_overrides:
Optional[SilverSpec.PreTransform.PresetOverrides]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverPreTransform])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Transform(**data)[source]
Bases:
BaseModelSilver table transform.
- skip_silver_transform
If True, skip transform entirely.
- Type:
Optional[bool]
- preset_overrides
Preset overrides for the silver transformation.
- Type:
Optional[SilverSpec.Transform.PresetOverrides]
- Parameters:
data (
Any)
- class PresetOverrides(**data)[source]
Bases:
BaseModelOverrides for preset transform settings.
- modify_tables
Modifications forexisting tables.
- Type:
Optional[List[SilverSpec.Transform.PresetOverrides.ModifyTables]]
- omit_tables
A list of tables to omit from the preset.
- Type:
Optional[List[str]]
- add_tables
User defined tables to include in the transformation.
- Type:
Optional[List[SilverSpec.Transform.PresetOverrides.AddTables]]
- Parameters:
data (
Any)
- class Custom(**data)[source]
Bases:
BaseModelCustom function for use in silver table transform.
- function
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
function:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInnerCustom])- Return type:
- to_api_obj()[source]
- Return type:
CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInnerCustom
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ModifyTables(**data)[source]
Bases:
BaseModelTable modifications as part of a silver transform.
- name
- Type:
Optional[str]
- custom
- Type:
- omit_fields
- Type:
Optional[List[str]]
- override_liquid_columns
- Type:
Optional[List[str]]
- filter
- Type:
Optional[str]
- post_filter
- Type:
Optional[str]
- utils
- Type:
Optional[FieldUtils]
- Parameters:
data (
Any)
-
name:
Optional[str]
-
custom:
Optional[SilverSpec.Transform.PresetOverrides.Custom]
-
omit_fields:
Optional[List[str]]
-
override_liquid_columns:
Optional[List[str]]
-
filter:
Optional[str]
-
post_filter:
Optional[str]
-
utils:
Optional[FieldUtils]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInner])- Return type:
- to_api_obj()[source]
- Return type:
CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInner
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AddTables(**data)[source]
Bases:
BaseModelTables to add during a silver table transform.
- custom
- Type:
- name
- Type:
Optional[str]
- filter
- Type:
Optional[str]
- post_filter
- Type:
Optional[str]
- override_liquid_columns
- Type:
Optional[List[str]]
- utils
- Type:
Optional[FieldUtils]
- Parameters:
data (
Any)
-
custom:
Optional[SilverSpec.Transform.PresetOverrides.Custom]
-
name:
Optional[str]
-
filter:
Optional[str]
-
post_filter:
Optional[str]
-
override_liquid_columns:
Optional[List[str]]
-
utils:
Optional[FieldUtils]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransformPresetOverridesAddTablesInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
modify_tables:
Optional[List[SilverSpec.Transform.PresetOverrides.ModifyTables]]
-
omit_tables:
Optional[List[str]]
-
add_tables:
Optional[List[SilverSpec.Transform.PresetOverrides.AddTables]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransformPresetOverrides])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
skip_silver_transform:
Optional[bool]
-
do_not_materialize:
Optional[bool]
-
preset_overrides:
Optional[SilverSpec.Transform.PresetOverrides]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransform])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
bronze_tables:
Optional[List[SilverSpec.BronzeTable]]
-
pre_transform:
Optional[SilverSpec.PreTransform]
-
transform:
Optional[SilverSpec.Transform]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilver])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.datasource.GoldSpec(**data)[source]
Bases:
BaseModelConfiguration for gold table in a DataSource.
- omit_tables
A list of tables to omit from the preset.
- Type:
Optional[List[str]]
- modify_tables
Modifications for existing gold table definitions.
- Type:
Optional[List[GoldSpec.ModifyTables]]
- add_tables
User defined tables to add to the gold configuration.
- Type:
Optional[List[GoldSpec.AddTables]]
- Parameters:
data (
Any)
- class ModifyTables(**data)[source]
Bases:
BaseModelModification to gold tables during transformation.
- name
Table name.
- Type:
Optional[str]
- source_table
Used to match against the preset’s gold stanzas input fields.
- Type:
Optional[str]
- custom
Custom function for modifying tables.
- Type:
Optional[GoldSpec.ModifyTables.Custom]
- omit_fields
A list of fields to omit.
- Type:
Optional[List[str]]
- filter
A SQL filter to apply before processing.
- Type:
Optional[str]
- post_filter
A SQL filter to apply after processing.
- Type:
Optional[str]
- Parameters:
data (
Any)
- class Custom(**data)[source]
Bases:
BaseModelCustom function to use as part of a gold table modification.
- function
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
function:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInnerCustom])- Return type:
- to_api_obj()[source]
- Return type:
CoreV1DataSourceSpecSilverTransformPresetOverridesModifyTablesInnerCustom
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
Optional[str]
-
source_table:
Optional[str]
-
custom:
Optional[GoldSpec.ModifyTables.Custom]
-
omit_fields:
Optional[List[str]]
-
filter:
Optional[str]
-
post_filter:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecGoldPresetOverridesModifyTablesInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class AddTables(**data)[source]
Bases:
BaseModelTables to add during gold table transformation.
- custom
Custom function for adding tables.
- Type:
Optional[GoldSpec.AddTables.Custom]
- name
The name of the table to add.
- Type:
Optional[str]
- source_table
The source table/dataframe for the gold table.
- Type:
Optional[str]
- filter
A SQL filter to apply.
- Type:
Optional[str]
- post_filter
A SQL filter to apply after processing.
- Type:
Optional[str]
- Parameters:
data (
Any)
- class Custom(**data)[source]
Bases:
BaseModelCustom function for adding tables during gold transformation.
- function
- Type:
Optional[str]
- options
- Type:
Optional[Dict[str, str]]
- Parameters:
data (
Any)
-
function:
Optional[str]
-
options:
Optional[Dict[str,str]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecGoldPresetOverridesAddTablesInnerCustom])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
Optional[str]
-
source_table:
Optional[str]
-
custom:
Optional[GoldSpec.AddTables.Custom]
-
filter:
Optional[str]
-
post_filter:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceSpecGoldPresetOverridesAddTablesInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
omit_tables:
Optional[List[str]]
-
modify_tables:
Optional[List[GoldSpec.ModifyTables]]
-
add_tables:
Optional[List[GoldSpec.AddTables]]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.datasource.FieldSpec(**data)[source]
Bases:
BaseModel- name
The name of the field.
- Type:
Optional[str]
- comment
The comment to apply to the field.
- Type:
Optional[str]
- var_assert
A list of SQL expressions that must evaluate to true for every processed row. If the assertion is false, an operational alert is raised using ‘message’ for each row.
- Type:
Optional[List[FieldSpec.Assert]]
- var_from
This field obtains its value from the source column of this name. Use this to bring in a column from some upstream table.
- Type:
Optional[str]
- alias
This field obtains its value from the destination (transformed) column of this name. Use this to alias a column from within the same table (ie. silver table). You cannot alias a column from some upstream table.
- Type:
Optional[str]
- expr
This field obtains its value from the given SQL expression.
- Type:
Optional[str]
- literal
This field obtains its value from the given literal string. For other data types, use expr.
- Type:
Optional[str]
- join
This field obtains its value from joining to another table.
- Type:
Optional[FieldSpec.Join]
- Parameters:
data (
Any)
- class Assert(**data)[source]
Bases:
BaseModelAn assertion within a FieldSpec.
- expr
The SQL expression that must evaluate to true for every processed row.
- Type:
Optional[str]
- message
The message to include in the operational alert if the assertion fails.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
expr:
Optional[str]
-
message:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldSpecAssertInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Join(**data)[source]
Bases:
BaseModelA join expression within a FieldSpec.
- with_table
The table to join to.
- Type:
Optional[str]
- with_csv
The CSV configuration used for the join.
- Type:
Optional[FieldSpec.Join.WithCSV]
- lhs
The column in the source dataframe to join on.
- Type:
Optional[str]
- rhs
The column in the joined table to join on.
- Type:
Optional[str]
- select
A SQL expression to create the new field from the joined dataset.
- Type:
Optional[str]
- Parameters:
data (
Any)
- class WithCSV(**data)[source]
Bases:
BaseModelA CSV file used for joins within a FieldSpec.
- path
The path to the CSV file.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
path:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldSpecJoinWithCSV])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
with_table:
Optional[str]
-
with_csv:
Optional[FieldSpec.Join.WithCSV]
-
lhs:
Optional[str]
-
rhs:
Optional[str]
-
select:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldSpecJoin])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
name:
Optional[str]
-
comment:
Optional[str]
-
var_assert:
Optional[List[FieldSpec.Assert]]
-
var_from:
Optional[str]
-
alias:
Optional[str]
-
expr:
Optional[str]
-
literal:
Optional[str]
-
join:
Optional[FieldSpec.Join]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldSpec])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.datasource.FieldUtils(**data)[source]
Bases:
BaseModel- unreferenced_columns
Defines whether columns not referenced in the FieldSpecs should be preserved or omitted.
- Type:
Optional[FieldUtils.UnreferencedColumns]
- json_extract
A list of configurations for extracting JSON fields from a column.
- Type:
Optional[List[FieldUtils.JsonExtract]]
- Parameters:
data (
Any)
- class UnreferencedColumns(**data)[source]
Bases:
BaseModelConfiguration related to unreferenced columns.
- preserve
Indicates whether columns not referenced in the FieldSpecs should be preserved.
- Type:
Optional[bool]
- embed_column
Specifies a name for a new column to contain all unreferenced fields.
- Type:
Optional[str]
- omit_columns
Lists columns to exclude from the output.
- Type:
Optional[List[str]]
- duplicate_prefix
Adds a prefix to resolve ambiguous duplicate field names.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
preserve:
Optional[bool]
-
embed_column:
Optional[str]
-
omit_columns:
Optional[List[str]]
-
duplicate_prefix:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldUtilsUnreferencedColumns])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class JsonExtract(**data)[source]
Bases:
BaseModelConfiguration for extracting JSON fields from table columns.
- source
The column name containing JSON string(s) to extract from.
- Type:
Optional[str]
- omit_fields
Specifies high-level fields to exclude from extraction.
- Type:
Optional[List[str]]
- duplicate_prefix
Adds a prefix to resolve duplicate field names during extraction.
- Type:
Optional[str]
- embed_column
Specifies a column name to store the extracted JSON object.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
source:
Optional[str]
-
omit_fields:
Optional[List[str]]
-
duplicate_prefix:
Optional[str]
-
embed_column:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldUtilsJsonExtractInner])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
unreferenced_columns:
Optional[FieldUtils.UnreferencedColumns]
-
json_extract:
Optional[List[FieldUtils.JsonExtract]]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[CoreV1DataSourceFieldUtils])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Configuration Helper Types
- class dasl_client.types.workspace_config.DatasourcesConfig(**data)[source]
Bases:
BaseModelConfiguration settings used by Datasources.
- bronze_schema
Name of the bronze schema in the catalog.
- Type:
Optional[str]
- silver_schema
Name of the silver schema in the catalog.
- Type:
Optional[str]
- gold_schema
Name of the gold schema in the catalog.
- Type:
Optional[str]
- catalog_name
The catalog name to use as the resource’s default.
- Type:
Optional[str]
- checkpoint_location
The base checkpoint location to use in Rule notebooks.
- Type:
Optional[str]
- default_compute_mode
The default compute mode to use for datasource jobs.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
catalog_name:
Optional[str]
-
bronze_schema:
Optional[str]
-
silver_schema:
Optional[str]
-
gold_schema:
Optional[str]
-
checkpoint_location:
Optional[str]
-
default_compute_mode:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[WorkspaceV1WorkspaceConfigSpecDatasources])- Return type:
Optional[DatasourcesConfig]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class dasl_client.types.workspace_config.RulesConfig(**data)[source]
Bases:
BaseModelConfiguration settings used by Rules.
- checkpoint_location
The location to store checkpoints for streaming writes. If not provided, the daslStoragePath will be used.
- Type:
Optional[str]
- Parameters:
data (
Any)
-
checkpoint_location:
Optional[str]
- static from_api_obj(obj)[source]
- Parameters:
obj (
Optional[WorkspaceV1WorkspaceConfigSpecRules])- Return type:
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].