Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmendsenProject
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shaik Janipasha
AmendsenProject
Commits
b87e3902
Unverified
Commit
b87e3902
authored
Apr 25, 2019
by
Junda Yang
Committed by
GitHub
Apr 25, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unquote boolean value is_view when publish to neo4j (#28)
* unquote bool value is_view when publish to neo4j * fix test
parent
d8a27343
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
3 deletions
+5
-3
table_metadata.py
databuilder/models/table_metadata.py
+2
-1
setup.py
setup.py
+1
-1
test_table_metadata.py
tests/unit/models/test_table_metadata.py
+2
-1
No files found.
databuilder/models/table_metadata.py
View file @
b87e3902
...
...
@@ -5,6 +5,7 @@ from typing import Iterable, Any, Union, Iterator, Dict, Set # noqa: F401
from
databuilder.models.neo4j_csv_serde
import
(
Neo4jCsvSerializable
,
NODE_LABEL
,
NODE_KEY
,
RELATION_START_KEY
,
RELATION_END_KEY
,
RELATION_START_LABEL
,
RELATION_END_LABEL
,
RELATION_TYPE
,
RELATION_REVERSE_TYPE
)
from
databuilder.publisher.neo4j_csv_publisher
import
UNQUOTED_SUFFIX
DESCRIPTION_NODE_LABEL
=
'Description'
...
...
@@ -68,7 +69,7 @@ class TableMetadata(Neo4jCsvSerializable):
TABLE_NODE_LABEL
=
'Table'
TABLE_KEY_FORMAT
=
'{db}://{cluster}.{schema}/{tbl}'
TABLE_NAME
=
'name'
IS_VIEW
=
'is_view
'
IS_VIEW
=
'is_view
{}'
.
format
(
UNQUOTED_SUFFIX
)
# bool value needs to be unquoted when publish to neo4j
TABLE_DESCRIPTION
=
'description'
TABLE_DESCRIPTION_FORMAT
=
'{db}://{cluster}.{schema}/{tbl}/_description'
...
...
setup.py
View file @
b87e3902
from
setuptools
import
setup
,
find_packages
__version__
=
'1.0.1
0
'
__version__
=
'1.0.1
1
'
setup
(
...
...
tests/unit/models/test_table_metadata.py
View file @
b87e3902
...
...
@@ -24,7 +24,8 @@ class TestTableMetadata(unittest.TestCase):
ColumnMetadata
(
'ds'
,
None
,
'varchar'
,
5
)])
self
.
expected_nodes_deduped
=
[
{
'name'
:
'test_table1'
,
'KEY'
:
'hive://gold.test_schema1/test_table1'
,
'LABEL'
:
'Table'
,
'is_view'
:
False
},
{
'name'
:
'test_table1'
,
'KEY'
:
'hive://gold.test_schema1/test_table1'
,
'LABEL'
:
'Table'
,
'is_view:UNQUOTED'
:
False
},
{
'description'
:
'test_table1'
,
'KEY'
:
'hive://gold.test_schema1/test_table1/_description'
,
'LABEL'
:
'Description'
},
{
'sort_order'
:
0
,
'type'
:
'bigint'
,
'name'
:
'test_id1'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment