OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Review Foreign Key Processing during ingestion.

Open ulixius9 opened this issue 1 year ago • 1 comments
trafficstars

While ingesting foreign key constraint we do ES lookup to find the referred table's FQN https://github.com/open-metadata/OpenMetadata/blob/b2ce491ff1c2e473222b006a9e1c1915ed537e87/ingestion/src/metadata/ingestion/source/database/common_db_source.py#L539

because we do not get the database name of the FK from sqlalchemy dialect. This may lead into multiple issues, it may produce incorrect versioning in case the ES did not populate, also the FK information only gets reflected after the 2nd run.

To solve this we can modify/patch the SQA dialects, and grab the information about the database as well, for example snowflake stores the fk db name, once we have all the ingredients to generate FQN we will not have to make a call to ES, and FK can reflect from the first run itself.

image

ulixius9 avatar Apr 10 '24 18:04 ulixius9

I will work on this.

harshsoni2024 avatar Apr 11 '24 05:04 harshsoni2024