Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I tried to load data from clickhouse through ODBC interface;
After connecting to data source, I found some columns missing without any transformation step.
Here's the corresponding M code:
let
Source = Odbc.DataSource("dsn=dw_ck_test", [HierarchicalNavigation=true]),
dw_Database = Source{[Name="dw",Kind="Database"]}[Data],
student_Table = dw_Database{[Name="student",Kind="Table"]}[Data]
in
student_Table
Then I checked the power query editor,I found that all the missing columns has the same data type: "Combine Files" as shown below:
The original data types for these data in clickhouse is Int64 in comparison with the fact that all the Int32 data was load properly and did not miss.
So far,I assumed that it is the data type which made the column missing happend.
As a result, I added a step to detect the datatype
And all the data was transformed into Int64 as shown below:
And the here's the M code:
let
Source = Odbc.DataSource("dsn=dw_ck_test", [HierarchicalNavigation=true]),
dw_Database = Source{[Name="dw",Kind="Database"]}[Data],
student_Table = dw_Database{[Name="student",Kind="Table"]}[Data],
#"Changed Type" = Table.TransformColumnTypes(student_Table,{{"customer_key", Int64.Type}, {"date_key", Int64.Type}, {"shop_key", Int64.Type}, {"source_key", Int64.Type}, {"team_key", Int64.Type}, {"type_key", Int64.Type}})
in
#"Changed Type"
After I applied the query,the missing columns showed up but an error was reported showing that each row of the table has error detected which I thought caused by the type changing:
And here's what really confuse me:
I viewed errors and the error query said that "detected data type dismatches ", but no error was actually kept as shown below:
And I check the data section,I found the data of table "student" was loaded properly:
Built a measure based on student table,the result was not blank neither:
What could be the possible reason for this? And would the error really affect the usage of data? Thanks in advance!
Solved! Go to Solution.
Hi @edenyin ,
"Combine Files" is not a data type. It means that you need to click on it to get contents.
Please check this document to get more details: Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @edenyin ,
"Combine Files" is not a data type. It means that you need to click on it to get contents.
Please check this document to get more details: Combine files (binaries) in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |