Solved

How to create an Archive Table( A_XXX) in FSM

  • 12 November 2021
  • 3 replies
  • 187 views

Userlevel 6
Badge +17

Hi,

Using Metadata we can add more Table in the Archive FSM Engine, also explained in the following post as well.

 

My question is, at the same time it will not create the Database table. For example I added PRODUCT to the Archive engine using custom metadata but it will not create the A_PRODUCT table nor such table exist by default.

How we define the Archiving table here and connect to archive engine or is there a simple way of doing this?

 

Thank You,

Kasun

icon

Best answer by SanjeewaJ 12 November 2021, 05:00

View original

3 replies

Userlevel 5
Badge +12

Hi Kasun,

I think Archiving is by default enabled only for transactional tables. Like TASK, REQUEST, ATTACHMENT etc.
In other word, a_ tables are already created by the installation scripts for transactional tables. But for non-transactional tables, you dont.
If you have a requirement to do so for PRODUCT table, one approach could be to create the archive table script and deploy on the db. Which is not strait forward. Since FSM metadata screen has disabled the table script generation, I would suggest below steps. (Perhaps you can use an internal or local environment for this. Just to avoid making changes to PRODUCT table custom meta data)

1. In a DEV environment, backup CUSTOM METADATA for PRODUCT tab (if exist)
2. Delete CUSTOM METADATA for PRODUCT tab (if exist)
3. Export FSM METADATA for PRODUCT tab (You may use import/export -> excel for each below table)
4. Import FSM METADATA to CUSTOM METADATA tables like below (following the order)

METRIX_TABLE_DEF->CUST_TABLE_DEF
METRIX_COLUMN_DEF->CUST_COLUMN_DEF
METRIX_COLUMN_LKUP->CUST_COLUMN_LKUP
METRIX_COLUMN_SELECT->CUST_COLUMN_SELECT
METRIX_RELATION_DEF->CUST_RELATION_DEF
METRIX_RELATION_MAP->CUST_RELATION_MAP
METRIX_DEFAULT_DEF->CUST_DEFAULT_DEF

5. In Custom Metadata screen, query for PRODUCT
6. Create SQL/Oracle Archive script (Menu option)
7. Deploy generated script on DB (SQL Query tool)
8. Delete CUSTOM METADATA for PRODUCT tab
9. Restore backup taken in step 1.

You may do this using FSM Utilities tool as well. 

Regards,
Sanjeewa

Userlevel 6
Badge +17

@SanjeewaJ. Thanks for your quick Support. I will test this and let you know :)

Userlevel 7
Badge +24

Hi @Kasun Manuranga,

If a custom metadata entry for the Product table already exists in the system you can just do steps 5-7 and ignore the rest. The option is removed from the FSM Metadata screen as (like the other FSMxxxx screens in FSM i.e. FSM Sync Rules) they are intended to be a record of the baseline settings for FSM. Once a custom metadata entry is made for a table that is in FSM Metadata the custom one should supersede the baseline one.

Kind regards,

Lee Pinchbeck

 

Reply