I am implementing the insertion to google bigquery using golang. The file has duplicates, and needs to be update everyday. However, the duplicates should not be inserted into the bigquery. I use some apis by google cloud platform and golang. However, I have not found any apis can either check if unique before inserting or setting to unique for specific fields in schema. I am using a wrapper api and calling the function directly. However, the function does not check if the field is unique. Please suggest any bigquery apis for golang has unique key checking or unique key setting to the schema. Much appreciate! I will update replies immediately.
2条回答 默认 最新
- duan4523 2016-01-06 18:13关注
In BigQuery, there is no any API or Function to specifically do uniqueness check of given field
You can meet your requirements by constructing your insert as join of source with destination and insert only unique ones
This might require you first to insert your data into “temp” table and then do above join in GBQ本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 宇视监控服务器无法登录
- ¥15 PADS Logic 原理图
- ¥15 PADS Logic 图标
- ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
- ¥15 DruidDataSource一直closing
- ¥20 气象站点数据求取中~
- ¥15 如何获取APP内弹出的网址链接
- ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
- ¥50 STM32单片机传感器读取错误
- ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据