Comments (4)
We also want to use the inspection to store a history of the source DB schema. To track and detect schema evolution (eg. new table columns got added). Simply by keeping a textual representation of the inspected DB schema in git. For this, a textual representation (independent of the DSL) should be dumped as well.
from xrm.
On branch feature-19
I added a new module com.zazuko.rdfmapping.dsl.sourceinspection with SerializationSample
that shows how to use the Xtext serializer to turn a programmatically built-up AST (the EMF Object Model) into textual DSL output.
One not so practical way of running the sample outside of Eclipse is currently
mira@blinky:~/git/rdf-mapping-dsl/com.zazuko.rdfmapping.dsl.parent/com.zazuko.rdfmapping.dsl.sourceinspection$ mvn -q exec:exec -Dexec.executable="java" -Dexec.classpathScope="compile" -Dexec.args="-classpath %classpath com.zazuko.rdfmapping.dsl.sourceinspection.SerializationSample" > foobar-sources.xrm
. This is particularly slow because the launch is using maven and is looking for updated dependencies etc.
Running the SerializationSample
inside Eclipse is easy and fast.
The content of the generated DSL output file foobar-sources.xrm for this sample looks like this:
source-types { csv referenceFormulation "ql:CSV" } logical-source airport { source "http://www.example.com/Airport.csv" referenceables foo "fรถรถ" }
Right now the output is all on one line, because we haven't implemented formatting rules yet #10
The output is missing type csv
in the logical-source
. I didn't figure out yet what the issue is, that's causing this to fail. There's a TODO in the source related to this.
from xrm.
I'm shelving this to the backlog for now due to inactivity.
For a customer project, I used a more pragmatic ad-hoc approach in the meantime: Instead of using the serializer of the DSL, I explicitly generate output in DSL syntax. One advantage of this approach is flexibility, for example to easily serialize addititional metadata from the DB, like column datatypes and comments as // comments
in the DSL output
from xrm.
https://github.com/nnamtug/spring-boot-maven-plugin-example
from xrm.
Related Issues (20)
- Support source of type "other"
- Cannot use term schema:encoding HOT 2
- Files and carml-jar HOT 3
- JSON support for RML & carml HOT 1
- cswv: constant string literal yields a Node HOT 1
- feedback to user in VSCode plugin
- Print version number in header of generated file
- rmlmapper does not accept URIs: <#AirportMapping> HOT 3
- Derive shapes from maps HOT 4
- RDF serialization of xrm mapping itself
- XRM editor syntax serialization for mapping described in RDF
- Exception thrown when starting mapping from scratch in VS Code HOT 1
- src-gen does not preserve directory structure
- Not all files are observed for modifications
- Headless mode HOT 1
- Include JSONPath and XPath usage in the documentation HOT 1
- Include JSONPath and XPath usage in the mapping-examples
- Vocabulary elements used as constant value don't contribute their PREFIX HOT 1
- Combining template with language-tag or datatype
- Subject id from reference (rr:subjectMap/rml:reference) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xrm.