Search code examples
c#.netnetezzaaginity

C# upload CSV file to Netezza


So my team is looking into connecting to Netezza with C# and we plan on loading data into netezza, pulling data from netezza and writing update queries all in C#.

From my research, I see that it's possible to connect to netezza using C# and I'm wondering if you can do all that is bolded above using C# so that we can decide on whether or not we can do just about anything with Netezza using C#. We'd like to know before we commit to anything. The types of data we would be loading are CSV files.

Are there any good resources on this? I haven't been able to find any.

We also have Aginity client tools so maybe it's possible to incorporate Aginity to this (Not that I would want to but if it's easier I'd like to know about it)?


Solution

  • Retrieving data is straightforward and can be done through the usual channels (loop over a cursor to get results) but loading can take a bit longer.

    Netezza is not a fan of multiple INSERT queries; loading a large number of records with individual INSERT queries, as it doesn't support multi-row inserts, will take a long time.

    When loading multiple records most people usually write out their data to a ".csv" and use the external table syntax to perform the insert.

    When in a application we prefer to load/unload our data via a named pipe so that we don't have to write/read the data to disk prior.