nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Kawamura <ijokaruma...@gmail.com>
Subject Re: Ingest data into SQL database using NiFi
Date Wed, 27 Sep 2017 01:20:16 GMT
Hi Tina,

I tested ExecuteSQL -> ConvertAvroToJSON -> ConvertJSONToSQL -> PutSQL
flow with my SQL Server.
It worked fine, I was able to copy rows from a table to another.
One thing to note is that since you're using two different databases,
you need to specify 'Catalog Name' and 'Schema Name' at
ConvertJSONToSQL properly.

I've written a summary at this Gist page, with SQL examples,
screenshot and flow template:
https://gist.github.com/ijokarumawak/42c257afb5e80361e502564085d7999e

I hope you can find it useful.

Thanks,
Koji

On Wed, Sep 27, 2017 at 4:59 AM, tzhu <js.tianluzhu@gmail.com> wrote:
> Hi Koji,
>
> It shows the same error as I change "date" to "tx_date". You can see the
> error message in the image attached.
>
> <http://apache-nifi-developer-list.39713.n7.nabble.com/file/t792/nifi_error.png>
>
> In the meantime, I'm trying to use ExecuteSQL, ReplaceText, PutSQL to do the
> same thing. While it doesn't throw an error when processing, the value does
> not get copied from the source table but only default format of the datatype
> (showing "1900-01-01" for date and "0" for int).
>
> My original idea was to combine the templates " Database Extract with NiFi
> <https://www.batchiq.com/database-extract-with-nifi.html>  " and " Database
> Ingest with NiFi <https://www.batchiq.com/database-injest-with-nifi.html>  "
> so that NiFi selects the data from one table and insert into another one.
> Now I'm thinking maybe the idea was wrong. If you know some better way to
> solve this problem, please let me know.
>
> Thanks,
>
> Tina
>
>
>
> --
> Sent from: http://apache-nifi-developer-list.39713.n7.nabble.com/

Mime
View raw message