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

Does odpscmd support using variables when executing "odpscm -f a.sql"? #34

Open
koalalight opened this issue Aug 2, 2023 · 0 comments

Comments

@koalalight
Copy link

I can use set var1 in Hive-SQL . can it be possible to use in odpscmd ?
Example :

-- a.sql
set tbl_name;
drop table ${tbl_name};

If I run "hive -f a.sql --define tbl_name=test_1" , then the sql will be "drop table test_1;"
If I run "hive -f a.sql --define tbl_name=test_2" , then the sql will be "drop table test_2;"

This is very convenient because I can generate different data by passing different parameters. How can I implement this feature in odpscmd?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant