nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Koeller, Arne" <>
Subject AW: [Spam:***** SpamScore] Re: Nifi Bug with AzureSQL
Date Thu, 31 Oct 2019 16:34:11 GMT
Indeed, the PutDatabaseRecord processor will, in this instance, only work when specifying the
DB name (called Catalog Name, I believe), schema name and table name.

However, even when I specified the fully qualified name, the PutDatabaseRecord processor results
in “USE Statement is not supported to switch between databases”.
This has lead me to believe that NiFi, or one of the underlining libraries, sends a USE-SQL
Query, such as

USE <DBName>

to the AzureSQL server.
That would be totally fine if the SQL server was MySQL or MSSQL but because its AzureSQL,
the USE-Query unfortunately fails since AzureSQL doesn’t support USE-Queries.

Am I overlooking something? Or could this be an issue?

Thank you!

Von: Karteek Yadavilli <>
Gesendet: Donnerstag, 31. Oktober 2019 17:08
Betreff: [Spam:***** SpamScore] Re: Nifi Bug with AzureSQL

How about the three part naming convention?


On Oct 31, 2019, at 12:06 PM, Koeller, Arne <<>>

Hello there,

I’m trying to Insert Avro Records into a AzureSQL database.
The Flow is depicted below.

Up until after the ExecuteSQL processor everything works fine. The output of the ExecuteSQL
processor is as follows:

Afterwards, this output is directed to the PutDatabaseRecord processor which has an AvroReader.
The property configuration is as follows:

If I leave the Catalog Name and/or the Schema Name blank, Nifi cant map the fields.

If I however fill I Catalog Name and Schema Name, Nifi results in the Error “USE Statement
is not supported to switch between databases”.
Nifi apparently tries to use the “USE”-SQL Statement here. However, AzureSQL doesn’t
support the “USE”-SQL Statement.

A complete Stacktrace is added below.

If you need additional information, I am happy to help.
Thank you in advance.

Kind regards,


Nifi Flow:

Caused by: USE statement is not supported
to switch between databases. Use a new connection to connect to a different database.
                at org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getColumns(
                at org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getColumns(
                at org.apache.nifi.processors.standard.PutDatabaseRecord$TableSchema.from(
                at org.apache.nifi.processors.standard.PutDatabaseRecord.lambda$executeDML$9(
                ... 27 common frames omitted

View raw message