我有一个 pgAdmin 数据库,其中包含数百万行 geojson 格式。使用此表我创建 Tableau 仪表板。由于行包含geojson格式的数据,我必须像这样查询:
select jsondata ->> 'id' as id,
jsondata -> 'properties' ->> 'qq',,
jsondata -> 'properties' ->> 'www',
jsondata -> 'properties' ->> 'eeee',
jsondata -> 'properties' ->> 'qwer' ,
jsondata -> 'properties' ->> 'yyy',
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>0,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>1,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>2,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>3,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>4,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>5,'@',2),
split_part(jsondata -> 'properties' -> '@ab:com:abc:wxy'->'tags'->>6,'@',2),
TIMESTAMP 'epoch' + cast(cast(jsondata -> 'properties'->'@ab:com:abc:wxy'->>'createdAt'as bigint)/1000 as int) * INTERVAL '1 second' as create_date,
TIMESTAMP 'epoch' + cast(cast(jsondata -> 'properties'->'@ab:com:abc:wxy'->>'updatedAt'as bigint)/1000 as int) * INTERVAL '1 second' as Update_date
from schema.table_name
当数据有千行时,我曾经将这个数据库与 tableaue 实时连接,但现在数据已经增加,而且会一天天增加。我想使用 ETL 过程创建画面仪表板,我正在考虑Talend,但我想使用 python 以编程方式完成它。
谁能建议我怎么做?