diff --git a/docs-en/05-develop/01-connect/01-python.md b/docs-en/05-develop/01-connect/01-python.md index 0dfae33c237a53eab8a576b005302d862e09a781..c137df32f66079fbce9ba6ecc4e414157b9fb765 100644 --- a/docs-en/05-develop/01-connect/01-python.md +++ b/docs-en/05-develop/01-connect/01-python.md @@ -31,6 +31,8 @@ You should replace above placeholders as real values. To obtain these values, pl ## Connect +Copy code bellow to your editor and run it with `python3` command. + ```python import taosrest import os @@ -41,4 +43,4 @@ token = os.environ["TDENGINE_CLOUD_TOKEN"] conn = taosrest.connect(url=url, token=token) ``` -The client connection is then established. For how to write data and query data, please refer to [basic usage](../../connector/python#basic-usage). +The client connection is then established. For how to write data and query data, please refer to [sample-program](https://docs.tdengine.com/cloud/connector/python/#sample-program). diff --git a/docs-en/05-develop/01-connect/02-java.md b/docs-en/05-develop/01-connect/02-java.md index b8c3bdeab70cdced431ac55084ed245e5b9a16a0..256908437361f491d6edea2a4aded9aefbc9b905 100644 --- a/docs-en/05-develop/01-connect/02-java.md +++ b/docs-en/05-develop/01-connect/02-java.md @@ -42,6 +42,8 @@ You should replace above placeholders as real values. To obtain these values, pl ## Connect +Code bellow get variable URL and token from environment first and then create a `RestfulConnection` object, witch is a standard JDBC Connection object. + ```java import com.taosdata.jdbc.rs.RestfulConnection; import java.sql.Connection; @@ -51,10 +53,9 @@ public class ConnectCloudExample { public static void main(String[] args) throws Exception { String url = System.getenv("TDENGINE_CLOUD_URL"); String token = System.getenv("TDENGINE_CLOUD_TOKEN"); - // create a standard JDBC connection. Connection conn = new RestfulConnection(url, token); } } ``` -The client connection is then established. \ No newline at end of file +The client connection is then established. For how to write data and query data using the connection, please refer to [usage-examples](https://docs.tdengine.com/reference/connector/java#usage-examples). \ No newline at end of file diff --git a/docs-en/09-connector/python.md b/docs-en/09-connector/python.md index 16e8e1d85d5546acb6eb9bb8ef4bc5d4b18c1897..c787b18c948a538bf32447d5ce851b82932a1a72 100644 --- a/docs-en/09-connector/python.md +++ b/docs-en/09-connector/python.md @@ -71,7 +71,7 @@ For a more detailed description of the `sql()` method, please refer to [RestClie | ----------------- | ----------------------------------------- | ------------ | | 2.3.3 | support connect to TDengine Cloud Service | 2022-06-06 | -[**Release Notes**] (https://github.com/taosdata/taos-connector-python/releases) +[**Release Notes**](https://github.com/taosdata/taos-connector-python/releases) ## API Reference