Table.FromPartitions
ไวยากรณ์
Table.FromPartitions(partitionColumn as text, partitions as list, optional partitionColumnType as nullable type) as table
เกี่ยวกับ
แสดงตารางที่เป็นผลลัพธ์ของการรวมชุดตาราง partitions
ที่มีการแบ่งพาร์ติชัน partitionColumn
คือชื่อของคอลัมน์ที่จะเพิ่ม ชนิดของคอลัมน์มีค่าเริ่มต้นเป็น any
แต่สามารถระบุได้โดยpartitionColumnType
ตัวอย่างที่ 1
ค้นหาชนิดหน่วยข้อมูลจากรายการ{number}
การใช้งาน
Table.FromPartitions(
"Year",
{
{
1994,
Table.FromPartitions(
"Month",
{
{
"Jan",
Table.FromPartitions(
"Day",
{
{1, #table({"Foo"}, {{"Bar"}})},
{2, #table({"Foo"}, {{"Bar"}})}
}
)
},
{
"Feb",
Table.FromPartitions(
"Day",
{
{3, #table({"Foo"}, {{"Bar"}})},
{4, #table({"Foo"}, {{"Bar"}})}
}
)
}
}
)
}
}
)
เอาท์พุท
Table.FromRecords({
[
Foo = "Bar",
Day = 1,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 2,
Month = "Jan",
Year = 1994
],
[
Foo = "Bar",
Day = 3,
Month = "Feb",
Year = 1994
],
[
Foo = "Bar",
Day = 4,
Month = "Feb",
Year = 1994
]
})
คำติชม
https://aka.ms/ContentUserFeedback
เร็วๆ นี้: ตลอดปี 2024 เราจะขจัดปัญหา GitHub เพื่อเป็นกลไกคำติชมสำหรับเนื้อหา และแทนที่ด้วยระบบคำติชมใหม่ สำหรับข้อมูลเพิ่มเติม ให้ดู:ส่งและดูข้อคิดเห็นสำหรับ