MySQL ODBC 导入失败

发布于 2024-12-15 15:13:44 字数 649 浏览 2 评论 0原文

我正在将数据从 MySQL 导入到 PowerPivot。我有所有相关的驱动程序。当我尝试导入到 PowerPivot 时,出现以下错误:

当我从表列表中选择时:

无法从公司检索数据。原因:错误 [42000] [MySQL][ODBC 5.1 驱动程序][mysqld-5.1.58]您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在第 1 行“[companies].* FROM [companies]”附近使用的正确语法

当我“编写已验证的查询”时,我收到:

发生以下系统错误:灾难性故障无法与 DataSourceID 为“dc746dc9-4aaa-4e03-b938-f84a128f5671”、名称为“Custom”的数据源建立连接。处理“查询”表时发生错误。操作已取消。

但是,我可以很好地导入 Excel。如何修复 PowerPivot 导入?

I am importing data from MySQL to PowerPivot. I have all of the relevant drivers. When I try to import to PowerPivot I get the following errors:

When I select from a list of tables:

Failed to retrieve data from companies. Reason: ERROR [42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.58]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[companies].* FROM [companies]' at line 1

When I "write a query" that has been validated I receive:

The following system error occurred: Catastrophic failure A connection could not be made to the data source with the DataSourceID of 'dc746dc9-4aaa-4e03-b938-f84a128f5671', Name of 'Custom'. An error occurred while processing the 'Query' table. The operation has been cancelled.

However, I am able to import just fine into Excel. How do I fix the PowerPivot import?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

帅的被狗咬 2024-12-22 15:13:44

就在今天,我遇到了这个问题。当 Excel 遇到字段中“难以消化”的内容时,它似乎无法导入表格。在我的例子中,字段类型是文本,所以也许某些字段只包含大量数据。然后整个导入失败。

所以我所做的就是选择另一个选项,即使用 SQL 查询导入。

select field_a, field_b from the_table

在那里,您只需忽略导致问题的列,在您的情况下为“自定义”。

如果您需要此专栏,那么您可能会启发式地查看其内容,以找到潜在的麻烦制造者。

Just today I was faced with this issue. It seems that Excel fails to import a table when it hits on something "indigestable" in a field. In my case the field type was text, so maybe some field just contained to much data. Then the whole import fails.

So what I did was to choose the other option, to import using an SQL query.

select field_a, field_b from the_table

There you just leave out the column that causes the problem, 'Custom' in your case.

If you need this column, then you might have a heuristic look at its content to find potential trouble makers.

邮友 2024-12-22 15:13:44

您的第一个问题是由于微软(?)将表名称括在方括号中

http://www.datamensional.com/2011/09/how-to-use-mysql-and-microsoft-powerpivot-together-2/ 因此表向导不起作用。回到 3.51.30 版本可能可以实现此功能:
http:// www.joyofdata.de/blog/how-to-set-up-powerpivot-and-make-it-talk-to-mysql/

所以正如你所说,你可以编写自己的查询......(假设你已经解决了第二个问题!)

your first problem is due to microsoft (?) wrapping table names in square brackets

http://www.datamensional.com/2011/09/how-to-use-mysql-and-microsoft-powerpivot-together-2/ so the table wizard doesn't work. It may be that going back to version 3.51.30 will make this work:
http://www.joyofdata.de/blog/how-to-set-up-powerpivot-and-make-it-talk-to-mysql/

so as you say you can write your own query ...(assuming you have solved the second problem!)

因为看清所以看轻 2024-12-22 15:13:44

更好的方法可能是安装内置 mysql 的 power query(然后可以馈送到 power hub)。

A better approach might be to install power query which has mysql built in ( which can then feed through to power pivot).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文