mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-07 13:07:22 +00:00
fix: modify fqn to allow quotes with dots (#18719)
This commit is contained in:
parent
d089ffa2d0
commit
17ffdf9850
@ -158,51 +158,6 @@
|
||||
"ordinalPosition": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "\"orders_view\" || \"operations_view\"",
|
||||
"displayName": "Orders View and Operations View",
|
||||
"description": "Orders View and Operations View from Sample Data",
|
||||
"dataModelType": "LookMlView",
|
||||
"serviceType": "Looker",
|
||||
"sql": "view: orders {\n sql_table_name: orders ;;\n\n dimension: \"1. Phase I\" {\n type: string\n sql: ${TABLE}.status ;;\n }\n\n dimension: \"4. Authorized\" {\n type: int\n sql: ${TABLE}.amount ;;\n }\n}",
|
||||
"columns": [
|
||||
{
|
||||
"name": "0. Pre-clinical",
|
||||
"dataType": "NUMERIC",
|
||||
"dataTypeDisplay": "numeric",
|
||||
"description": "Vaccine Candidates in phase: 'Pre-clinical'",
|
||||
"ordinalPosition": 1
|
||||
},
|
||||
{
|
||||
"name": "2. Phase II or Combined I/II",
|
||||
"dataType": "NUMERIC",
|
||||
"dataTypeDisplay": "numeric",
|
||||
"description": "Vaccine Candidates in phase: 'Phase II or Combined I/II'",
|
||||
"ordinalPosition": 2
|
||||
},
|
||||
{
|
||||
"name": "1. Phase I",
|
||||
"dataType": "NUMERIC",
|
||||
"dataTypeDisplay": "numeric",
|
||||
"description": "Vaccine Candidates in phase: 'Phase I'",
|
||||
"ordinalPosition": 3
|
||||
},
|
||||
{
|
||||
"name": "3. Phase III",
|
||||
"dataType": "NUMERIC",
|
||||
"dataTypeDisplay": "numeric",
|
||||
"description": "Vaccine Candidates in phase: 'Phase III'",
|
||||
"ordinalPosition": 4
|
||||
},
|
||||
{
|
||||
"name": "4. Authorized",
|
||||
"dataType": "NUMERIC",
|
||||
"dataTypeDisplay": "numeric",
|
||||
"description": "Vaccine Candidates in phase: 'Authorize'",
|
||||
"ordinalPosition": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@ -136,6 +136,7 @@ from metadata.parsers.schema_parsers import (
|
||||
InvalidSchemaTypeException,
|
||||
schema_parser_config_registry,
|
||||
)
|
||||
from metadata.sampler.models import SampleData, SamplerResponse
|
||||
from metadata.utils import entity_link, fqn
|
||||
from metadata.utils.constants import UTF_8
|
||||
from metadata.utils.fqn import FQN_SEPARATOR
|
||||
@ -898,10 +899,16 @@ class SampleDataSource(
|
||||
|
||||
self.metadata.ingest_table_sample_data(
|
||||
table_entity,
|
||||
TableData(
|
||||
rows=table["sampleData"]["rows"],
|
||||
columns=table["sampleData"]["columns"],
|
||||
),
|
||||
sample_data=SamplerResponse(
|
||||
table=table_entity,
|
||||
sample_data=SampleData(
|
||||
data=TableData(
|
||||
rows=table["sampleData"]["rows"],
|
||||
columns=table["sampleData"]["columns"],
|
||||
),
|
||||
store=True,
|
||||
),
|
||||
).sample_data.data,
|
||||
)
|
||||
|
||||
if table.get("customMetrics"):
|
||||
|
||||
@ -58,6 +58,7 @@ class TestFqn(TestCase):
|
||||
FQNTest(["a.1", "b.2", "c", "d"], '"a.1"."b.2".c.d'),
|
||||
FQNTest(["a.1", "b.2", "c.3", "d"], '"a.1"."b.2"."c.3".d'),
|
||||
FQNTest(["a.1", "b.2", "c.3", "d.4"], '"a.1"."b.2"."c.3"."d.4"'),
|
||||
FQNTest(["fqn", "test.test.test"], 'fqn."test.test.test"'),
|
||||
]
|
||||
for x in xs:
|
||||
x.validate(fqn.split(x.fqn), fqn._build(*x.parts))
|
||||
|
||||
@ -14,7 +14,7 @@ NAME
|
||||
;
|
||||
|
||||
NAME_WITH_RESERVED
|
||||
: QUOTE NON_RESERVED* (RESERVED)* NON_RESERVED* QUOTE
|
||||
: QUOTE NON_RESERVED* (RESERVED NON_RESERVED*)+ QUOTE
|
||||
;
|
||||
|
||||
QUOTE
|
||||
@ -22,7 +22,7 @@ QUOTE
|
||||
;
|
||||
|
||||
NON_RESERVED
|
||||
: ~[.]
|
||||
: ~[".]
|
||||
;
|
||||
|
||||
RESERVED
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user