Skip to content

sift_py.data_import.status

CLASS DESCRIPTION
DataImportStatusType

Status of the data import.

DataImport

Metadata regarding the data import.

DataImportService

Service used to retrieve information about a particular data import.

DataImportStatusType

Bases: Enum

Status of the data import.

METHOD DESCRIPTION
from_str
as_human_str
ATTRIBUTE DESCRIPTION
SUCCEEDED

PENDING

IN_PROGRESS

FAILED

SUCCEEDED class-attribute instance-attribute

SUCCEEDED = 'DATA_IMPORT_STATUS_SUCCEEDED'

PENDING class-attribute instance-attribute

PENDING = 'DATA_IMPORT_STATUS_PENDING'

IN_PROGRESS class-attribute instance-attribute

IN_PROGRESS = 'DATA_IMPORT_STATUS_IN_PROGRESS'

FAILED class-attribute instance-attribute

FAILED = 'DATA_IMPORT_STATUS_FAILED'

from_str classmethod

from_str(val: str) -> Optional[Self]

as_human_str

as_human_str() -> str

DataImport pydantic-model

Bases: BaseModel

Metadata regarding the data import.

Config:

  • alias_generator: to_camel
  • populate_by_name: True

Fields:

Validators:

model_config class-attribute instance-attribute

model_config = ConfigDict(
    alias_generator=to_camel, populate_by_name=True
)

data_import_id pydantic-field

data_import_id: str

created_date pydantic-field

created_date: datetime

modified_date pydantic-field

modified_date: datetime

source_url pydantic-field

source_url: str = ''

status pydantic-field

status: Union[str, DataImportStatusType]

error_message pydantic-field

error_message: str = ''

csv_config pydantic-field

csv_config: Optional[dict] = None

parquet_config pydantic-field

parquet_config: Optional[dict] = None

convert_status pydantic-validator

convert_status(
    raw: Union[str, DataImportStatusType],
) -> DataImportStatusType

DataImportService

DataImportService(
    restconf: SiftRestConfig, data_import_id: str
)

Bases: _RestService

Service used to retrieve information about a particular data import.

METHOD DESCRIPTION
extend

Add an existing data import service to track a batch data import

get_data_import

Returns information about the data import. Provides the first data import if multiple provided through extend and idx not passed

get_data_imports
wait_until_complete

Blocks until the data import is completed. Check the status to determine

wait_until_all_complete

Blocks until all data imports are complete.

ATTRIBUTE DESCRIPTION
STATUS_PATH

STATUS_PATH class-attribute instance-attribute

STATUS_PATH = '/api/v1/data-imports'

extend

extend(other: Self)

Add an existing data import service to track a batch data import

get_data_import

get_data_import(idx: int = 0) -> DataImport

Returns information about the data import. Provides the first data import if multiple provided through extend and idx not passed

  • idx: Optional idx of the desired DataImport to access

get_data_imports

get_data_imports() -> Generator[DataImport, None, None]

wait_until_complete

wait_until_complete(idx: int = 0) -> DataImport

Blocks until the data import is completed. Check the status to determine if the import was successful or not. Waits on only the first data import if multiple provided through add_data_import_id and idx not passed

wait_until_all_complete

wait_until_all_complete() -> List[DataImport]

Blocks until all data imports are complete.