changing names of multiple columns

Comments

8 comments

  • Official comment
    Saurabh Agashe

    The best way to accomplish this would be using the REST API.

    Searching through the files, you'll find where you can manually adjust the titles, then do it in bulk with find and replace.

    All of the documentation for this is available here:

    https://documentation.datameer.com/documentation/display/DAS40/Accessing+Datameer+Using+the+REST+API

    Check out the workbook section about reading and updating workbooks.

    Hope this helps!

    Comment actions Permalink
  • Saurabh Agashe

    I discovered the "Tab" feature as well. If you get in to renaming and press Tab, it will automatically go to the next column in edit mode. It just only works if yo actually make an edit

    0
    Comment actions Permalink
  • oscar valles

    The REST API in version 5 is not updating like expected:

    Steps that I take per the API documentation

    1. Download the Workbook's JSON configuration

    curl -u username:password -X GET 'http://ourdminstance.com:80/rest/workbook/1313' -o /Users/ovalles/Documents/JSON/IBWorksheet.json;

    2. Edit the JSON file, in this case added a new column style in order to process a column name change. 

    3. Put the JSON file back on the server successfully

    curl -u username:password -X PUT -d @/Users/ovalles/Documents/JSON/IBWorksheet.json 'http://ourdminstance.com:80/rest/workbook/1313'

     

    Unfortunately, the name is still the same.  I updated the first few columns using the TAB method mentioned.  Seems to be the most efficient way at the moment.

    0
    Comment actions Permalink
  • Joel Stewart

    Oscar - after successfully pushing the updated JSON via REST API, if you download the JSON from the server again, does it have the updated column names? 

    Also, do you observe any errors or warnings in the conductor.log files during the PUT segment? 

    0
    Comment actions Permalink
  • oscar valles

    Hi Joel,

    The change did take place on the new .json file that I get from this workbook (not on the workbook itself through the browser).  Also, a new column styling appears.

    Hope that helps.

    Osk

    0
    Comment actions Permalink
  • Joel Stewart

    Thanks for trying that Osk. How does JSON compare if you attempt to update the columns directly in the workbook? 

    In my lab environment, I'm able to successfully rename the columns through the REST API.  What is the exact version of Datameer that you're testing with? 

    0
    Comment actions Permalink
  • oscar valles

    Hi Joel,

    Here is the screenshot with the answer to your first question.  There are > 20 columns, but I only renamed three manually through the browser.

    We're using Datameer 5.10.7

     

    0
    Comment actions Permalink
  • Joel Stewart

    Osk, I tested today in 5.10.7 and was able to successfully implement a column name change through the REST API. 

    When making the change, please note that the name must be changed in two locations. Once in the "formulas" and again in the "columnStyles".

    0
    Comment actions Permalink

Please sign in to leave a comment.