mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-12 07:48:14 +00:00
Minor fix: Relevant fields are pulled for bulk import (#22154)
Co-authored-by: Ashish Gupta <ashish@getcollate.io>
This commit is contained in:
parent
0b2321e976
commit
85b7328e95
@ -1047,7 +1047,9 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
|
||||
Database database;
|
||||
try {
|
||||
database = Entity.getEntityByName(DATABASE, dbFQN, "*", Include.NON_DELETED);
|
||||
database =
|
||||
Entity.getEntityByName(
|
||||
DATABASE, dbFQN, "name,displayName,fullyQualifiedName,service", Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException ex) {
|
||||
LOG.warn("Database not found: {}. Handling based on dryRun mode.", dbFQN);
|
||||
if (importResult.getDryRun()) {
|
||||
@ -1063,7 +1065,12 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
(DatabaseSchemaRepository) Entity.getEntityRepository(DATABASE_SCHEMA);
|
||||
String schemaFqn = FullyQualifiedName.add(dbFQN, csvRecord.get(0));
|
||||
try {
|
||||
schema = Entity.getEntityByName(DATABASE_SCHEMA, schemaFqn, "*", Include.NON_DELETED);
|
||||
schema =
|
||||
Entity.getEntityByName(
|
||||
DATABASE_SCHEMA,
|
||||
schemaFqn,
|
||||
"name,displayName,fullyQualifiedName",
|
||||
Include.NON_DELETED);
|
||||
} catch (Exception ex) {
|
||||
LOG.warn("Database Schema not found: {}, it will be created with Import.", schemaFqn);
|
||||
schema =
|
||||
@ -1117,7 +1124,9 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
// Fetch Schema Entity
|
||||
DatabaseSchema schema;
|
||||
try {
|
||||
schema = Entity.getEntityByName(DATABASE_SCHEMA, schemaFQN, "*", Include.NON_DELETED);
|
||||
schema =
|
||||
Entity.getEntityByName(
|
||||
DATABASE_SCHEMA, schemaFQN, "name,displayName,service,database", Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException ex) {
|
||||
LOG.warn("Schema not found: {}. Handling based on dryRun mode.", schemaFQN);
|
||||
if (importResult.getDryRun()) {
|
||||
@ -1138,7 +1147,9 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
Table table;
|
||||
|
||||
try {
|
||||
table = Entity.getEntityByName(TABLE, tableFqn, "*", Include.NON_DELETED);
|
||||
table =
|
||||
Entity.getEntityByName(
|
||||
TABLE, tableFqn, "name,displayName,fullyQualifiedName,columns", Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException ex) {
|
||||
// Table not found, create a new one
|
||||
|
||||
@ -1202,7 +1213,9 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
DatabaseSchema schema;
|
||||
|
||||
try {
|
||||
schema = Entity.getEntityByName(DATABASE_SCHEMA, schemaFQN, "*", Include.NON_DELETED);
|
||||
schema =
|
||||
Entity.getEntityByName(
|
||||
DATABASE_SCHEMA, schemaFQN, "name,displayName,service,database", Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException ex) {
|
||||
LOG.warn("Schema not found: {}. Handling based on dryRun mode.", schemaFQN);
|
||||
if (importResult.getDryRun()) {
|
||||
@ -1219,7 +1232,12 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
|
||||
StoredProcedure sp;
|
||||
try {
|
||||
sp = Entity.getEntityByName(STORED_PROCEDURE, entityFQN, "*", Include.NON_DELETED);
|
||||
sp =
|
||||
Entity.getEntityByName(
|
||||
STORED_PROCEDURE,
|
||||
entityFQN,
|
||||
"name,displayName,fullyQualifiedName",
|
||||
Include.NON_DELETED);
|
||||
} catch (Exception ex) {
|
||||
LOG.warn("Stored procedure not found: {}, it will be created with Import.", entityFQN);
|
||||
sp =
|
||||
@ -1282,10 +1300,17 @@ public abstract class EntityCsv<T extends EntityInterface> {
|
||||
Table table;
|
||||
DatabaseSchema schema;
|
||||
try {
|
||||
table = Entity.getEntityByName(TABLE, tableFQN, "*", Include.NON_DELETED);
|
||||
table =
|
||||
Entity.getEntityByName(
|
||||
TABLE, tableFQN, "name,displayName,fullyQualifiedName,columns", Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException ex) {
|
||||
try {
|
||||
schema = Entity.getEntityByName(DATABASE_SCHEMA, schemaFQN, "*", Include.NON_DELETED);
|
||||
schema =
|
||||
Entity.getEntityByName(
|
||||
DATABASE_SCHEMA,
|
||||
schemaFQN,
|
||||
"name,displayName,service,database",
|
||||
Include.NON_DELETED);
|
||||
} catch (EntityNotFoundException exception) {
|
||||
LOG.warn("Schema not found: {}. Handling based on dryRun mode.", schemaFQN);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user