ssis - SSIS 中的 Power Query - 不支持 Html.Table
问题描述
SSIS 支持 Power Query 作为 Source,但似乎不支持使用 Html.Table 的 M 代码。我只使用 SQL Server Data Tools (SSDT)
M代码如下=
let Scrapper =
(Page as number) as table =>
let
Source = Web.BrowserContents("https://www.zerohedge.com/?page=" & Number.ToText(Page)),
#"Extracted Table From Html" = Html.Table(Source, {{"Title", ".teaser-title:nth-last-child(4)"}, {"Date", ".extras__created:nth-last-child(1)"}, {"Views", ".extras__views:nth-last-child(2)"}}, [RowSelector=".view-content:nth-last-child(2) > DIV.views-row"]),
#"Changed Type" = Table.TransformColumnTypes(#"Extracted Table From Html",{{"Title", type text}, {"Date", type datetime}, {"Views", Int64.Type}})
in
#"Changed Type",
Source = {0..1},
#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Renamed Columns" = Table.RenameColumns(#"Converted to Table",{{"Column1", "Pages"}}),
#"Invoked Custom Function" = Table.AddColumn(#"Renamed Columns", "Scrapper", each Scrapper([Pages])),
#"Expanded Scrapper" = Table.ExpandTableColumn(#"Invoked Custom Function", "Scrapper", {"Title", "Date", "Views"}, {"Title", "Date", "Views"})
in
#"Expanded Scrapper"
错误:数据流任务中的 0x0,Power Query 源:导入 Html.Table 不匹配导出。您是否错过了模块参考?
我没有看到任何其他等待微软支持 Html.table 的解决方案
解决方案
推荐阅读
- websphere-liberty - Websphere Liberty 对工作管理器的支持
- reactjs - 我只得到用户名和密码字段?反应
- operating-system - 桌面 Mac OS 开发使用什么前端语言
- c# - 使用 Outlook Add-In for Adobe Acrobat 将 Outlook mailItem 转换为 pdf 作品集
- c# - MAGELLAN 8500XT 中的实时秤
- wcf - WCF 不支持可选参数
- python - 我正在尝试在 python 中使用 HTML img 标签发送邮件,但出现以下错误
- javascript - BIRT eclipse - 删除列中的重复值 - ROWSPAN
- mysql - MySQL Query 不适用于所有测试用例
- reactjs - react native 中架构 armv7 的 1 个重复符号