google-bigquery - 在记录字段中获取问题
问题描述
My Schema is mongoid STRING NULLABLE
order_vfid STRING NULLABLE
order_storeid STRING NULLABLE
order_filterdate DATETIME NULLABLE
order_sortdate DATETIME NULLABLE
order_time DATETIME NULLABLE
order_shopify_name STRING NULLABLE
order_shopify_id STRING NULLABLE
shipping_address RECORD REPEATED
customer_details RECORD REPEATED
order_payment_status STRING NULLABLE
order_fulfillment_status STRING NULLABLE
order_status STRING NULLABLE
order_currency STRING NULLABLE
order_total_paid FLOAT NULLABLE
is_cod INTEGER NULLABLE
line_items RECORD REPEATED
lineitem_id STRING NULLABLE
vfsku STRING NULLABLE
product_shopifyid STRING NULLABLE
variant_shopifyid STRING NULLABLE
quantity FLOAT NULLABLE
name STRING NULLABLE
catalogname STRING NULLABLE
item_total_sold_price FLOAT NULLABLE
discount FLOAT NULLABLE
confirmation_date STRING NULLABLE
item_vforderstatus STRING NULLABLE
product_status STRING NULLABLE
type STRING NULLABLE
total_shipping2 FLOAT NULLABLE
shipping_perquantity2 FLOAT NULLABLE
vfprodid STRING NULLABLE
现在我正在使用查询获取数据,但出现错误。请帮帮我。我的查询是 SELECT * FROM testdata.orders where line_items.vfsku = 'VFPQ123_VT1'
解决方案
查看如何扫描满足条件的 STRUCT 字段值:
SELECT *
FROM testdata.orders
WHERE EXISTS(SELECT 1 FROM UNNEST(line_items) WHERE vfsku = 'VFPQ123_VT1');
推荐阅读
- aspnetboilerplate - UpdateAsync 期间的 AbpBoilerPlate EF Core 3.0 StackOverflowException
- excel - 如何从列中的所有单元格中删除第二个句号之后的所有文本?
- javascript - Vue,v-bind:将数据作为属性传递
- javascript - 在使用 CORS 的情况下,Edge 浏览器不会重定向呼叫
- python - 在pygame中实现曲线上的碰撞检测
- javascript - 从 api 获取数据未显示
- c# - 问题:从 C++ MFC 调用 C# Unmanged COM
- php - 在html表格中打印多维关联数组列方式
- sql - 使用 SQL Server 2016 语法如何在表本身可能存在或不存在时使用删除约束“如果存在”?
- ecmascript-6 - 检查表达式的函数参数