'pytd.Client' object has no attribute 'query_engine'
Closed this issue · 2 comments
Antchouay12 commented
Following code fails when replacing pandas_td by pytd.pandas_td:
#import pandas_td as td
import pytd.pandas_td as td
con = td.connect(apikey=td_api_key)
engine = con.query_engine(database='global', type='presto')
with error:
AttributeError: 'Client' object has no attribute 'query_engine'
takuti commented
@Antchouay12 Thank you for reporting the error.
Connection#query_engine
has already been deprecated in pandas-td, and hence the function is not transferred to pytd. Would it be possible to update your code as follows?
Before:
engine = con.query_engine(database='global', type='presto')
After:
engine = td.create_engine("presto:gloal", con=con)
See create_engine
API documentation for the detail.
takuti commented
As I commented above, we're not planning to enable the deprecated function. Closing the issue for now, but @Antchouay12 feel free to reopen if any.