Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management Empty sets #4

Closed
dachafra opened this issue Jan 13, 2021 · 1 comment
Closed

Management Empty sets #4

dachafra opened this issue Jan 13, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dachafra
Copy link
Contributor

dachafra commented Jan 13, 2021

The Test-case R2RMLTC0000 tests an empty database with a valid schema, morph-kgc fails bc it tries to find answers.

Mapping and result: https://github.com/kg-construct/r2rml-implementation-report/tree/main/test-cases/R2RMLTC0000
Database: https://github.com/kg-construct/r2rml-implementation-report/blob/main/test-cases/databases/d000.sql

Log:

Traceback (most recent call last):
  File "/Users/dchaves/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2895, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 1675, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: '"Name"'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "morph-kgc/semantify.py", line 25, in <module>
    materialize(mappings_df, config)
  File "/Users/dchaves/Downloads/morph-kgc/r2rml-implementation-report/test-cases/morph-kgc/materializer.py", line 274, in materialize
    result_triples = _materialize_mapping_rule(mapping_rule, subject_maps_df, config)
  File "/Users/dchaves/Downloads/morph-kgc/r2rml-implementation-report/test-cases/morph-kgc/materializer.py", line 230, in _materialize_mapping_rule
    query_results_df = _materialize_template(query_results_df, mapping_rule['subject_template'], termtype=mapping_rule['subject_termtype'])
  File "/Users/dchaves/Downloads/morph-kgc/r2rml-implementation-report/test-cases/morph-kgc/materializer.py", line 61, in _materialize_template
    query_results_df['reference_results'] = query_results_df[columns_alias + reference]
  File "/Users/dchaves/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py", line 2906, in _getitem_
    indexer = self.columns.get_loc(key)
  File "/Users/dchaves/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py", line 2897, in get_loc
    raise KeyError(key) from err
KeyError: '"Name"'
@dachafra dachafra added the bug Something isn't working label Jan 13, 2021
@arenas-guerrero-julian
Copy link
Member

arenas-guerrero-julian commented Feb 7, 2021

Solved is already solved and motph passes the test case R2RMLTC0000.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants