Author Topic: Handling Identifier Naming Changes  (Read 490 times)

Offline srmoure

  • Full Member
  • ***
  • Join Date: Nov 2018
  • Posts: 44
  • Forum Citizenship: +0/-0
Handling Identifier Naming Changes
« on: 11 Jun 2020 10:18:02 pm »
Hello,

Is there a way to handle the impact of changing the naming of the tables.  When organising a model, I changed the naming of the source views to something more meaningful and now there are obvious validation issues.  I cannot find a way to edit all the downstream impacts of these changes. I only need to replace "view_1.Region" for "Sales.Region" in a couple of places, but I cannot find a way to do it. It seem the only option is to re-do all the downstream work. Is there any workaround or option I cannot find.
For example, In report studio, I could manually edit the join names and the field names impacted. In Data Modules I cannot find the way to do this.

Thanks

Offline bus_pass_man

  • Statesman
  • ******
  • Join Date: May 2008
  • Posts: 435
  • Forum Citizenship: +43/-0
Re: Handling Identifier Naming Changes
« Reply #1 on: 11 Jun 2020 11:18:03 pm »
There are two properties of objects which are relevant.  The label, which is the name which appears for the object in the UI, and the identifier, which appears in things like the SQL and object references in expressions.

If you are using 11.1.x you can edit the identifier to give it an appropriate name.  Views tend to get names that pick up the identifier of the first of the query subjects which was included in the view.  The view wizard gives you the opportunity to give a name to it, which will be the basis of the identifier. 

Quote
  I cannot find a way to edit all the downstream impacts of these changes

I think that means you can't figure out how to edit object references to all the errors which are being reported.  IIRC relationships can be complained about.
« Last Edit: 12 Jun 2020 12:09:24 am by bus_pass_man »

Offline srmoure

  • Full Member
  • ***
  • Join Date: Nov 2018
  • Posts: 44
  • Forum Citizenship: +0/-0
Re: Handling Identifier Naming Changes
« Reply #2 on: 12 Jun 2020 12:28:48 am »
I edited the identifier, but all the field that was relying on that identifier cannot be edited. Or at least I cannot find a way to edit it.  Rendering errors in all the tables of the model using that field.  I would like to edit the name of the field in all the required objects to use the new source table identifier.
This is after the wizard. Is there a way to edit the SQL generated ? the change is pretty simple to do, but I cannot find an option to do it.

Offline bus_pass_man

  • Statesman
  • ******
  • Join Date: May 2008
  • Posts: 435
  • Forum Citizenship: +43/-0
Re: Handling Identifier Naming Changes
« Reply #3 on: 12 Jun 2020 06:16:32 am »
Quote
I edited the identifier, but all the field that was relying on that identifier cannot be edited. Or at least I cannot find a way to edit it.
Some more specific information might be helpful.  The instructions below will probably cover the most likely scenario.


You changed the identifier of a view and a bunch of validation icons are showing up.

What are the objects where the error is showing up?

What does the text of the error messages say? 

I suspect quite a few of them will say something like this:
XQE-MSR-0017 The column "{some query subject}.{ name of one of your query items}" refers to "{Your view, before it was renamed}.{query item}", which does not exist. Edit the column so it refers to an existing item.

This is easily handled by going into the properties and editing the expression to modify the expression so that it no longer says

{Your view, before it was renamed} but {Your view, after it was renamed}





« Last Edit: 12 Jun 2020 08:15:48 am by bus_pass_man »