DBT中文社区

    • Register
    • Login
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • 达之云

    开源软件DBT中文社区

    微信号:DBT_CN

    QQ群:551308350

    暴露Exposures使用说明

    使用指南
    1
    1
    787
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dazdata last edited by dazdata

      通过暴露,可以定义和描述将要在dbt项目下游使用的资源,例如在仪表板、应用程序或数据科学管道中。通过定义暴露,您可以:

      • 运行、测试并列出为您的曝光提供的资源
      • 使用与数据使用者相关的上下文填充自动生成的文档站点中的专用页面

      声明暴露

      在模型配置文件种声明
      models/<filename>.yml
      version: 2

      exposures:

      • name: weekly_jaffle_metrics
        label: Jaffles by the Week
        type: dashboard
        maturity: high
        url: https://bi.tool/dashboards/1
        description: >
        Did someone say "exponential growth"?

        depends_on:

        • ref('fct_orders')
        • ref('dim_customers')
        • source('gsheets', 'goals')
        • metric('count_orders')

        owner:
        name: Callum McData
        email: data@jaffleshop.com

      引用暴露

      定义曝光后,可以运行引用它的命令:
      dbt run -s +exposure:weekly_jaffle_report
      dbt test -s +exposure:weekly_jaffle_report
      当我们生成文档站点时,您将看到以下信息:
      替代文字
      替代文字
      暴露的模型在DAG种显示为橙色。

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Powered by Dazdata MDS | 武汉达之云计算有限公司