Datasource

class dagshub.data_engine.model.metadata_field_builder.MetadataFieldBuilder(datasource, field_name)

Builder class for changing properties of a metadata field in a datasource. It is also possible to create a new empty field with predefined schema with this builder. All functions return back the builder object to facilitate a builder pattern, for example:

builder.set_type(bytes).set_annotation().apply()
set_type(t) MetadataFieldBuilder

Set the type of the field. The type can be either a Python primitive supported by the Data Engine (str, bool, int, float, bytes) or it can be a DagshubDataType inheritor. The DataType inheritors can define additional tags on top of just the basic backing type

Return type:

MetadataFieldBuilder

set_annotation(is_annotation=True) MetadataFieldBuilder

Mark or unmark the field as annotation field

Return type:

MetadataFieldBuilder

set_thumbnail(thumbnail_type=None, is_thumbnail=True) MetadataFieldBuilder

Mark or unmark the field as thumbnail field, with the specified thumbnail type

Return type:

MetadataFieldBuilder

apply()

Apply the outgoing changes to this metadata field.

If you need to apply changes to multiple fields at once, use Datasource.apply_field_changes instead.

class dagshub.data_engine.client.models.ScanOption(*values)

Enum of options that can be applied during scanning process with scan_source()

FORCE_REGENERATE_AUTO_SCAN_VALUES = 'FORCE_REGENERATE_AUTO_SCAN_VALUES'

Regenerate all the autogenerated metadata values for the whole datasource