Kaynağa Gözat

Add declaration at head of python file for chinese comments

pull/7/head
Bruce-Jay 1 yıl önce
ebeveyn
işleme
206b513684
1 değiştirilmiş dosya ile 12 ekleme ve 3 silme
  1. +12
    -3
      Assignment5.md

+ 12
- 3
Assignment5.md Dosyayı Görüntüle

@ -180,7 +180,10 @@ pip3 install --user -i https://mirrors.aliyun.com/pypi/simple clickhouse-driver
##### 2.2)quit()退出python3命令行,让我们运行几个Python代码来实现建表,插入,查询等操作。
> 建立createTable.py文件(若忘记创建文件命令可参考[实验一](https://gitea.shuishan.net.cn/xslu_dase_ecnu_edu_cn/cloud-computing-course/src/branch/master/Assignment1.md)),并复制如下代码。其中username,password,hostIP,port都要替换成你的数据仓库参数。
```
```python
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
import clickhouse_driver
# 建立连接
@ -212,7 +215,10 @@ python3 createTable.py
```
> 向COMPANY表中添加一些记录。建立insertTable.py文件,复制如下代码并运行。
```
```python
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
import clickhouse_driver
# 建立连接
@ -227,7 +233,10 @@ conn.close()
```
> 让我们查询一下刚刚建的表。建立selectTable.py文件,复制如下代码并运行。
```
```python
#!/usr/bin/env python
# _*_ coding:utf-8 _*_
import clickhouse_driver
# 建立连接

Yükleniyor…
İptal
Kaydet