当前位置: 首页>>代码示例>>Python>>正文


Python HiveMetastoreHook._get_max_partition_from_part_specs方法代码示例

本文整理汇总了Python中airflow.hooks.hive_hooks.HiveMetastoreHook._get_max_partition_from_part_specs方法的典型用法代码示例。如果您正苦于以下问题:Python HiveMetastoreHook._get_max_partition_from_part_specs方法的具体用法?Python HiveMetastoreHook._get_max_partition_from_part_specs怎么用?Python HiveMetastoreHook._get_max_partition_from_part_specs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在airflow.hooks.hive_hooks.HiveMetastoreHook的用法示例。


在下文中一共展示了HiveMetastoreHook._get_max_partition_from_part_specs方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_get_max_partition_from_valid_part_specs_and_invalid_filter_map

# 需要导入模块: from airflow.hooks.hive_hooks import HiveMetastoreHook [as 别名]
# 或者: from airflow.hooks.hive_hooks.HiveMetastoreHook import _get_max_partition_from_part_specs [as 别名]
 def test_get_max_partition_from_valid_part_specs_and_invalid_filter_map(self):
     with self.assertRaises(AirflowException):
         HiveMetastoreHook._get_max_partition_from_part_specs(
             [{'key1': 'value1', 'key2': 'value2'},
              {'key1': 'value3', 'key2': 'value4'}],
             'key1',
             {'key3': 'value5'})
开发者ID:AdamUnger,项目名称:incubator-airflow,代码行数:9,代码来源:test_hive_hook.py

示例2: test_get_max_partition_from_valid_part_specs_and_none_partition_key

# 需要导入模块: from airflow.hooks.hive_hooks import HiveMetastoreHook [as 别名]
# 或者: from airflow.hooks.hive_hooks.HiveMetastoreHook import _get_max_partition_from_part_specs [as 别名]
 def test_get_max_partition_from_valid_part_specs_and_none_partition_key(self):
     with self.assertRaises(AirflowException):
         HiveMetastoreHook._get_max_partition_from_part_specs(
             [{'key1': 'value1', 'key2': 'value2'},
              {'key1': 'value3', 'key2': 'value4'}],
             None,
             self.VALID_FILTER_MAP)
开发者ID:AdamUnger,项目名称:incubator-airflow,代码行数:9,代码来源:test_hive_hook.py

示例3: test_get_max_partition_from_valid_part_specs

# 需要导入模块: from airflow.hooks.hive_hooks import HiveMetastoreHook [as 别名]
# 或者: from airflow.hooks.hive_hooks.HiveMetastoreHook import _get_max_partition_from_part_specs [as 别名]
 def test_get_max_partition_from_valid_part_specs(self):
     max_partition = \
         HiveMetastoreHook._get_max_partition_from_part_specs(
             [{'key1': 'value1', 'key2': 'value2'},
              {'key1': 'value3', 'key2': 'value4'}],
             'key1',
             self.VALID_FILTER_MAP)
     self.assertEqual(max_partition, b'value1')
开发者ID:AdamUnger,项目名称:incubator-airflow,代码行数:10,代码来源:test_hive_hook.py

示例4: test_get_max_partition_from_valid_part_specs_and_none_filter_map

# 需要导入模块: from airflow.hooks.hive_hooks import HiveMetastoreHook [as 别名]
# 或者: from airflow.hooks.hive_hooks.HiveMetastoreHook import _get_max_partition_from_part_specs [as 别名]
    def test_get_max_partition_from_valid_part_specs_and_none_filter_map(self):
        max_partition = \
            HiveMetastoreHook._get_max_partition_from_part_specs(
                [{'key1': 'value1', 'key2': 'value2'},
                 {'key1': 'value3', 'key2': 'value4'}],
                'key1',
                None)

        # No partition will be filtered out.
        self.assertEqual(max_partition, b'value3')
开发者ID:AdamUnger,项目名称:incubator-airflow,代码行数:12,代码来源:test_hive_hook.py

示例5: test_get_max_partition_from_empty_part_specs

# 需要导入模块: from airflow.hooks.hive_hooks import HiveMetastoreHook [as 别名]
# 或者: from airflow.hooks.hive_hooks.HiveMetastoreHook import _get_max_partition_from_part_specs [as 别名]
 def test_get_max_partition_from_empty_part_specs(self):
     max_partition = \
         HiveMetastoreHook._get_max_partition_from_part_specs([],
                                                              'key1',
                                                              self.VALID_FILTER_MAP)
     self.assertIsNone(max_partition)
开发者ID:AdamUnger,项目名称:incubator-airflow,代码行数:8,代码来源:test_hive_hook.py


注:本文中的airflow.hooks.hive_hooks.HiveMetastoreHook._get_max_partition_from_part_specs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。