简体   繁体   English

谷歌数据工程考试样题

[英]Google Data Engineering Exam Sample Question

I'm not sure about the question and want to get some clarification on that.我不确定这个问题,并希望得到一些澄清。

You are using Cloud Pub/Sub to stream inventory updates from many point-of-sale (POS) terminals into BigQuery.您正在使用 Cloud Pub/Sub 到 stream 库存更新从许多销售点 (POS) 终端到 BigQuery。 Each update event has the following information: product identifier “prodSku”, change increment “quantityDelta”, POS identification “termId”, and “messageId” which is created for each push attempt from the terminal.每个更新事件具有以下信息:产品标识符“prodSku”、更改增量“quantityDelta”、POS 标识“termId”和为来自终端的每次推送尝试创建的“messageId”。 During a network outage, you discovered that duplicated messages were sent, causing the inventory system to over-count the changes.在网络中断期间,您发现发送了重复的消息,导致库存系统高估了更改。 You determine that the terminal application has design problems and may send the same event more than once during push retries.您确定终端应用程序存在设计问题,并且可能在推送重试期间多次发送相同的事件。 You want to ensure that the inventory update is accurate.您要确保库存更新是准确的。 What should you do?你该怎么办?

A. Inspect the “publishTime” of each message. A. 检查每条消息的“发布时间”。 Make sure that messages whose “publishTime” values match rows in the BigQuery table are discarded.确保丢弃“publishTime”值与 BigQuery 表中的行匹配的消息。

B. Inspect the “messageId” of each message. B. 检查每条消息的“messageId”。 Make sure that any messages whose “messageId” values match corresponding rows in the BigQuery table are discarded.确保丢弃“messageId”值与 BigQuery 表中相应行匹配的所有消息。

C. C。 Instead of specifying a change increment for “quantityDelta”, always use the derived inventory value after the increment has been applied.不要为“quantityDelta”指定更改增量,而是始终在应用增量后使用派生的库存值。 Name the new attribute “adjustedQuantity”.将新属性命名为“adjustedQuantity”。

D. Add another attribute orderId to the message payload to mark the unique check-out order across all terminals. D. 在消息负载中添加另一个属性 orderId,以标记所有终端的唯一签出顺序。 Make sure that messages whose “orderId” and “prodSku” values match corresponding rows in the BigQuery table are discarded.确保丢弃“orderId”和“prodSku”值与 BigQuery 表中相应行匹配的消息。

I chose B because I'm assuming that messageID is unique in a way.我选择 B 是因为我假设 messageID 在某种程度上是唯一的。 However, the answer is D. I'm not sure why.但是,答案是 D。我不知道为什么。 Can anyone clarify me on that?任何人都可以澄清我吗? Thanks.谢谢。

For this option:对于此选项:

B. Inspect the “messageId” of each message. B. 检查每条消息的“messageId”。 Make sure that any messages whose “messageId” values match corresponding rows in the BigQuery table are discarded.确保丢弃“messageId”值与 BigQuery 表中相应行匹配的所有消息。

“messageId” which is created for each push attempt from the terminal. “messageId”为终端的每次推送尝试创建。 This means messageId is nothing but an event attribute generated while push.这意味着 messageId 只不过是推送时生成的事件属性。 At the time of push in non-availability, pub-sub may retry the message until it reaches server with new ID every time.在推送不可用时,pub-sub 可能会重试消息,直到它每次到达具有新 ID 的服务器。 Also, if someone bought an item 2 times because he may have forgot to buy 2 quantity, would make an entirely different order and can avail false entry.此外,如果有人因为可能忘记购买 2 个数量而购买了 2 次商品,则会做出完全不同的订单并且可以利用虚假输入。

For Option D,对于选项 D,

D. Add another attribute orderId to the message payload to mark the unique check-out order across all terminals. D. 在消息负载中添加另一个属性 orderId,以标记所有终端的唯一签出顺序。 Make sure that messages whose “orderId” and “prodSku” values match corresponding rows in the BigQuery table are discarded.确保丢弃“orderId”和“prodSku”值与 BigQuery 表中相应行匹配的消息。

orderId provides greater control as this is not an event based attribute like message ID. orderId 提供了更大的控制,因为这不是像消息 ID 这样的基于事件的属性。 So even if some has bought 2 quantities in different order, we have the idea of non-failure.因此,即使有些人以不同的顺序购买了 2 个数量,我们也有不失败的想法。 While if a push retry happens, duplicate orderID can be detected with productSKU.而如果发生推送重试,则可以使用 productSKU 检测到重复的 orderID。

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

相关问题 更改 Google Cloud Metrics 中返回数据的采样率? - Change the sample rate of returned data in Google Cloud Metrics? Google 专业云架构师考试 - BigQuery 与 Cloud Spanner - Google Professional Cloud Architect Exam - BigQuery vs Cloud Spanner firebase & apk & ipa逆向工程和数据安全? - firebase & apk & ipa reverse engineering and data security? 关于谷歌云数据流权限的问题 - Question about permissions on Google Cloud Dataflow 如何将 Crashlytics 添加到 Google 的新架构示例中 - How to add Crashlytics to the new architecture sample by Google 示例笔记本,谷歌云管道组件示例 - Example notebook, sample for google cloud pipeline component 示例调用结构不正确:Google assistant - Sample invocations structured incorrectly:Google assistant 由于使用 App_Data,将 NServiceBus 示例部署到云失败? - Deploying NServiceBus sample to cloud fails due to use of App_Data? Google Speech API 的最佳采样率是多少? 有任何 Google 员工或专家可以发表评论吗? - What is the best sample rate for Google Speech API? Any Google employee or expert to comment on? 如何为 Firestore 创建大量示例数据? - How do I create a lot of sample data for firestore?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM