cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with visualizing dataframe from a job

cristianc
Contributor

Greetings,

I have the following data set:

```sql

SELECT * FROM (

VALUES

('2023-02',113.81::decimal(27,2),'A','X'),

('2023-02',112.66::decimal(27,2),'A','Y'),

('2023-02',1223.8::decimal(27,2),'B','X'),

('2023-02',1234.56::decimal(27,2),'B','Y'),

('2023-01',12232.67::decimal(27,2),'B','X'),

('2023-01',1321.77::decimal(27,2),'A','X'),

('2023-01',12312.24::decimal(27,2),'A','Y'),

('2023-01',22221.66::decimal(27,2),'B','Y'),

('2022-12',121.89::decimal(27,2),'B','X'),

('2022-12',21231231.17::decimal(27,2),'A','X'),

('2022-12',12312.46::decimal(27,2),'A','Y'),

('2022-12',12312312.68::decimal(27,2),'B','Y'),

('2022-11',12122.88::decimal(27,2),'A','Y'),

('2022-11',122212.42::decimal(27,2),'B','Y'),

('2022-11',23123.68::decimal(27,2),'A','X'),

('2022-11',12312.26::decimal(27,2),'B','X'),

('2022-10',121.42::decimal(27,2),'B','Y'),

('2022-10',1231.9::decimal(27,2),'B','X'),

('2022-10',1231.98::decimal(27,2),'A','Y')

) test_table (test_date, test_value, test_type, test_cat)

```

The data set is actually coming from one our real life queries, but has values replaced with dummies.

The issue seems to be when trying to create a bar chart that has "test_date" on the X axis and "test_value" with SUM on the Y axis.

In the vizualization editor, in "interactive mode", the values don't show up, but they do in the cell once it is saved, however when running the notebook as a job the bar chart is also wrong, as it was in the editor before saving.

The expected behavior is that the bar chart shows up in job mode as it does in interactive mode.

This can be fixed by casting the "test_value" column type to float.

Thanks for letting me know if other information is required.

Regards,

Cristian

2 REPLIES 2

cristianc
Contributor

Greetings,

This is interesting actually when I export to HTML the issue is not happening.

Sorry but this was a bit confusing, in the previous message the notebooks will not illustrate the problem because of this, therefore I have deleted that message to avoid confusion.

It is only when looking at the results in the job run view as shown in the screenshot from attachment.

Regards,

Cristian

cristianc
Contributor

Attaching some more screenshots to add more details.

This seems to be a bug in the bar chart visualization widget when displaying from job run.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group