简体   繁体   English

Google Data Studio - 用户定义函数 (UDF) 的使用

[英]Google Data Studio - Use of User Defined Functions (UDFs)

Basic Question: Does Google Data Studio allow calling a SQL User Defined Function (UDF) within a Custom Query data source?基本问题:Google Data Studio 是否允许在自定义查询数据源中调用 SQL 用户定义的 Function (UDF)?

My UDF works great in BigQuery.我的 UDF 在 BigQuery 中运行良好。 The exact same code (SQL call to a UDF) fails when creating a report to leverage this data source/code.创建报告以利用此数据源/代码时,完全相同的代码(对 UDF 的 SQL 调用)失败。

The following error is encountered: Data Set Configuration Error Data Studio cannot connect to your data set.遇到以下错误:Data Set Configuration Error Data Studio 无法连接到您的数据集。 Failed to fetch data from the underlying data set Error ID: 53979666无法从基础数据集获取数据错误 ID:53979666

+1 to the question, looking for a better solution, too. +1 这个问题,也在寻找更好的解决方案。

My current walkaround is far from ideal, but perhaps could be good enough for someone:我目前的解决方法远非理想,但也许对某些人来说已经足够好了:

  1. scheduled query that executes and materialises data执行和具体化数据的计划查询
  2. datastudio on top of table created in step 1在步骤 1 中创建的表顶部的数据工作室

Though you can't create a user-defined function in a Data Studio custom query, you can define a UDF in BigQuery and use it in the custom query.虽然您无法在 Data Studio 自定义查询中创建用户定义的 function,但您可以在 BigQuery 中定义 UDF 并在自定义查询中使用它。

Source: https://www.anvilinsights.com/video/user-defined-functions-udf-in-custom-query来源: https://www.anvilinsights.com/video/user-defined-functions-udf-in-custom-query

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kusto 查询语言:用户定义函数的语义错误 - Kusto Query Language: semantic error on user-defined functions 如何使用用户可以在 getFields 的计算字段中更新的参数(Data Studio 社区连接器) - How to use a parameter which a user can update in a calculated field in getFields (Data Studio Community Connector) 在 Google Data Studio 中更改指标格式 - Change metric format in Google Data Studio Google Data Studio:缺少过滤器 inheritance 选项 - Google Data Studio: Filter inheritance options missing 将 mono-repo 与 Google Cloud Functions 结合使用 - Use of mono-repo with Google Cloud Functions 在 Google 数据工作室中,我添加了输入框控件,我想将它用作 Word 过滤器 - In Google data studio I have added input box control and I want to use it as a Word Filter 禁用数据刷新谷歌数据工作室 - Disable data refresh google data studio 在 Android Studio 中,如何检查用户是匿名登录还是使用 email 或 google 登录? - In Android Studio, how to check if user logged in anonymously or with email, or google sign in? 如何阻止未经身份验证的用户使用我的 Cloud Functions? - How can I block unauthenticated user use my Cloud Functions? 在 Google Data Studio 或 SQL 中避免数据聚合中的“无穷大” - Avoid 'infinity' in data aggregates in Google Data Studio or SQL
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM