Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--store-failures not working for tests returning count(1) as column name #274

Closed
jelstongreen opened this issue Jan 10, 2022 · 3 comments
Closed
Labels
bug Something isn't working good_first_issue Good for newcomers

Comments

@jelstongreen
Copy link

Describe the bug

--store-failures returns errors on dbt's standard unique test due to not aliasing the COUNT(1) column when writing the table.

Steps To Reproduce

Use --store-failures on v0.20.0 + and have a unique test in a schema.yml

Expected behavior

The column should be aliased and the table saved down correctly.

Screenshots and log output

14:26:30  Runtime Error in test unique_test (dir/schema.yml)
14:26:30    ('42000', '[42000] [Simba][DSI] An error occurred while attempting to retrieve the error message for key \'HardyHQLSyntaxOrSemanticError\' with message parameters [\'org.apache.hive.service.cli.HiveSQLException: Error running query: org.apache.spark.sql.AnalysisException:  Column name "count(1)" contains invalid character(s). Please use alias to rename it.        \n\tat org.apache.spark.sql.hive.thriftserver.HiveThriftS\'] and component ID 100: Could not open error message files - Check that "/opt/simba/spark/ErrorMessages//en-US/\x00 (-1) (SQLExecDirectW)')

System information

The output of dbt --version:

installed version: 0.21.0
   latest version: 1.0.0

Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:
  - bigquery: 0.18.2
  - snowflake: 0.18.2
  - redshift: 0.18.2
  - postgres: 0.18.2
  - spark: 0.21.0

The operating system you're using:
MACOS
The output of python --version:
Python 3.9.9

Additional context

Add any other context about the problem here.

@jelstongreen jelstongreen added bug Something isn't working triage labels Jan 10, 2022
@jtcohen6
Copy link
Contributor

(Relevant: #236)

@VersusFacit VersusFacit added good_first_issue Good for newcomers and removed triage labels Feb 7, 2022
@VersusFacit
Copy link
Contributor

See the above linked PR for guidance on which macro to change.

@jelstongreen
Copy link
Author

Great thank you both, seems to be resolved with this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good_first_issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants