Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for spark USING and OPTIONS keyword #1505

Open
lanklaas opened this issue Nov 8, 2024 · 0 comments
Open

Support for spark USING and OPTIONS keyword #1505

lanklaas opened this issue Nov 8, 2024 · 0 comments

Comments

@lanklaas
Copy link

lanklaas commented Nov 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant