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

full table name (including database) seems not working with insert_file() function #305

Closed
Kevin9436 opened this issue Feb 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Kevin9436
Copy link

Describe the bug

when pass full table name to insert_file(), will raise table not exist exception

Steps to reproduce

  1. create database test
  2. create table test.test_1
  3. insert data with function insert_file(client, 'test.test_1', file_path)

Expected behaviour

No exception.

Code example

from clickhouse_connect import get_client
from clickhouse_connect.driver.tools import insert_file

# create database test
# create table test.test_1
# then
insert_file(get_client(xxx), 'test.test_1', file_path, fmt='Parquet')

clickhouse-connect and/or ClickHouse server logs

Configuration

Environment

  • clickhouse-connect version: 0.7.0
  • Python version: 3.8.0
  • Operating system:

ClickHouse server

  • ClickHouse Server version:
  • ClickHouse Server non-default settings, if any:
  • CREATE TABLE statements for tables involved:
  • Sample data for these tables, use clickhouse-obfuscator if necessary
@Kevin9436 Kevin9436 added the bug Something isn't working label Feb 28, 2024
@genzgd
Copy link
Collaborator

genzgd commented Feb 28, 2024

insert_file takes a database keyword that you can use instead of a full table name, but you're correct that using the full table name instead of the separate database argument is currently broken. There should be a fix in the next release.

@genzgd
Copy link
Collaborator

genzgd commented Feb 28, 2024

Fixed in v0.7.1

@genzgd genzgd closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants