Skip to main content
Solved

Dynamic DAC Generation


Forum|alt.badge.img

Hi All,

New in-house data engineer here...

I am working on a customization that deals with categorization and tax compliance. Our company has tax categories that are added and removed regularly, so I have made a dynamic SQL script that can reflect these changes in a view.

Is it possible to re-generate the DAC from this view without a republishing the customization with the new code? Is it possible to call the method behind the ‘Generate members from database’ directly?

If so, will the SQL and the C# that define the view and the DAC be run whenever someone requests the G.I., or do I need to add code to the customizations that define the updates and imports to regenerate the SQL View and DAC right away?

 

Thanks,

Aaron

Best answer by aaghaei

No worries. What you want is to change the DAC declaration meaning some pieces of code should be changed inside the code. In other word self-alteration of a C# code that I don’t think is possible.

View original
Did this topic help you find an answer to your question?

4 replies

aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1169 replies
  • July 22, 2024

You can have a stored procedure in SQL that generates the view in question. If the fields and data types of the dynamic view doesn’t change and just the logic (joining, tables, conditions, ...) changes, then you can call your SP from the code (although it is not recommended) to regenerate the view on the fly without the need for re-publishing the code.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 10 replies
  • July 22, 2024

Thanks-- I should have specified: this is a pivot dealing with multiple columns of different data types, so the fields will change with any addition or deletion of categories. From what you are saying, we may just need to republish with every legal change?


aaghaei
Captain II
Forum|alt.badge.img+9
  • Captain II
  • 1169 replies
  • Answer
  • July 22, 2024

No worries. What you want is to change the DAC declaration meaning some pieces of code should be changed inside the code. In other word self-alteration of a C# code that I don’t think is possible.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 10 replies
  • July 22, 2024

That’s good to know-- Even if it is possible, that sounds like more time and resources than I would want to invest in this project. If all new customizations are going to be republished anyway, I don’t know how much marginal benefit the self-updating would be anyway.

Thanks for your help!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings