SQL中的R语言数据加载 [英] R language data load in SQL

查看:85
本文介绍了SQL中的R语言数据加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行R语言生成数据,需要在SQL Server中自动加载这些数据。这可能吗?

I run R language to generate data and need to load this data automatically automatically in SQL Server.Is this possible?

推荐答案

我喜欢在SQL中存储东西服务器表。数据可以是几乎任何东西,它可以在表中的多个转换阶段使用TSQL进行存储。大容量存储可用ntext,binary,varbinary等...



但首先你必须加载......它。

I like to store stuff in SQL Server tables. Data can be just about anything and it can be stored using TSQL in numerous stages of conversion in a table. Large storage is available in ntext, binary, varbinary, etc ...

But first you''ve gotta load ... it.
CREATE SCHEMA [rdata]
CREATE TABLE [database].[rdata].[rfile](
   [strR][nvarchar](MAX}
   )
CREATE TABLE [database].[rdata].[rfileIdx](
   [idx][int]IDENTITY(1,1)
       [strR][nvarchar](MAX)
   )
BULK INSERT [database].[rdata].[rfile]
''c:\R_data_output\filename.rrr''

INSERT INTO [database].[rdata].[rfileIdx]
   SELECT [strR] FROM [database].[rdata].[rfile]



如果一切顺利,你''我将不会收到任何红色错误消息,并且您将在索引表中显示数据行。我打赌您将在下一行中遇到单行表...


If all goes well, you''ll receive no red error messages and you''ll have lines of "data" in an indexed table. I''ll wager you''ll run into the single line table next ...


这篇关于SQL中的R语言数据加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆