[英]Add Data Programatically into custom column created on BigQuery Table
I have created a column in the events table on BigQuery to log some event information.我在 BigQuery 的事件表中创建了一个列来记录一些事件信息。
How can I add data into that specific column programmatically from a mobile application?如何从移动应用程序以编程方式将数据添加到该特定列中?
This is my BigQuery Table这是我的 BigQuery 表
This is my Firebase schema这是我的 Firebase 架构
This is the code I tried so far这是我到目前为止尝试过的代码
Bundle params = new Bundle();
params.putString("image_name", name);
params.putString("full_text", text);
mFirebaseAnalytics.logEvent("share_image", params);
All client libraries for BigQuery are designed to be used in a trusted environment, such as your development machine, a server that you control, or Cloud Functions. BigQuery 的所有客户端库都旨在用于受信任的环境,例如您的开发机器、您控制的服务器或 Cloud Functions。 There are no official SDKs for Android or iOS that I know of.
我知道没有适用于 Android 或 iOS 的官方 SDK。
The simplest I can think of is to host code using one of these libraries in Cloud Functions (either through Firebase, or directly through the gcloud
tooling) to insert data into BigQuery, and then call that Cloud Function from your mobile app.我能想到的最简单的方法是使用 Cloud Functions 中的这些库之一(通过 Firebase 或直接通过
gcloud
工具)托管代码以将数据插入 BigQuery,然后从您的移动应用程序调用该 Cloud Function。 Be sure to secure access to that Cloud Function, so that only authorized users can insert data.请务必确保对该 Cloud Function 的访问安全,以便只有经过授权的用户才能插入数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.