西安网站建设推荐q479185700上墙,免费空间最大的网盘,目前专业做水果的网站,wordpress 相册 免费模板通过DataHub提取和管理hive元数据 本文由「大千AI助手」原创发布#xff0c;专注用真话讲AI#xff0c;回归技术本质。拒绝神话或妖魔化。搜索「大千AI助手」关注我#xff0c;一起撕掉过度包装#xff0c;学习真实的AI技术#xff01; 简介
通过DataHub的Hive数据源连接… 通过DataHub提取和管理hive元数据 本文由「大千AI助手」原创发布专注用真话讲AI回归技术本质。拒绝神话或妖魔化。搜索「大千AI助手」关注我一起撕掉过度包装学习真实的AI技术 简介
通过DataHub的Hive数据源连接器可以接入Hive的库、表、列、存储信息、统计信息等元数据哪些元数据 库、表的元数据列的类型的元数据详细的表属性和存储的元数据表、行、列的统计信息的元数据(需要SQL Profiling功能) DataHub中的功能点 资产容器(Asset Containers)描述信息(Descriptions)平台实例(Platform Instance)Schema元数据(Schema Metadata)分类(Classification) 需要设置classification.enabled 删除实体检测(Detect Deleted Entities) 需要设置stateful_ingestion.remove_stale_metadata 领域(Domains) 需要设置domain 底层通过Python的pyhive库进行提取
往期文章推荐:
20.Python3安装MySQL-python踩坑实录从报错到完美解决的实战指南19.Git可视化革命3分钟学会用MermaidAI画专业分支图18.vscode常用快捷命令和插件17.AI制图新纪元3分钟用Mermaid画出专业类图16.3分钟搞定数据可视化Mermaid饼图终极指南15.5分钟玩转Swagger UIDocker部署静态化实战14.记录下blog的成长过程13.再说一说LangChain Runnable接口12.Docker实战5分钟搞定MySQL容器化部署与最佳实践11.Ollama模板全解析从基础语法到高级应用实战10.Ollama完全指南从零开始玩转本地大模型部署9.django中如何解析content-typeapplication/json的请求8.实测DeepSeek分词机制你的输入如何变成计费Token7.英语分词进化论BPE相关论文汇总6.硬核实战 | 3分钟Docker部署ClickHouse列存数据库5.技术深解 | DeepSeek-R1-0528训练参数全透视163K上下文与MoE高效架构的基石4.DeepSeek最新升级实测推理能力翻倍但离世界顶尖还有多远3.血泪教训Redis默认配置竟会导致数据丢失Docker生产部署指南2.Function Call大模型如何突破自身局限“使用工具“1.DeepSeek动手实践创建一个自动连点器
配置
基本配置
从哪里取
sqlalchemy_uri- string, 连接URI. 优先级最高(高于其他连接参数). 参考 - https://docs.sqlalchemy.org/en/14/core/engines.html#database-urls. host_port- string, hive地址和端口, 默认hive:9083, 腾讯云emr为ip:7001username- string, 用户名password- string(password), 密码options- map, 该配置都会作为kwargs参数传给SQLAlchemy.create_engine 设置URL中的连接参数,可以通过connect_args参数指定比如设置认证方式为LDAP, connect_args: auth: LDAP
取什么
include_tables- boolean, 是否提取tables的元数据, 默认 Trueinclude_views- boolean, 是否提取views的元数据. 默认 Trueinclude_view_lineage- boolean, 是否自动提取view-view和table-view的血缘关系(通过DataHub的sql parser从view的创建语句中提取). 默认 Trueinclude_column_lineage- boolean, 是否提取列级血缘关系(从storage中提取), 默认 Trueinclude_view_column_lineage- boolean, 是否自动提取view-view和table-view的列级血缘关系(通过DataHub的sql parser从view的创建语句中提取), 依赖include_view_lineage, 默认 Trueemit_storage_lineage- boolean, 是否生成storage-to-Hive的血缘, 默认Falsehive_storage_lineage_direction- string, upstream则storage是Hive的上游, downstream则storage是Hive的下游, 默认 upstreamdatabase- string, database (catalog), 如果不设置则从所有数据库取(可通过database_pattern过滤)database_pattern- AllowDenyPattern, 要提取的数据库的正则表达式, 默认 {allow: [.*], deny: [], ignoreCase: True} database_pattern.ignoreCase- boolean, 正则匹配时是否忽略大小写, 默认 Truedatabase_pattern.allow- array, 要提取的数据库的正则表达式, 默认 [.*]database_pattern.allow.string- stringdatabase_pattern.deny- array, 不提取的数据库的正则表达式, 默认 []database_pattern.deny.string- string table_pattern- AllowDenyPattern, 要提取的表的正则表达式, 全名匹配database.schema.table, 默认 {allow: [.*], deny: [], ignoreCase: True} 示例Customer.public.customer.*实际验证还是database.table的格式table_pattern.ignoreCase- boolean, 正则匹配时是否忽略大小写, 默认 Truetable_pattern.allow- array, 要提取的表的正则表达式, 默认 [.*]table_pattern.allow.string- stringtable_pattern.deny- array, 不提取的表的正则表达式, 默认 []table_pattern.deny.string- string view_pattern- AllowDenyPattern, 要提取的视图的正则表达式, 全名匹配database.schema.table, 默认取值同table_pattern 示例Customer.public.customer.*view_pattern.ignoreCase- boolean, 正则匹配时是否忽略大小写, 默认 Trueview_pattern.allow- array, 要提取的视图的正则表达式, 默认 [.*]view_pattern.allow.string- stringview_pattern.deny- array, 不提取的视图的正则表达式, 默认 []view_pattern.deny.string- string column_pattern- AllowDenyPattern, 要提取的列的正则表达式, 全名匹配database.schema.table.column, 默认 {allow: [.*], deny: [], ignoreCase: True} column_pattern.ignoreCase- boolean, 正则匹配时是否忽略大小写, 默认 Truecolumn_pattern.allow- Array of string, 要提取的列的正则表达式列表, 默认 [.*]column_pattern.allow.string- stringcolumn_pattern.deny- Array of string, 不要提取的列的正则表达式列表, 默认 []column_pattern.deny.string- string profile_pattern- AllowDenyPattern, 用来提取profile的表或列的正则表达式(与table_pattern取交集), 默认 {allow: [.*], deny: [], ignoreCase: True} 参考datahub-profile profiling- profile的配置, 默认 {enabled: False, operation_config: {lower_freq_profile_enabled: False, profile_day_of_week: None, profile_date_of_month: None}, limit: None, offset: None, profile_table_level_only: False, include_field_null_count: True, include_field_distinct_count: True, include_field_min_value: True, include_field_max_value: True, include_field_mean_value: True, include_field_median_value: True, include_field_stddev_value: True, include_field_quantiles: False, include_field_distinct_value_frequencies: False, include_field_histogram: False, include_field_sample_values: True, max_workers: 20, report_dropped_profiles: False, turn_off_expensive_profiling_metrics: False, field_sample_values_limit: 20, max_number_of_fields_to_profile: None, profile_if_updated_since_days: None, profile_table_size_limit: 5, profile_table_row_limit: 5000000, profile_table_row_count_estimate_only: False, query_combiner_enabled: True, catch_exceptions: True, partition_profiling_enabled: True, partition_datetime: None, use_sampling: True, sample_size: 10000, profile_external_tables: False, tags_to_ignore_sampling: None, profile_nested_fields: False} 参考datahub-profile
特殊标识
platform_instance- string, 平台实例(该配置获取的所有资产所属的平台实例) 参考 - https://datahubproject.io/docs/platform-instances/ storage_platform_instance- string, storage系统的平台实例env- string, 环境名(该配置获取的所有资产所属的环境), 默认 PROD 比如从多个Hive实例获取数据,则可以设置env为不同的值 domain- map(str,AllowDenyPattern) 参考datahub-domain classification- ClassificationConfig, 分类信息, 默认{enabled: False, sample_size: 100, max_workers: 4, table_pattern: {allow: [.*], deny: [], ignoreCase: True}, column_pattern: {allow: [.*], deny: [], ignoreCase: True}, info_type_to_term: {}, classifiers: [{type: datahub, config: None}]} 参考 - https://datahubproject.io/docs/0.15.0/metadata-ingestion/docs/dev_guides/classification/参考datahub-classification
怎么取
incremental_lineage- boolean, 是否增量更新DataHub中已有的血缘关系, 默认 Falseconvert_urns_to_lowercase- boolean, 是否转换dataset的urns为全小写, 默认 Falseuse_file_backed_cache- boolean, 是否对view定义使用基于文件的缓存, 默认 Truestateful_ingestion- StatefulStaleMetadataRemovalConfig, 提取状态设置 stateful_ingestion.enabled- boolean, 是否有状态的提取,默认如果设置pipeline_name且指定datahub-rest或datahub_api则为True, 否则Falsestateful_ingestion.fail_safe_threshold- number, 阻止状态改变的阈值(和之前的entity相比如果新提取的entity变化的比例超过该阈值则主动失败), 取值0-100, 默认75.0stateful_ingestion.remove_stale_metadata- boolean, 是否软删除上次成功运行提取的有但本次提取没有的实体, 默认True 依赖stateful_ingestion.enabledTrue
实例配置
基本配置
source:type: hiveconfig:host_port: localhost:10000database: DemoDatabaseusername: userpassword: pass# For more details on authentication, see the PyHive docs:# https://github.com/dropbox/PyHive#passing-session-configuration.# LDAP, Kerberos, etc. are supported using connect_args, which can be# added under the options config parameter.#options:# connect_args:# auth: KERBEROS# kerberos_service_name: hive#scheme: hivehttp # set this if Thrift should use the HTTP transport#scheme: hivehttps # set this if Thrift should use the HTTP with SSL transport#scheme: sparksql # set this for Spark Thrift Server参考
https://datahubproject.io/docs/generated/ingestion/sources/hive/ 本文由「大千AI助手」原创发布专注用真话讲AI回归技术本质。拒绝神话或妖魔化。搜索「大千AI助手」关注我一起撕掉过度包装学习真实的AI技术