Does anyone tried / succeeded on applying `databas...
# troubleshoot
n
Does anyone tried / succeeded on applying
database_alias
when ingestion from mysql? (Mine does not work, it just get ingested as original database name, and even in urn it's still the original name. )
my recipe is somthing like this, nothing special
Copy code
database: some_database
database_alias: some_database_alias
s
I think docs might be wrong. Searching for https://github.com/linkedin/datahub/search?p=1&q=database_alias it seems to be implemented for
postgres
,
trino
and
redshift
. I think docs might have gotten copy-pasted.
You could send a PR for
mysql
. I did it initially for
postgres
and it was simple. The above link can tell you where to make changes. https://datahubproject.io/docs/metadata-ingestion/developing/ tells you how to make changes in metadata ingestion sources
n
Thank you very much ! 🙂
m
Hi @nice-planet-17111, I am aware that mysql store only support 2 level namespace i.e schema.table. While postgres supports 3 level namespace - db.schema.table. The db alias we have for stores like postgres (or redshift) replaces the "db" part. So for mysql db_alias may not make sense if multiple schemas are being ingested? May I know your use case? Are you ingesting only one db in mysql and want to provide an alias for the same?
n
Hi @miniature-tiger-96062, Thank you for the reply. My use case is like this : 1. Our company has multiple mysql instances - and there could be schemas with same name in different instances. (for example,
instance1.schema1
and
instance2.schema1
) 2. But in datahub (by default) it does not have separate folder hierarchy in UI(that is, namespace) for instance. 3. In this case,
instance1.schema1
and
instance2.schema1
will be saved in the same folder in UI (
schema1
) - which will be super confusing So i was trying to use database_alias, but it did not work. Luckily i could solve the problem since i found
transformer
function which i can set the folder hierarchy when ingesting🙂
m
Hi @nice-planet-17111, We are aware of this issue for mysql. This quarter we do plan to introduce some instance information in datasetKey/urns. We'll keep the community updated. cc: @big-carpet-38439
❤️ 1