catalog_data_source.
import_csv
import_csv(data_source_id: str, table_name: str, location: str, config: Optional[dict[str, Any]])
Import a CSV file from staging into a GDSTORAGE data source.
Parameters
| name | type | description |
|---|---|---|
| data_source_id | str | Data source identification string. |
| table_name | str | Name for the table to create or replace. |
| location | str | Location string returned by staging_upload. |
| config | Optional[dict[str, Any]] | Source config dict, typically from analyze_csv response. Passed as ImportCsvRequestTableSourceConfig kwargs. |
Returns
NoneExample
# Import a CSV into a GDSTORAGE data source using config from analysis
analysis = sdk.catalog_data_source.analyze_csv(location=location)
config = analysis.to_dict().get("config")
sdk.catalog_data_source.import_csv(
data_source_id="my-gdstorage-ds",
table_name="my_table",
location=location,
config=config,
)