Closed skyth540 closed 1 month ago
I was able to replicate the issue on my machine as well (Apple M1 Pro Sonoma 14.6.1)
Unable to complete action Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database. Error Code: FAB9A2C5 [SQLSTATE:0AS01] error opening database 'example': There was an error during loading database: unsupported version. To open this database, please update your product: DatabaseId: "hyper.file:/Users/robschaper-m1/Code/pantab/example.hyper" Unable to connect to the Tableau Data Extract server "". Check that the server is running and that you have access privileges to the requested database.
When Attempting to open the example hyper file in Tableau Desktop (2024.2.2), generated using the following in Jupyter Notebook:
import pandas as pd import pantab as pt
df = pd.DataFrame([ ["dog", 4], ["cat", 4], ], columns=["animal", "num_of_legs"])
pt.frame_to_hyper(df, "example.hyper", table="animals")
A similar thing happened when opening in alteryx 2021.2
""" error opening database 'test': There was an error during loading database "hyper.file:G:...\test.hyper":unsupported version 4 (max supported version: 1). To open this database, please update your product. Context: 0xd6232f85
"""
I think this is a duplicate of https://github.com/innobi/pantab/issues/331
If you install from main you should now be able to try:
params = {"default_database_version": "1"}
pt.frame_to_hyper(table, path, table = 'test', process_params=params)
can you see if that works to resolve the issue?
FWIW I asked about the database versions on the Tableau slack today, so hope to hear back about that soon
OK Tableau shared the following with me which I think has good info:
https://tableau.github.io/hyper-db/docs/hyper-api/hyper_process/#default_database_version
Looks like version 0 is the default but is deprecated alongside version 1. So I think we should set the default value to 2 and leave it to the user to use a more recent version? @skyth540 that wouldn't solve the issue you are seeing with alteryx by default, but as mentioned in the previous post you can now provide the process_params
argument to override that default.
Thoughts?
@jorwoods may have some input as well
Given the versions of Tableau Desktop/Server/Prep supported, I think setting the hyper version to 2 as a default makes sense. I'll make a PR soon to update the pantab docs to reference that page so pantab users know the implications of updating that setting.
I uninstalled pantab, and successfully reinstalled it using pip install git+https://github.com/innobi/pantab.git
I got this error:
----> 4 pt.frame_to_hyper(table, path, table = 'test', process_params=params)
TypeError: frame_to_hyper() got an unexpected keyword argument 'process_params'
So then I cloned the repo, and I can see in _writer.py on my computer where the change is:
`def frame_to_hyper(
df,
database: Union[str, pathlib.Path],
*,
table: pantab_types.TableNameType,
table_mode: Literal["a", "w"] = "w",
not_null_columns: Optional[set[str]] = None,
json_columns: Optional[set[str]] = None,
geo_columns: Optional[set[str]] = None,
process_params: Optional[dict[str, str]] = None,
) -> None:
"""See api.rst for documentation"""
frames_to_hyper(
{table: df},
database,
table_mode=table_mode,
not_null_columns=not_null_columns,
json_columns=json_columns,
geo_columns=geo_columns,
process_params=process_params,
)
and I installed from the clone, but still nothing.
@skyth540 hard to say. Might be helpful to post the full traceback and make sure the file paths are resolving to the locations you think they are
Describe the bug I successfully created a .hyper, but in tableau, it is unable to connect to it. Version 2023.1.0
""" Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database. Error Code: FAB9A2C5
[SQLSTATE:0AS01] error opening database 'test': There was an error during loading database: unsupported version. To open this database, please update your product: DatabaseId: "hyper.file:G:/Duda/Data Projects/Kroger 8451/Raw Data New/parquet/test.hyper" Unable to connect to the Tableau Data Extract server "". Check that the server is running and that you have access privileges to the requested database. """
To Reproduce Steps to reproduce the behavior: