Comments (4)
Maybe this corner case is a limitation of RML-FNML, since the current specification does not consider it. I am not sure if what you are trying to achieve is feasible, but function execution is handled here and probably the parser would need to be modified aswell.
In the workaround that I mentioned, you could provide your list in Python style as input, for instance [1, 2] or ['one', 'two'] and cast the list at the beginning of the function input_parm = list(input_parm)
.
from morph-kgc.
Hi @KappaGi ,
I am not sure if I understood well since you are missing a complete example with the full mapping, data and udf. I think what you are trying to do is not possible. You could maybe try:
<#Execution>
fnml:function ex:myFunction;
fnml:input
[
fnml:parameter grel:param;
fnml:valueMap [
rml:reference "column_1";
]
];
fnml:input
[
fnml:parameter grel:myParameter;
fnml:value "ex:value_1 ex:value_2";
];
.
And manage the multiple values of the parameter within the udf. This is, you can provide the multiple parameters as a character-separated literal (e.g., comma or a whitespace), that in the udf (by splitting...).
from morph-kgc.
Hello @arenas-guerrero-julian,
Thank you for your answer. I want to have several fnml:value
s for grel:myParameter
in my mappings so that in my udf in python I can manage those values as a python list. It works if I use a single rdf resource or a single rdf literal as fnml:value
, but It seems that I can't use several rdf resources (nor literals) in the mappings for this purpose.
So the only current solution to have a list of values for a single parameter in python udf is to provide several values in a single literal (i.e. using a delimeter) in the mappings and do the required post-processing in the udf.
from morph-kgc.
Would it be possible to modify the way udf's are defined to accept several rdf resources for a a single parameter? Could you please refer to any piece of code that I can modify to such purpose?
Thanks for the support
from morph-kgc.
Related Issues (20)
- Missing triples in output (mapping file with self-join) HOT 1
- rdf-star generation failed HOT 5
- JSON Files Format HOT 1
- Question: Why is using RML file slower than YARRRML HOT 1
- Maintain documentation in a separate repository HOT 1
- Update duckdb dependency to latest stable version (v.0.10.0)
- Mandatory dependency sqlalchemy HOT 3
- ENH: Specify relational database through YARRRML data source HOT 1
- NULL value not ignored for Parquet file format HOT 4
- Output to Kafka topic doesn't seem to work HOT 4
- AttributeError: 'DataFrame' object has no attribute 'map' in version 2.7.0 HOT 2
- Problem Input Database HOT 1
- Use of UDFs when fetching data from Oracle for building KG HOT 4
- Applying rml:reference to each RML-F result HOT 2
- YARRRML conditions on objects are not correctly processed HOT 3
- YARRRML external references HOT 1
- Issue with use of functions in YARRRML configuration HOT 2
- Two logical sources with rr:sqlQuery for the same table HOT 2
- Use of YARRRML with a Pandas dataframe as source HOT 5
- Impala connector 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 morph-kgc.