Update 09-udf.md
This commit is contained in:
parent
cb82453a43
commit
6ccefe9891
|
@ -667,7 +667,7 @@ grep 'sys path' taospyudf.log | tail -1
|
||||||
|
|
||||||
You may find that the default library search path is `/lib/python3/dist-packages` (just for example, it may be different in your system), but `moment` is installed to `/usr/local/lib/python3.8/dist-packages` (for example, it may be different in your system). Then we change the library search path of python UDF.
|
You may find that the default library search path is `/lib/python3/dist-packages` (just for example, it may be different in your system), but `moment` is installed to `/usr/local/lib/python3.8/dist-packages` (for example, it may be different in your system). Then we change the library search path of python UDF.
|
||||||
|
|
||||||
Check `sys.path`
|
Check `sys.path`, which must include the packages you install with pip3 command previously, as shown below:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
>>> import sys
|
>>> import sys
|
||||||
|
@ -683,6 +683,8 @@ UdfdLdLibPath /usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/local/lib/p
|
||||||
|
|
||||||
Save it, then restart `taosd`, using `systemctl restart taosd`, and test again, it will succeed this time.
|
Save it, then restart `taosd`, using `systemctl restart taosd`, and test again, it will succeed this time.
|
||||||
|
|
||||||
|
Note: If your cluster consists of multiple `taosd` instances, you have to repeat same process for each of them.
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
taos> select ts, nextsunday(ts) from t;
|
taos> select ts, nextsunday(ts) from t;
|
||||||
ts | nextsunday(ts) |
|
ts | nextsunday(ts) |
|
||||||
|
|
Loading…
Reference in New Issue