In this article, we will show you how you can insert your data to ClickHouse from CSV file.
To do that, we will use a python script.
First, download the python script from the command given below.
git clone https://github.com/ChistaDATA/Csv-To-ClickHouse
Open the script file with your editor and edit the following rows with your ClickHouse server information.
conn = clickhouse_driver.Client(host='localhost', port=9000) with open('data.csv', 'r') as f: query = f"INSERT INTO table ({columns}) VALUES "
Now you can run the script:
python uploadFile.py or python3 uploadFile.py