{"record":{"id":"a17d06aed3ef3a20","repo":"OpenBB-finance/OpenBB","slug":"dataflow-mismatch-provided-dataflow-but-table","errorCode":null,"errorMessage":"Dataflow mismatch: provided '{dataflow}' but table_id specifies '{parsed_dataflow}'. Use one or the other.","messagePattern":"Dataflow mismatch: provided '(.+?)' but table_id specifies '(.+?)'\\. Use one or the other\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/imf/openbb_imf/utils/table_builder.py","lineNumber":165,"sourceCode":"        >>> result = tb.get_table(\"IRFCL\", indicators=[\"A\", \"FA\", \"L\"], COUNTRY=\"US\")\n\n        >>> # Combine depth with parent to drill down\n        >>> result = tb.get_table(\"BOP\", parent_id=\"NETCD_T\", depth=1, COUNTRY=\"US\")\n\n        >>> # Use combined dataflow::table_id format from list_tables choices\n        >>> result = tb.get_table(table_id=\"BOP::H_BOP_BOP_AGG_STANDARD_PRESENTATION\", COUNTRY=\"USA\", FREQUENCY=\"A\")\n        \"\"\"\n        # pylint: disable=import-outside-toplevel\n        from openbb_imf.utils.progressive_helper import ImfParamsBuilder\n\n        # Parse dataflow_id::table_id format if provided\n        if table_id and \"::\" in table_id:\n            parts = table_id.split(\"::\", 1)\n            parsed_dataflow = parts[0]\n            parsed_table_id = parts[1]\n            # If dataflow was also provided, validate it matches\n            if dataflow is not None and dataflow != parsed_dataflow:\n                raise ValueError(\n                    f\"Dataflow mismatch: provided '{dataflow}' but table_id \"\n                    f\"specifies '{parsed_dataflow}'. Use one or the other.\"\n                )\n            dataflow = parsed_dataflow\n            table_id = parsed_table_id\n\n        if dataflow is None:\n            raise ValueError(\n                \"dataflow is required. Either provide it directly or use \"\n                \"table_id in 'dataflow_id::table_id' format.\"\n            )\n\n        # Validate parameter combinations using progressive helper\n        if kwargs or start_date or end_date:\n            self._validate_dimension_constraints(\n                dataflow, start_date=start_date, end_date=end_date, **kwargs\n            )\n","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/utils/table_builder.py#L147-L183","documentation":"ImfTableBuilder.get_table raises ValueError when both dataflow and a 'dataflow_id::table_id' formatted table_id are supplied and the dataflow parts disagree. The library refuses to guess which one you meant.","triggerScenarios":"get_table(dataflow='BOP', table_id='BOP_DOTS::H_BOP_DOTS') — the explicit dataflow does not match the prefix parsed from table_id.","commonSituations":"Config files or notebooks that evolved: table_id was later enriched with the prefixed format while the old dataflow kwarg remained, or copy-paste mixing two dataflows.","solutions":["Provide only table_id='DATAFLOW::TABLE' and drop the dataflow kwarg.","Or pass a bare table_id plus the matching dataflow, keeping the two consistent.","In templated code, derive one from the other instead of setting both."],"exampleFix":"# before\nresult = tb.get_table(dataflow='BOP', table_id='BOP_DOTS::H_BOP_DOTS')\n\n# after\nresult = tb.get_table(table_id='BOP_DOTS::H_BOP_DOTS')","handlingStrategy":"validation","validationCode":"def normalize_table_args(dataflow: str | None, table_id: str | None):\n    if table_id and '::' in table_id:\n        parsed_flow, tid = table_id.split('::', 1)\n        if dataflow is not None and dataflow != parsed_flow:\n            raise ValueError(f'conflicting dataflows: {dataflow} vs {parsed_flow}')\n        return parsed_flow, tid\n    if dataflow is None:\n        raise ValueError('dataflow required')\n    return dataflow, table_id","typeGuard":null,"tryCatchPattern":"try:\n    result = tb.get_table(dataflow=dataflow, table_id=table_id)\nexcept ValueError as e:\n    if 'Dataflow mismatch' in str(e):\n        result = tb.get_table(table_id=table_id)  # let table_id win\n    else:\n        raise","preventionTips":["Standardize on the single-argument form: get_table(table_id='FLOW::TABLE').","Never set both dataflow and a prefixed table_id in configs/templates.","Derive one identifier from the other programmatically."],"tags":["validation","imf","api-misuse","table-builder"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}