Skip to content

Support for spark USING and OPTIONS keyword #1505

@lanklaas

Description

@lanklaas

Hi,

I was trying to extract options from a create table query, but it seems like this syntax from spark is not supported:

CREATE TABLE chin_dbo_Track_LIMIT USING org.apache.spark.sql.jdbc OPTIONS (url "jdbc:sqlserver://localhost:1433;database=Chinook;user=sa;password=mypassword",dbtable "(SELECT TOP 100 
    [E12].[TrackId] [TrackId]
    ,[E12].[Name] [Name]
    ,[E12].[AlbumId] [AlbumId]
    ,[E12].[MediaTypeId] [MediaTypeId]
    ,[E12].[GenreId] [GenreId]
    ,[E12].[Composer] [Composer]
    ,[E12].[Milliseconds] [Milliseconds]
    ,[E12].[Bytes] [Bytes]
    ,[E12].[UnitPrice] [UnitPrice]
    FROM 
[Chinook].[dbo].[Track] [E12]) obj",driver "com.microsoft.sqlserver.jdbc.SQLServerDriver")

Parse error:

 ParserError("Expected: end of statement, found: USING at Line: 2, Column: 43")

This also does not work if I remove the using JDBC part, then it does not expect OPTIONS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions