Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Configuration for Default Schema #523

Closed
reata opened this issue Jan 1, 2024 · 7 comments
Closed

Add a Configuration for Default Schema #523

reata opened this issue Jan 1, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@reata
Copy link
Owner

reata commented Jan 1, 2024

Is your feature request related to a problem? Please describe.
When handling SQL like SELECT * FROM tab, sqllineage will assign <default> as the schema name. It would be user-friendly to be able to set that default value.

Describe the solution you'd like
Create a new environment variable as DEFAULT_SCHEMA.

Describe alternatives you've considered
Environment variable makes each process share the same default schema. It would be preferable to config through LineageRunner, but that requires a lot of change. So we'll start with environment variable.

@reata reata added the enhancement New feature or request label Jan 1, 2024
@delphisharp
Copy link
Contributor

Dear reata:
在实际生产中,不同的SQL语句有不同的模式名。
我不确认使用环境变量能否在多进程,多线程的方式下正常工作。
我已经完成修改并完成测试,稍后我会提交PR

In actual production, different SQL statements have different schema name.
I'm not sure whether using environment variables can work properly in multi-process and multi-thread mode.
I have completed the modification and completed the testing, I will submit a PR later

在设计中,各个类没有主基类,导致参数无法自由传递。
我考虑过全局变量,但也是担心在多进程,多线程的问题,故改为在结果汇集方法中进行批量修改。

In the design, each class does not have a main base class, so parameters cannot be passed freely.
I considered global variables, but I was also worried about the problem of multi-process and multi-threading, so I changed to batch modification in the result collection method.

@maoxingda
Copy link
Contributor

May I ask if there is any multithreading code in the current code repository?

@delphisharp
Copy link
Contributor

Current code repository means sqlineage's repository? If yes, then no.
But in my production environment, multiple processes are used to call sqllineage for data lineage

请问current code repository的意思是 sqlineage吗?如果是的话,那是没有的。
在我的生产环境,是使用多进程调用 sqllineage获取血缘的。多进程调用对大数据量处理很重要。

@maoxingda
Copy link
Contributor

yes

@delphisharp
Copy link
Contributor

在sqllineage没有多进程的测试代码
There is no multi-process test code in sqllineage

如果需要的话,我可以写个范例。
因为我提交了PR 修复这个问题,所以要不先看看 PR是否可以解决?
I can write an example if needed.
Since I submitted a PR to fix this problem, why not see if the PR can be solved first?

@reata
Copy link
Owner Author

reata commented Jan 6, 2024

Let me check the code first, thanks. If we can do it without being invasive, config through LineageRunner is without doubt the better approach.
我先看一下实现,代码侵入性不强的话,通过LineageRunner来配置肯定是更优的选择。

P.S: I like the Google Translate approach, thumb up! Currently we have more contributors who speak English only, so it's important we make sure every discussion is at least readable for them, thanks for your cooperation. If there's any details you'd like to talk, you can also reach me on email.
另,Google翻译的方式挺好的,赞!这个项目总体还是英文的contributor更多一些,所有的讨论留有英文还是很重要的,感谢你们的配合。细节上有不确定也欢迎邮件沟通。

@reata
Copy link
Owner Author

reata commented Jan 7, 2024

Close this issue and move configure through LineageRunner to #536

@reata reata closed this as completed Jan 7, 2024
Repository owner deleted a comment from maoxingda Jan 7, 2024
Repository owner deleted a comment from delphisharp Jan 7, 2024
Repository owner deleted a comment from maoxingda Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants