Automating the production of Anchor Modeling SQL

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Automating the production of Anchor Modeling SQL

SteveCooperOrg
Hi, guys.

I'm working on a layer to adapt Entity Framework to Anchor Modeling. Part of that will involve automating the transition from entity framework schema (an EDMX file) to anchor model schema (XML with 'anchor', 'metadata', 'attribute' tags) to the anchor model/T-SQL database creation scripts.

At the moment it's a manual process involving the site, so I think I'm going to have to adapt the sisula interpreter, which seems to live in index.html in the source, to be a AMD or node.js module. This will allow me to automate the process of adapting an Entity Framework project to use Anchor Modeling in the background.

Anyone interested in the results, or have tried this before? Is the sisula interpreter available elsewhere and easier to package?

Any thoughts appreciated.

    Steve
Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

roenbaeck
Administrator
The sisula interpreter is not available as a standalone package. It should be almost trivial to break out the necessary parts from index.html though.

I think everything you need is encapsulated in the Sisulator object:

https://code.google.com/p/anchormodeler/source/browse/trunk/index.html#5417

Apart from that, you need the sisula templates, which are all found under the SQL directory. If you port to node.js you may need to change the way these are fetched, so that they are fetched from a local directory instead of a http request.

Sounds like an interesting idea! Let us know how it goes, and if you find any improvements that can be done to the sisula engine.
Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

SteveCooperOrg
Thanks, Lars.

I got the impression that the Sisulator object would be the key -- I think I just need to replace a couple the dependencies on browser objects, like the XML production method `objectify()`, but it's good to know it shouldn't be too hard.

Thanks again,

Steve


Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

rogge
Steve
How's your project progressing?
I am wanting to out put the SQL code for consumption by a VS2013 SQL Server Database Project. So far I nested a SqlProject directory in SQL and edited the *.js files to include only CREATE  statements.

-rogge
Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

roenbaeck
Administrator
In a recent effort we broke out the Sisulator as a stand-alone project. It can be found here:

https://github.com/Roenbaeck/sisula

The Sisulator has been ported to JScript and runs using the Windows Scripting Host. In other words, it should run in all recent versions of Windows. There is also a second branch called "ETL" in which we have just started extending that Sisulator in a Data Warehouse automation effort.
Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

delostilos
Hi,

Is there a short description of the functionality of the 'ETL' branch?

Regards,
JJ.
Reply | Threaded
Open this post in threaded view
|

Re: Automating the production of Anchor Modeling SQL

roenbaeck
Administrator
Hi JJ,

I am currently working on a video introduction to the ETL branch, which will be available sometime next week. The project has been in alpha for a while, and we wanted to wait until things had stabilized before beating the drum for it too loudly.

I'll post back here when the video is up.