@@ -71,12 +71,41 @@ async def import_from_path(
7171 If neither ``run`` nor ``run_name`` is provided (and none is
7272 set on the config), ``run_name`` defaults to the filename.
7373
74+ Examples:
75+ Import a CSV file with auto-detected config:
76+
77+ job = client.data_imports.import_from_path(
78+ "data.csv",
79+ asset=my_asset,
80+ )
81+
82+ Auto-detect config, inspect and patch before importing:
83+
84+ config = client.data_imports.detect_config("data.csv")
85+
86+ # Fix a column data type
87+ config.get_column("temperature").data_type = ChannelDataType.FLOAT
88+
89+ # Remove an unwanted column
90+ config.data_columns = [
91+ dc for dc in config.data_columns if dc.name != "internal_id"
92+ ]
93+
94+ job = client.data_imports.import_from_path(
95+ "data.csv",
96+ asset=my_asset,
97+ config=config,
98+ )
99+
74100 Args:
75101 file_path: Path to the local file to import.
76102 asset: Asset object or asset name to import data into. Optional
77103 when ``config`` already has ``asset_name`` set.
78104 config: Import configuration describing the file format and column
79- mapping. When provided, ``data_type`` is ignored.
105+ mapping. When provided, ``data_type`` is ignored. If omitted,
106+ the config is auto-detected via ``detect_config``. You can
107+ call ``detect_config`` yourself to inspect and modify the
108+ config before passing it here.
80109 data_type: Explicit data type key. Required for formats like
81110 Parquet where the extension alone is ambiguous. Only used
82111 when ``config`` is not provided.
0 commit comments