You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by aj <aj...@gmail.com> on 2020/12/07 17:20:09 UTC
Error while connecting with MSSQL server
Hello ,
I am trying to create a table with microsoft sql server using flink sql
CREATE TABLE sampleSQLSink (
id INTEGER
message STRING,
ts TIMESTAMP(3),
proctime AS PROCTIME()
) WITH (
'connector' = 'jdbc',
'driver' = 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
'url' = 'jdbc:sqlserver://samplecustsql.database.windows.net:1433
;database=customerdb',
'username'=
'password'=
'table-name' =
);
select * from sampleSQLSink
I am getting this error
ERROR] Could not execute SQL statement. Reason:
java.lang.IllegalStateException: Cannot handle such jdbc url:
jdbc:sqlserver://samplecustsql.database.windows.net:1433;database=customerdb
Can somedoby help what is wrong.
I am using microsoft jdbc driver.
Re: Error while connecting with MSSQL server
Posted by aj <aj...@gmail.com>.
Sure thanks Flavio, will check it out
On Wed, Dec 9, 2020, 16:20 Flavio Pompermaier <po...@okkam.it> wrote:
> I issued a PR some time ago at https://github.com/apache/flink/pull/12038 but
> Flink committers were busy in refactoring that part..I don't know if it is
> still required to have that part into the jdbc connector Flink code of if
> using the new factories (that use the java services) you could register
> your own dialect putting your code in a separate jar
>
> On Tue, Dec 8, 2020 at 7:02 AM Jark Wu <im...@gmail.com> wrote:
>
>> Hi,
>>
>> Currently, flink-connector-jdbc doesn't support MS Server dialect. Only
>> MySQL and Postgres are supported.
>>
>> Best,
>> Jark
>>
>> On Tue, 8 Dec 2020 at 01:20, aj <aj...@gmail.com> wrote:
>>
>>> Hello ,
>>>
>>> I am trying to create a table with microsoft sql server using flink sql
>>>
>>> CREATE TABLE sampleSQLSink (
>>> id INTEGER
>>> message STRING,
>>> ts TIMESTAMP(3),
>>> proctime AS PROCTIME()
>>> ) WITH (
>>> 'connector' = 'jdbc',
>>> 'driver' = 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
>>> 'url' = 'jdbc:sqlserver://samplecustsql.database.windows.net:1433
>>> ;database=customerdb',
>>> 'username'=
>>> 'password'=
>>> 'table-name' =
>>> );
>>>
>>>
>>> select * from sampleSQLSink
>>>
>>>
>>> I am getting this error
>>>
>>> ERROR] Could not execute SQL statement. Reason:
>>> java.lang.IllegalStateException: Cannot handle such jdbc url:
>>> jdbc:sqlserver://samplecustsql.database.windows.net:1433
>>> ;database=customerdb
>>>
>>>
>>> Can somedoby help what is wrong.
>>>
>>> I am using microsoft jdbc driver.
>>>
>>
Re: Error while connecting with MSSQL server
Posted by Flavio Pompermaier <po...@okkam.it>.
I issued a PR some time ago at https://github.com/apache/flink/pull/12038 but
Flink committers were busy in refactoring that part..I don't know if it is
still required to have that part into the jdbc connector Flink code of if
using the new factories (that use the java services) you could register
your own dialect putting your code in a separate jar
On Tue, Dec 8, 2020 at 7:02 AM Jark Wu <im...@gmail.com> wrote:
> Hi,
>
> Currently, flink-connector-jdbc doesn't support MS Server dialect. Only
> MySQL and Postgres are supported.
>
> Best,
> Jark
>
> On Tue, 8 Dec 2020 at 01:20, aj <aj...@gmail.com> wrote:
>
>> Hello ,
>>
>> I am trying to create a table with microsoft sql server using flink sql
>>
>> CREATE TABLE sampleSQLSink (
>> id INTEGER
>> message STRING,
>> ts TIMESTAMP(3),
>> proctime AS PROCTIME()
>> ) WITH (
>> 'connector' = 'jdbc',
>> 'driver' = 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
>> 'url' = 'jdbc:sqlserver://samplecustsql.database.windows.net:1433
>> ;database=customerdb',
>> 'username'=
>> 'password'=
>> 'table-name' =
>> );
>>
>>
>> select * from sampleSQLSink
>>
>>
>> I am getting this error
>>
>> ERROR] Could not execute SQL statement. Reason:
>> java.lang.IllegalStateException: Cannot handle such jdbc url:
>> jdbc:sqlserver://samplecustsql.database.windows.net:1433
>> ;database=customerdb
>>
>>
>> Can somedoby help what is wrong.
>>
>> I am using microsoft jdbc driver.
>>
>
Re: Error while connecting with MSSQL server
Posted by Jark Wu <im...@gmail.com>.
Hi,
Currently, flink-connector-jdbc doesn't support MS Server dialect. Only
MySQL and Postgres are supported.
Best,
Jark
On Tue, 8 Dec 2020 at 01:20, aj <aj...@gmail.com> wrote:
> Hello ,
>
> I am trying to create a table with microsoft sql server using flink sql
>
> CREATE TABLE sampleSQLSink (
> id INTEGER
> message STRING,
> ts TIMESTAMP(3),
> proctime AS PROCTIME()
> ) WITH (
> 'connector' = 'jdbc',
> 'driver' = 'com.microsoft.sqlserver.jdbc.SQLServerDriver',
> 'url' = 'jdbc:sqlserver://samplecustsql.database.windows.net:1433
> ;database=customerdb',
> 'username'=
> 'password'=
> 'table-name' =
> );
>
>
> select * from sampleSQLSink
>
>
> I am getting this error
>
> ERROR] Could not execute SQL statement. Reason:
> java.lang.IllegalStateException: Cannot handle such jdbc url:
> jdbc:sqlserver://samplecustsql.database.windows.net:1433
> ;database=customerdb
>
>
> Can somedoby help what is wrong.
>
> I am using microsoft jdbc driver.
>