ingest_source_table
Validates Excel/CSV source tables against an expected schema, then stages rows and TMDL artifacts into a PBIP semantic model; supports dry-run key, duplicate, and row-limit checks.
Instructions
Validate and stage an Excel/CSV source table into a PBIP semantic model.
Args: source_path: Path to source .xlsx/.xlsm/.csv file inside PBI_WORKSPACE_ROOT. target_pbip_dir: Path to target PBIP workspace directory. table_name: Validated target Power BI table identifier. expected_schema: Dict (or JSON string) mapping column names to expected types. sheet_name: Optional Excel worksheet name. key_columns: Optional key columns checked for nulls and duplicates. allow_extra_columns: Permit unmapped source columns when True. max_rows: Safety row cap per file (capped at 100,000). dry_run: Validate only without writing TMDL/staged CSV files (default True).
Returns: Dict with schema/key validation findings, row counts, and staged artifacts.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source_path": "<source_path>",
"target_pbip_dir": "<target_pbip_dir>",
"table_name": "<table_name>",
"expected_schema": "<expected_schema>"
},
"name": "ingest_source_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| max_rows | No | ||
| sheet_name | No | ||
| table_name | Yes | ||
| key_columns | No | ||
| source_path | Yes | ||
| expected_schema | Yes | ||
| target_pbip_dir | Yes | ||
| allow_extra_columns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||