feat: 提交

master
old-tom 4 months ago
parent b14833c79d
commit ee555471a1

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

@ -2,6 +2,7 @@
## 1. 镜像加速
```shell
# 添加 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
# 阿里云 -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
pip install 'acryl-datahub[oracle]' -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn
```

@ -0,0 +1,46 @@
hive 是分区表需要在transform指定分区字段,例(y_birth)另外hive_site_path和hdfs_site_path 需要和metastore_uri保持一致即hive客户端均为同一个。
```hocon
env {
parallelism = 1
job.mode = "STREAMING"
}
source {
Kafka {
schema = {
fields {
name = "string"
age = "int"
y_birth = "int"
}
}
topic = "ST_DATA"
bootstrap.servers = "172.31.51.241:9092,172.31.51.242:9092,172.31.51.243:9092"
kafka.config = {
client.id = client_1
auto.offset.reset = "latest"
}
}
}
transform {
FieldMapper {
field_mapper = {
name = name
age = age
y_birth = y_birth
}
}
}
sink {
Hive {
metastore_uri = "thrift://bg1:9083"
table_name = "ods.zr_test_table"
hive_site_path = "/opt/datasophon/hive-3.1.3/conf/hive-site.xml"
hdfs_site_path="/opt/datasophon/hadoop/etc/hadoop/hdfs-site.xml"
}
}
```
hive 表建表语句
![[Pasted image 20250415152322.png]]

@ -25,6 +25,24 @@ SELECT
format_type(a.atttypid,a.atttypmod) as data_type,
col_description(a.attrelid,a.attnum) as comment
FROM pg_class as c,pg_attribute as a where a.attrelid = c.oid and a.attnum>0 and c.relname = 'Edge_0101';
-- 或者
SELECT a.attnum, a.attname AS field, t.typname AS type, a.attlen AS length, a.atttypmod AS lengthvar
, a.attnotnull AS notnull, b.description AS comment
FROM pg_class c, pg_attribute a
LEFT JOIN pg_description b
ON a.attrelid = b.objoid
AND a.attnum = b.objsubid, pg_type t
WHERE c.relname = 'pg_replication_slots'
AND a.attnum > 0
AND a.attrelid = c.oid
AND a.atttypid = t.oid
ORDER BY a.attnum;
10.查看所有进程
SELECT * FROM pg_stat_activity WHERE datname='数据库名'
11.根据pid结束进程
select pg_cancel_backend(pid)
```
## 二、函数

@ -213,4 +213,7 @@ http://localhost:8081/#/overview
```shell
docker pull marqoai/marqo:latest
docker run --name marqo -it --privileged -p 8882:8882 --add-host host.docker.internal:host-gateway marqoai/marqo:latest
-- GPU运行
docker run --name marqo -it --privileged --gpus all -p 8882:8882 --add-host host.docker.internal:host-gateway marqoai/marqo:latest
```

Loading…
Cancel
Save