Forum Discussion
Anonymous
4 years agoNot applicable
Set column types using json
Hi 🙂 i have a custom power bi connector that loads data from various json sources. i also have an endpoint that returns the data types for each column in the format {
{
"columnName": "tes...
- Anonymous4 years ago
Hi Anonymous, lbendlin,
ColumnTypeTable = Table.FromRecords(JsonColumnTypeData), //json data to table ColumntypeList = Table.TransformRows(dataTable, each {[columnName], MapColumnType([columnType])}),That's how it works for me. I have created a mapping method to map the text type from JSON to Power Query type.
Anonymous
4 years agoNot applicable
Hi Anonymous, lbendlin,
ColumnTypeTable = Table.FromRecords(JsonColumnTypeData), //json data to table
ColumntypeList = Table.TransformRows(dataTable, each {[columnName], MapColumnType([columnType])}),That's how it works for me. I have created a mapping method to map the text type from JSON to Power Query type.
lbendlin
4 years agoSuper User
Can you show the code for MapColumnType ?