def test_get_export_format_argument(self): hook = SqoopHook() assert "--as-avrodatafile" in hook._get_export_format_argument('avro') assert "--as-parquetfile" in hook._get_export_format_argument( 'parquet') assert "--as-sequencefile" in hook._get_export_format_argument( 'sequence') assert "--as-textfile" in hook._get_export_format_argument('text') assert "--as-textfile" in hook._get_export_format_argument('unknown')
def test_get_export_format_argument(self): hook = SqoopHook() self.assertIn("--as-avrodatafile", hook._get_export_format_argument('avro')) self.assertIn("--as-parquetfile", hook._get_export_format_argument('parquet')) self.assertIn("--as-sequencefile", hook._get_export_format_argument('sequence')) self.assertIn("--as-textfile", hook._get_export_format_argument('text')) with self.assertRaises(AirflowException): hook._get_export_format_argument('unknown')
def test_get_export_format_argument(self): hook = SqoopHook() self.assertIn("--as-avrodatafile", hook._get_export_format_argument('avro')) self.assertIn("--as-parquetfile", hook._get_export_format_argument('parquet')) self.assertIn("--as-sequencefile", hook._get_export_format_argument('sequence')) self.assertIn("--as-textfile", hook._get_export_format_argument('text')) with self.assertRaises(AirflowException): hook._get_export_format_argument('unknown')
def test_get_export_format_argument(self): """ Tests to verify the hook get format function is building correct Sqoop command with correct format type. """ hook = SqoopHook() self.assertIn("--as-avrodatafile", hook._get_export_format_argument('avro')) self.assertIn("--as-parquetfile", hook._get_export_format_argument('parquet')) self.assertIn("--as-sequencefile", hook._get_export_format_argument('sequence')) self.assertIn("--as-textfile", hook._get_export_format_argument('text')) with self.assertRaises(AirflowException): hook._get_export_format_argument('unknown')
def test_get_export_format_argument(self): """ Tests to verify the hook get format function is building correct Sqoop command with correct format type. """ hook = SqoopHook() self.assertIn("--as-avrodatafile", hook._get_export_format_argument('avro')) self.assertIn("--as-parquetfile", hook._get_export_format_argument('parquet')) self.assertIn("--as-sequencefile", hook._get_export_format_argument('sequence')) self.assertIn("--as-textfile", hook._get_export_format_argument('text')) with self.assertRaises(AirflowException): hook._get_export_format_argument('unknown')