【问题标题】:Firebase Analytics -> BigQuery how to query user_dim.user_properties within C#Firebase Analytics -> BigQuery 如何在 C# 中查询 user_dim.user_properties
【发布时间】:2017-01-05 14:37:28
【问题描述】:

我正在尝试查询从 firebase 导出的表,但在从 C# 中访问值时遇到问题。我可以通过从表中执行SELECT user_dim.* 来查询前缀为user_dim 的任何内容,但是如果我想访问user_dim.user_properties.value,例如,我无法获取No such field: 'user_properties.value'。下面的代码正在查询表,它只是没有获取我想要的所有行。

using System;
using Google.Cloud.BigQuery.V2;

namespace BigQueryExample
{
    class MainClass
    {
        public static void Main(string[] args)
        {
            // Your Google Cloud Platform project ID
            string projectId = "hidden";

            // Instantiates a client
            BigQueryClient client = BigQueryClient.Create(projectId);

            var table = client.GetTable("hidden", "hidden", "hidden");

            try
            {
                string query = $@"SELECT user_dim.* FROM `{table.FullyQualifiedId}` LIMIT 100";
                var result = client.ExecuteQuery(query);
                Console.Write("\nQuery Results:\n------------\n");
                foreach (var row in result.GetRows())
                {
                    Console.WriteLine(row["user_properties.value"]);
                }
            } catch (Exception e)
            {
                Console.WriteLine(e);
            }



            Console.ReadLine();
        }
    }
}

任何帮助都会很好地帮助我完成这项工作。

【问题讨论】:

    标签: c# mysql firebase firebase-realtime-database google-bigquery


    【解决方案1】:

    我只是将查询运行为:

    SELECT user_dim.* FROM `table`
    

    这会抓取user_dim 下的所有列

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-23
      • 2021-02-26
      • 1970-01-01
      • 1970-01-01
      • 2020-10-26
      • 2022-07-27
      • 1970-01-01
      相关资源
      最近更新 更多