sift_py.data_import.csv
¶
| CLASS | DESCRIPTION |
|---|---|
CsvUploadService |
|
CsvUploadService
¶
CsvUploadService(rest_conf: SiftRestConfig)
Bases: _RestService
| METHOD | DESCRIPTION |
|---|---|
simple_upload |
Uploads the CSV file pointed to by |
upload |
Uploads the CSV file pointed to by |
upload_from_url |
Uploads the CSV file pointed to by |
| ATTRIBUTE | DESCRIPTION |
|---|---|
RUN_PATH |
|
UPLOAD_PATH |
|
URL_PATH |
|
simple_upload
¶
simple_upload(
asset_name: str,
path: Union[str, Path],
first_data_row: int = 2,
time_column: int = 1,
time_format: TimeFormatType = ABSOLUTE_DATETIME,
run_name: Optional[str] = None,
run_id: Optional[str] = None,
units_row: Optional[int] = None,
descriptions_row: Optional[int] = None,
relative_start_time: Optional[str] = None,
) -> DataImportService
Uploads the CSV file pointed to by path to the specified asset. This function will
infer the data types and assume certain things about how the data is formatted. See the options
below for what parameters can be overridden. Use upload if you need to specify a custom CSV config.
Override first_data_row to specify which is the first row with data. Default is 2.
Override time_column to specify which column contains timestamp information. Default is 1.
Override time_format to specify the time data format. Default is TimeFormatType.ABSOLUTE_DATETIME.
Override run_name to specify the name of the run to create for this data. Default is None.
Override run_id to specify the id of the run to add this data to. Default is None.
Override units_row to specify which row contains unit information. Default is None.
Override descriptions_row to specify which row contains channel description information. Default is None.
Override relative_start_time if a relative time format is used. Default is None.
upload
¶
upload_from_url
¶
upload_from_url(
url: str, csv_config: CsvConfig
) -> DataImportService
Uploads the CSV file pointed to by url using a custom CSV config.