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

[Bug]: Object of type date is not JSON serializable (Databricks) #442

Open
alvawinsa opened this issue Aug 26, 2024 · 1 comment
Open

[Bug]: Object of type date is not JSON serializable (Databricks) #442

alvawinsa opened this issue Aug 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alvawinsa
Copy link

Overview

The on run end we are running to upload dbt_artifacts in all our jobs are failing on the upload sources command with the error "Object of type date is not JSON serializable". This is causing all our jobs to fail.

How to reproduce

We are using dbt cloud with

  • package: brooklyn-data/dbt_artifacts
    version: 2.6.2

Running on the Databricks connection.

  1. In our dbt_project file we have the following:

on-run-end:

  • "{% if var('run_post_hook') == 'on' %} {{ dbt_artifacts.upload_results(results) }} {% endif %}"

In our jobs we then have a --vars '{"run_post_hook": "on"}' in the command. This has been working fine for 6+ months. The failures started four days ago (with no code changes made by us).

Expected behaviour

I expect this:

0:02:04 Uploading model executions
00:02:04 Uploading seed executions
00:02:04 Uploading test executions
00:02:04 Uploading snapshot executions
00:02:08 Uploading exposures
00:02:10 Uploading seeds
00:02:13 Uploading snapshots
00:02:15 Uploading invocations
dbt command failed00:02:18 Uploading sources
00:02:20 Uploading tests
00:02:20 Database error while running on-run-end

To also Upload source successfully.

Screenshots

Nothing that can contribute anything else.

Environment

Results of running dbt --version: versionless

# Add the results here

Please paste the contents of your packages.yml file here:

packages:

  • package: calogica/dbt_date
    version: 0.10.0
  • package: dbt-labs/dbt_utils
    version: 1.1.1
  • package: dbt-labs/dbt_project_evaluator
    version: 0.9.0
  • package: dbt-labs/audit_helper
    version: 0.9.0
  • package: brooklyn-data/dbt_artifacts
    version: 2.6.2
@alvawinsa alvawinsa added the bug Something isn't working label Aug 26, 2024
@alvawinsa alvawinsa changed the title [Bug]: Object of type date is not JSON serializable [Bug]: Object of type date is not JSON serializable (Databricks) Aug 26, 2024
@alvawinsa alvawinsa reopened this Sep 13, 2024
@alvawinsa
Copy link
Author

Upgraded to latest version 2.6.4 did not solve this issue

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

No branches or pull requests

1 participant