将具有1024列以上的csv文件导入到新的SQL Server表中 [英] Import csv file with more than 1024 columns into new SQL Server table

查看:145
本文介绍了将具有1024列以上的csv文件导入到新的SQL Server表中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将数据从CSV文件上传到SQL Server,SQL Server的大小为2GB,并且具有10000多个列.请让我知道如何在SQL Server中加载超过1024列的数据.

I am trying to upload data from CSV file into SQL Server which is 2GB in size and has more than 10000 columns. Please let me know how to load data with more than 1024 columns in SQL Server.

我尝试通过导入/导出向导进行操作,但该错误低于错误

I tried to do through Import/Export wizard,it threw below error

错误0xc002f210:SQL准备任务1:执行查询"CREATE TABLE [dbo].[Test]([ID] varchar(50)...")失败,并出现以下错误:
创建表失败,因为表'Test'中的列'B19037Dm38'超过了1024列的最大值.".
可能的失败原因:查询问题,"ResultSet"属性未正确设置,参数未正确设置或连接未正确建立.

Error 0xc002f210: Preparation SQL Task 1: Executing the query "CREATE TABLE [dbo].[Test] ( [ID] varchar(50)..." failed with the following error:
"CREATE TABLE failed because column 'B19037Dm38' in table 'Test' exceeds the maximum of 1024 columns.".
Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

推荐答案

您可以创建宽表" ,但是它有其自身的局限性和局限性.您可能将无法使用该向导.如果您希望SSIS包定期执行此操作(这就是该向导的内容),则必须退出Visual Studio并构建一个.

You can create a "wide table" but that comes with its own limitations and restrictions. You probably won't be able to use the wizard for this; if you want an SSIS package to do it regularly (which is what the wizard is under the covers), you'll have to pull out Visual Studio and build one.

我建议您将数据转换为具有更多表和更少表的更规范化的形式.或者,考虑您的数据根本无法很好地适合此模型的可能性,而是使用诸如Hadoop或其他NoSQL数据库之类的大数据"平台.

I would instead advise that you transform the data into a more normalized form with more tables and fewer columns per table. Or, consider the possibility that your data doesn't fit well into this model at all and instead use a "big data" platform like Hadoop or other NoSQL database.

这篇关于将具有1024列以上的csv文件导入到新的SQL Server表中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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