catalog_data_source.
analyze_csv
analyze_csv(location: str) -> AnalyzeCsvResponse
Analyze an uploaded CSV file in the staging area.
Returns column metadata, detected types, and a config object that can be passed directly to import_csv.
Parameters
| name | type | description |
|---|---|---|
| location | str | Location string returned by staging_upload. |
Returns
| type | description |
|---|---|
| AnalyzeCsvResponse | Analysis result with columns, preview data, and config. |
Example
# Analyze a previously uploaded CSV file
analysis = sdk.catalog_data_source.analyze_csv(location="staging/some-location")
for col in analysis["columns"]:
print(f"{col['name']}: {col['type']}")