mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-01 21:23:10 +00:00
MINOR: Fix Couchbase columns not fetched (#18284)
This commit is contained in:
parent
40bd3bd3fa
commit
592d7396bc
@ -27,10 +27,7 @@ from metadata.ingestion.source.database.common_nosql_source import (
|
|||||||
SAMPLE_SIZE,
|
SAMPLE_SIZE,
|
||||||
CommonNoSQLSource,
|
CommonNoSQLSource,
|
||||||
)
|
)
|
||||||
from metadata.ingestion.source.database.couchbase.queries import (
|
from metadata.ingestion.source.database.couchbase.queries import COUCHBASE_GET_DATA
|
||||||
COUCHBASE_GET_DATA,
|
|
||||||
COUCHBASE_SQL_STATEMENT,
|
|
||||||
)
|
|
||||||
from metadata.utils.logger import ingestion_logger
|
from metadata.utils.logger import ingestion_logger
|
||||||
|
|
||||||
logger = ingestion_logger()
|
logger = ingestion_logger()
|
||||||
@ -111,10 +108,6 @@ class CouchbaseSource(CommonNoSQLSource):
|
|||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
database_name = self.context.get().database
|
database_name = self.context.get().database
|
||||||
query = COUCHBASE_SQL_STATEMENT.format(table_name=table_name)
|
|
||||||
result = self.couchbase.query(query)
|
|
||||||
for row in result.rows():
|
|
||||||
if len(row) > 0:
|
|
||||||
query_coln = COUCHBASE_GET_DATA.format(
|
query_coln = COUCHBASE_GET_DATA.format(
|
||||||
database_name=database_name,
|
database_name=database_name,
|
||||||
schema_name=schema_name,
|
schema_name=schema_name,
|
||||||
|
@ -14,10 +14,6 @@ SQL Queries used during ingestion
|
|||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
COUCHBASE_SQL_STATEMENT = textwrap.dedent(
|
|
||||||
""" SELECT * FROM system:indexes WHERE keyspace_id = '{table_name}' AND is_primary = TRUE """
|
|
||||||
)
|
|
||||||
|
|
||||||
COUCHBASE_GET_DATA = textwrap.dedent(
|
COUCHBASE_GET_DATA = textwrap.dedent(
|
||||||
""" select crc.* from `{database_name}`.`{schema_name}`.`{table_name}` crc limit {sample_size} """
|
""" select crc.* from `{database_name}`.`{schema_name}`.`{table_name}` crc limit {sample_size} """
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user