-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DAE-121] Adding custom get_partition_values method (#50)
- Loading branch information
Felipe Miquelim
authored
Feb 24, 2021
1 parent
0d52e52
commit 36c945e
Showing
4 changed files
with
92 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from hive_metastore_client import HiveMetastoreClient | ||
|
||
HIVE_HOST = "<ADD_HIVE_HOST_HERE>" | ||
HIVE_PORT = 9083 | ||
|
||
DATABASE_NAME = "database_name" | ||
TABLE_NAME = "table_name" | ||
|
||
with HiveMetastoreClient(HIVE_HOST, HIVE_PORT) as hive_client: | ||
# Getting partition values as a list from specified table | ||
return_value = hive_client.get_partition_values_from_table( | ||
DATABASE_NAME, TABLE_NAME | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters