开发者社区 > 博文 > 【JUSTQL Reference】UDF介绍之其他常用UDF
分享
  • 打开微信扫码分享

  • 点击前往QQ分享

  • 点击前往微博分享

  • 点击复制链接

【JUSTQL Reference】UDF介绍之其他常用UDF

  • 京东城市JUST团队
  • 2021-01-26
  • IP归属:未知
  • 727浏览

1.1.1.1 st_geomFromGeoHash(column_name,geohash_length)

功能

          将用户原始数据中的geohash列,变为Polygon, st_geomFromGeoHash(column_name, geohash_length)

input

          column_name: geohash列名, geohash_length: geohash长度

output

          geohash转成的polygon

example

LOAD hdfs :'/just_test/ddregion'

to

just:$ddregionTableName
Config
{
oid:"0",

--此处将索引为第一列的geohash数据转换为polygon传入表的GEOM列中
geom:"st_geomFromGeoHash(1,'35')",
time:"to_timestamp(2)",
product_number:"3"
}
separator ','

1.1.1.2 st_buildRoutes(column_name)

功能

          将用户原始数据中的routes列,变为routeOfTrajectory插件表的routes对象, st_buildRoutes(column_name)

input

          column_name: routes列名

output

          routeOfTrajectory插件表的routes对象

example

LOAD hdfs :'/just_ci_data/trajectory_upload/route_traj_upload.csv'

to

just:$tableName
Config{
oid:'oid',
tid:'tid',
start_position:"st_geomFromWKT(start_position)",
end_position:"st_geomFromWKT(end_position)",
geom:"st_geomFromWKT(geom)",

-- 此处将原始数据的routes列的数据转换为routes对象传入表的routes列中
routes:"st_buildRoutes(routes)"
}
SEPARATOR '|' WITH HEADER

1.1.1.3 st_seriesFromDownloadTraj(column_name)

功能

          将用户原始数据中的st_series列,变为轨迹插件表的st_series对象, st_seriesFromDownloadTraj(column_name)

input

          column_name: st_series列名

output

          轨迹插件表的st_series对象

example

LOAD hdfs :'/just_ci_data/trajectory_upload/raw_traj.csv'

to

just:$tableName
Config{
oid:'oid',
tid:'tid',

--此处将原始数据的st_series列的数据转换为st_series对象传入轨迹表的st_series

st_series:"st_seriesFromDownloadTraj(st_series)"
}
SEPARATOR '|' WITH HEADER

1.1.1.4 st_seriesFromDownloadMapMatchedTraj(column_name)

功能

          将用户map match to projection的数据中的st_series列,变为轨迹插件表的st_series对象, st_seriesFromDownloadMapMatchedTraj(column_name)

input

          column_name: st_series列名

output

          轨迹插件表的st_series对象

example

LOAD hdfs :'/just_ci_data/trajectory_upload/MM_toProjection.csv' to

just:$tableName
Config{
oid:'oid',
tid:'tid',

-- map match to projection的数据的st_series列转换为st_series对象传入轨迹表的st_series列中
st_series:"st_seriesFromDownloadMapMatchedTraj(st_series)"

}
SEPARATOR '|' WITH HEADER

共0条评论