Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Extract tables and fields from the sql by calcite, sqlprase and druid.

Notifications You must be signed in to change notification settings

SoulSong/sql-parse-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Feature

该工程主要提供了提取SQL文本中table和field信息的样本实例,以及对SQL文进行简单规则检验。核心依赖:

  • Apache Calcite
  • SqlParse
  • Ali Druid
Ali Druid 提供了比较丰富功能,其整体落地成本更低。相较其他两款解析器,额外添加了sql归一化示例。

为了减少中间表等噪音干扰,目前约定仅统计TABLE_PREFIX指定的前缀表;同理,在SQL文本中表字段仍然会 由于大量的别名导致无法将字段与目标表进行有效关联,故仅采集带有TABLE_PREFIX前缀,指定字段来源的filed信息。

About

Extract tables and fields from the sql by calcite, sqlprase and druid.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages