Articles in this section
Category / Section

How to modify Specific column or table name via API?

Published:

There are chances for schema updates such as, renaming existing fields or tables in source data (underlying dataset) in timely manner. These changes need to be kept synchronized with the published data source and any associated dashboards in Bold BI. This article provides step-by-step instructions on how to address this need and overcome challenges that you may encounter.

Scenario

Consider that you have a Microsoft SQL Server database table named Order Details connected to Bold BI.

image.png

Afterwards, you have effortlessly transferred the table onto the query designer page through the simple act of dragging and dropping, subsequently preserving the data source.
image.png

Ultimately, you have successfully integrated this data into the widget and published the dashboard.
image.png

Handling Column Deletion or Renaming Changes

I aim to rename the column currently titled “New_Column4” to a new name, New_Column5.

image.png

Kindly initiate a refreshing action upon the dashboard page in order to promptly rectify the data retrieval issue.
image.png

We must address and overcome this issue by adhering to the following steps.
How to facilitate API authentication can be accomplished through the utilization of this provided link.

Input
URL http://{domain}/bi/api/site/{sitename}/v4.0/datasources/columns
Method Put
Content Type application/json
Authorizations bearer token
Request Body Schema
                   [
                        {
                            "DataSourceId": "string",
                            "ColumnInfo":
                            [
                                {
                                    "Type": "Column",
                                    "SourceColumnName":"string",
                                    "TargetColumnName":"string"
                                }
                            ]
                        }
                    ]

Sample Response

image.png

For Reference

Parameter Description .
DataSourceId Enter DatasourceID.
Type Either “Table” or “Column”
SourceTableName Previous name of Table
TargetTableName Current name of Table
SourceColumnName Previous name of Column
TargetColumnName Current name of Column

After Passing the Data Source ID through API, kindly refresh the published dashboard.

image.png

We have now ensured that the Updated column is available within the assign Data panel.
image.png

Related Links

How to refresh data source fields in Bold BI when the underlying dataset schema changes via API?
How to refresh data source fields in Bold BI when the underlying dataset schema changes via run button?

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
DG
Written by Dhineshkumar Gurusamy
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied