Forum Discussion
ALM Toolkit String error
- 2 years ago
Hi, Anonymous
The Instruct JSON DDL (Data Definition Language) command failed because it encountered values that could not be converted to strings. Specifically:
model.tables[15]: refers to the 16th table in the model (indexed from zero). partitions[0]: refers to the first partition of the table. source.refreshBookmark: refers to the attribute in the source definition of the partition that is the refreshBookmark. Line 6596, position 64: indicates the exact location in the JSON file where the error was detected.Troubleshooting Steps
In Power BI Desktop, go to the Model view. Count the tables and identify the 16th table. Note the table name.
Check Partitions: If you are using incremental refresh, your table may have multiple partitions. In Power BI Desktop, you can check partitions in the Model view under Table Properties.
2. Locating errors in JSON
Export JSON Definition: exports the JSON definition of the model. This can be done using a tool such as the table editor or by exporting the model schema in Power BI Desktop.
Search for refreshBookmark: Open the exported JSON in a text editor.
Search to refreshBookmark to find a specific path and the values associated with it.
3. Checking the refreshBookmark value
The error indicates that the value model.tables[15].partitions[0].source.refreshBookmark at, '4/28/2024 9:42:26 AM' which is a DateTime, cannot be directly converted to a string.
4. Correct the value
If refreshBookmark should be a string, make sure the value is formatted correctly as a string. It may be necessary to update or correct the value in the refreshBookmark model definition or ensure that ALM Toolkit handles the value correctly.
5. Validating Data Types
Ensure that all date columns in the model are correctly formatted as dates and are not inadvertently stored or formatted as strings.The following is a general example of JSON correction:
{ "model": { "tables": [ { "name": "YourTable", "partitions": [ { "source": { "refreshBookmark": "2024-04-28T09:42:26Z" // ISO 8601 format } } ] } ] } }Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
The Instruct JSON DDL (Data Definition Language) command failed because it encountered values that could not be converted to strings. Specifically:
model.tables[15]: refers to the 16th table in the model (indexed from zero). partitions[0]: refers to the first partition of the table. source.refreshBookmark: refers to the attribute in the source definition of the partition that is the refreshBookmark. Line 6596, position 64: indicates the exact location in the JSON file where the error was detected.
Troubleshooting Steps
In Power BI Desktop, go to the Model view. Count the tables and identify the 16th table. Note the table name.
Check Partitions: If you are using incremental refresh, your table may have multiple partitions. In Power BI Desktop, you can check partitions in the Model view under Table Properties.
2. Locating errors in JSON
Export JSON Definition: exports the JSON definition of the model. This can be done using a tool such as the table editor or by exporting the model schema in Power BI Desktop.
Search for refreshBookmark: Open the exported JSON in a text editor.
Search to refreshBookmark to find a specific path and the values associated with it.
3. Checking the refreshBookmark value
The error indicates that the value model.tables[15].partitions[0].source.refreshBookmark at, '4/28/2024 9:42:26 AM' which is a DateTime, cannot be directly converted to a string.
4. Correct the value
If refreshBookmark should be a string, make sure the value is formatted correctly as a string. It may be necessary to update or correct the value in the refreshBookmark model definition or ensure that ALM Toolkit handles the value correctly.
5. Validating Data Types
Ensure that all date columns in the model are correctly formatted as dates and are not inadvertently stored or formatted as strings.
The following is a general example of JSON correction:
{
"model": {
"tables": [
{
"name": "YourTable",
"partitions": [
{
"source": {
"refreshBookmark": "2024-04-28T09:42:26Z" // ISO 8601 format
}
}
]
}
]
}
}
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.