I have a SQLQueryDataset which is loading fine, bu...
# questions
g
I have a SQLQueryDataset which is loading fine, but I am getting a warning I would like to address.
WARNING  Unable to get file size for the dataset SQLQueryDataset(execution_options={}, filepath=C:/path/to/data/00_scripts/dim_postal_code.sql, load_args={}, sql=None): 'str' object has no attribute 'as_posix'
So I am guessing that it has to do with the formatting of my path in YAML.
data\00_scripts\dim_postal_code.sql
What is an idiomatic way of addressing the warning?
👀 1
j
hmmm looks like we aren't converting a path-like parameter to a path? that seems to come from Kedro-Viz @Rashida Kanchwala @Ravi Kumar Pilla
r
I suppose it's to do the data stats hook?
g
FWIW, I did opt-in to Kedro-Viz when I initialized the project. From my toml:
tools = ['Linting', 'Testing', 'Custom Logging', 'Documentation', 'Data Structure', 'Kedro Viz']
FYI here is my Kedro-Viz version requirements:
kedro-viz>=6.7.0
r
Hi @Galen Seilis, Thank you for raising this. As of now, you can ignore the warning but we will fix this issue in our future release. Would you be happy to open an issue ticket for the same ? Thank you
g
@Ravi Kumar Pilla thanks, I appreciate you looking further into this. Feel free to ask any further questions at this issue: https://github.com/kedro-org/kedro-viz/issues/1797
👍 1
👍🏽 1
j
Hello everyone! I'm getting the same warning when using pandas.DeltaTableDataset 😐
r
Hi @Júlio Resende, Thanks for reporting this. The bug seems to be not dataset specific but a generic error in handling the file path. We will be fixing this in our upcoming sprints. Thank you for your patience
👍 1
j
Thanks, @Ravi Kumar Pilla
Hi @Ravi Kumar Pilla. Was this issue fixed in the last release of kedro-viz?
r
Hi @Júlio Resende, yes it got a fix in v9.0.0
j
I'm still getting a very similar warning for my custom dataset:
Copy code
Unable to get file size for the dataset CustomDeltaTableDataset(...): 'CustomDeltaTableDataset' object has no attribute '_protocol'
Do you have any suggestion about what I can do to stop getting this warning?
👀 1
r
As a quick workaround, if you do not want the dataset stats to be displayed on the kedro-viz metadata panel, you can disable Kedro-Viz hooks via settings.py in your Kedro project like -
DISABLE_HOOKS_FOR_PLUGINS = ("kedro-viz",)
. This should not give you the warning message. Could you please raise a new issue with some more information on the dataset catalog entry for the CustomDeltaTableDataset you are using ? Thank you
j
Thanks, @Ravi Kumar Pilla. After disabling auto-registered kedro-viz’ Hooks in settings.py, no further warnings are raised. I found out that the warnings are also being raised when using pandas.DeltaTableDataset. Here is the issue: https://github.com/kedro-org/kedro-viz/issues/1893
thankyou 1