ccao-data / data-architecture

Codebase for CCAO data infrastructure construction and management
https://ccao-data.github.io/data-architecture/
5 stars 3 forks source link

`reporting.ratio_stats` raises an error during `dbt clone` #440

Closed jeancochrane closed 3 weeks ago

jeancochrane commented 1 month ago

Error message:

~/data-architecture/dbt$ dbt clone --select reporting.ratio_stats --state master-cache
16:46:38  Running with dbt=1.7.11
16:46:38  Registered adapter: athena=1.7.1
16:46:39  Found 82 models, 5 seeds, 415 tests, 136 sources, 10 exposures, 0 metrics, 595 macros, 0 groups, 0 semantic models
16:46:39
16:46:44  Concurrency: 5 threads (target='dev')
16:46:44
Failed to execute query.
Traceback (most recent call last):
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/pyathena/common.py", line 522, in _execute
    query_id = retry_api_call(
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/pyathena/util.py", line 85, in retry_api_call
    return retry(func, *args, **kwargs)
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/botocore/client.py", line 565, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/jecochr/data-architecture/dbt/venv/lib/python3.10/site-packages/botocore/client.py", line 1021, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.errorfactory.InvalidRequestException: An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: line 5:5: mismatched input 'None'. Expecting: <query>
Failed to execute query.
16:46:48
16:46:48  Completed with 1 error and 0 warnings:
16:46:48
16:46:48    Runtime Error in model reporting.ratio_stats (models/reporting/reporting.ratio_stats.py)
  An error occurred (InvalidRequestException) when calling the StartQueryExecution operation: line 5:5: mismatched input 'None'. Expecting: <query>
16:46:48
16:46:48  Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1

So far I haven't been able to find more detailed logs, so this might take some advanced debugging.

jeancochrane commented 1 month ago

Pull request opened against dbt-athena here: https://github.com/dbt-athena/dbt-athena/pull/651

dfsnow commented 3 weeks ago

@jeancochrane Can this be closed given #479?

jeancochrane commented 3 weeks ago

Yup, thanks for flagging that @dfsnow!