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

can support jdbc bridge? #215

Open
wonb168 opened this issue May 3, 2024 · 4 comments
Open

can support jdbc bridge? #215

wonb168 opened this issue May 3, 2024 · 4 comments
Labels
question Further information is requested

Comments

@wonb168
Copy link

wonb168 commented May 3, 2024

has a clickhouse-jdbc-bridge,can chdb support this?

@wonb168 wonb168 added the question Further information is requested label May 3, 2024
@auxten
Copy link
Member

auxten commented May 4, 2024

You can use the jdbc table function: https://clickhouse.com/docs/en/sql-reference/table-functions/jdbc

@wonb168
Copy link
Author

wonb168 commented May 5, 2024

此表函数需要单独的 clickhouse-jdbc-bridge 程序才能运行?

@auxten
Copy link
Member

auxten commented May 5, 2024

You don't need a standalone clickhouse-jdbc-bridge

@wonb168
Copy link
Author

wonb168 commented May 5, 2024

I tested, need install and start jdbc-bridge first:

#%%
import chdb
print(chdb.__version__)
# %%
#postgres://hvycjfbu:[email protected]:5432/hvycjfbu
url="jdbc:postgres://hvycjfbu:[email protected]:5432/hvycjfbu"
sql="select version()"
sql=f"""SELECT * FROM jdbc('{url}', '${sql}')"""
res = chdb.query(sql, 'Dataframe')
print(res)
# %%

raise error:

ChdbError: Code: 410. DB::Exception: clickhouse-jdbc-bridge is not running. Please, start it manually. (EXTERNAL_SERVER_IS_NOT_RESPONDING)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants