通过Hive Metastore的Redshift外部表

时间:2018-01-16 11:15:47

标签: amazon-s3 amazon-redshift hive-metastore

我有一个红移数据库设置,我们定期将数据存档到S3。我想在这些存档文件之上创建redshift外部表。 AWS文档表明,这可以通过athena或通过hive Metastore来完成。由于雅典娜非常昂贵,我想通过Hive Metastore来完成这项工作。但是我在这里努力争取连接。

以下是我遵循的步骤的链接: https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_SCHEMA.html https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_TABLE.html

创建外部模式效果很好;但在创建表时,我得到以下错误:

Private Sub CommandButton_Click()

Dim i                 As Long
Dim p                 As Long
Dim Item              As String
Dim ifcond            As String
Dim thencond          As String

Excel.Worksheets("OptieRestricties").Select

    With ActiveSheet
        i = 2
        Do Until IsEmpty(.Cells(i, 2))
        p = 4
            Do Until IsEmpty(.Cells(2, p))
                ifcond = ActiveSheet.Cells(i, 2)
                thencond = ActiveSheet.Cells(i, 3)
                Item = ActiveSheet.Cells(i, p)

                If Not IsEmpty(Item) Then
                    Debug.Print Item & " --- " & ifcond & " " & thencond
                End If
                p = p + 1
            Loop
            i = i + 1
        Loop

    End With
  End Sub

知道在这里可以做些什么吗?

0 个答案:

没有答案