更新 Google 表格源中的数据时,Google Looker 不显示值

问题描述 投票:0回答:1

我会澄清这个问题。我的谷歌表从 api 接收数据(参见屏幕截图)。每次更新后,信息都会更新并添加新列。结果,表中的其他列发生了移动。我举了一个我感兴趣的专栏的例子 'result.postings.financial_data.products.1.total_discount_value' 。由于信息定期更新,列地址也会因移位而发生变化。所以更新后google Looker无法检测到它,需要更新源字段。问题!!!我怎样才能做到这一点,以便当我在 google Looker 中移动包含数据的列时,我不必每次都更新数据源字段?

这是谷歌表格中包含信息的来源https://docs.google.com/spreadsheets/d/1_D0DM-CLUFa-O8amGPRXrFGky3SHdlBG7__YztrUq_s/edit?usp=sharing(如果它有助于解决我的问题)。

有数据的条件表: | result.postings.financial_data.products.1.total_discount_value |结果.postings.financial_data.products.1.total_discount_percent | | -------- | -------------- | | 555| 123 | 123 | 555| 1234|

或者是否可以让 google Looker 将所有列视为相对而不是绝对?

我不知道原则上该怎么做。通常,如果列有标题,则该列位于何处并不重要。最主要的是列名不应该改变。

json http-post google-cloud-dataflow looker-studio
1个回答
0
投票

制作一个工作表,其中第一列中包含查找器数据源所需的列。

结果.postings.posting_number 1 Col1 结果.postings.order_id 2 Col2

然后在第二列和第三列中使用公式( =match(A1, Your_sheet_name!1:1,0) )和 =CONCAT("Col", B1) 制作上表。

接下来在第三列末尾使用 =concat("Select ",TEXTJOIN(", ",true,C1:C6)) 您将获得此格式的输出 选择 Col1, Col2, Col3,.....

现在您已可以使用查询了。

创建另一个工作表并提出查询。 =query({Your_sheet_name!A:ZZ},Sheet2!C7) 将 Sheet2!C7 替换为您的查询位置。

样本表: https://docs.google.com/spreadsheets/d/14VjyybNYRAVzkk9SUJiMEsPLGU5iLACvCk0JHNetEB8/

© www.soinside.com 2019 - 2024. All rights reserved.