Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 如何将记录插入BigQuery链接服务器_Google Cloud Platform_Google Bigquery_Odbc - Fatal编程技术网

Google cloud platform 如何将记录插入BigQuery链接服务器

Google cloud platform 如何将记录插入BigQuery链接服务器,google-cloud-platform,google-bigquery,odbc,Google Cloud Platform,Google Bigquery,Odbc,我使用Simba ODBC驱动程序将SQL server连接到Bigquery,作为SQL server Management Studio中的链接服务器。 无法插入到BigQuery中,只能从BigQuery中选择数据。我还检查了“AllowInProcess”和“NonTransactedUpdate” select * from openquery([GoogleBigQuery], 'select * from first.table2' ) 上面的select查询正在运行 查询: i

我使用Simba ODBC驱动程序将SQL server连接到Bigquery,作为SQL server Management Studio中的链接服务器。 无法插入到BigQuery中,只能从BigQuery中选择数据。我还检查了“
AllowInProcess
”和“
NonTransactedUpdate

select * from openquery([GoogleBigQuery], 'select * from first.table2' )
上面的select查询正在运行

查询:

insert into OPENQUERY([GoogleBigQuery], 'select * from first.table2') values (1,'c')
INSERT INTO [GoogleBigQuery].[midyear-byway-252503].[first].[table2] select * from Learning_SQL.dbo.demo
生成的错误:

链接服务器“GoogleBigQuery”的OLE DB提供程序“MSDASQL” 由于列“id”,无法插入到表“[MSDASQL]”中 用户没有写入列的权限。“

查询:

insert into OPENQUERY([GoogleBigQuery], 'select * from first.table2') values (1,'c')
INSERT INTO [GoogleBigQuery].[midyear-byway-252503].[first].[table2] select * from Learning_SQL.dbo.demo
生成的错误:

链接服务器“GoogleBigQuery”的OLE DB提供程序“MSDASQL”返回消息“多步骤OLE DB操作生成错误。检查每个OLE DB状态值(如果可用)。未完成任何工作。”

由于列“id”,链接服务器“GoogleBigQuery”的OLE DB提供程序“MSDASQL”无法插入表“[GoogleBigQuery].[Middyear-byway-252503].[first].[table2]”。用户没有写入列的权限

我想知道是否有人尝试过使用链接服务器插入BigQuery中的数据集。

此错误就是由此引起的。Microsoft的SQL Server“链接服务器”选项似乎不支持对链接到的外部数据库进行插入、更新或删除调用,除非连接支持事务

由于BigQuery不支持显式事务,MSSQL不允许对BigQuery进行插入、更新或删除调用

如果您想将数据插入BigQuy,请考虑将数据导出到文件中,并将该文件加载到BigQu查询中。 导入文件可以是Avro、CSV、JSON(仅限换行符分隔)、ORC或拼花格式


有关更多信息,请参阅,

您是否解决过此问题?想做类似的事情吗