【发布时间】: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