Export SQL to Flat File

Hi all, I am using "Export SQL to Flat File": node completed successfully but it doesn't generate any output document, maybe I'm configuring something wrong. I passed all the required field to "Export SQL to Flat File" as attached. Is there anything I'm missing ?
Thanks for your help!

OriginalPostID-267021



  Discussion posts and replies are publicly visible

  • The configuration looks fine, have you looked at the logs, any errors in there?
  • @elissa

    Did u tried the SQL statement with Schemaname.tableName ?

    Looks like configuration are right. Now I think query is not returning any results.
  • Can you try fetching individual columns instead of select *.
  • Could you please try to get the log for error. Another possibility could be like process does not have security to folder dummy or issues with JNDI name
  • Make sure to use actual table name instead CDT name
  • i tried the same thing, in 17.4 facing the same issue. it is neither giving an error nor a document. Not sure what the problem is. But as per the documentation
    docs.appian.com/.../Export_To_Excel_CSV_Smart_Service.html
    Appian is not recommending the use of smart service Export SQL to Excel and Export SQL to Flat File. I will try in other lower versions.

  • 0
    Certified Lead Developer
    I have tried the same thing but it throws error which can be noticed in the stdOut.log file. I think are some issues with this smart service. If anyone getting any working solution then please post. Below are my observation and sample logs...

    With JNDI - ="java:jdbc/xxxxxx"

    10:53:38,459 INFO [stdout] (Appian Work Item - 9509 - ProcessExec02 : UnattendedJavaActivityRequest) 2018-01-23 10:53:38,458 [Appian Work Item - 9509 - ProcessExec02 : UnattendedJavaActivityRequest] WARN com.appiancorp.common.StrictNamingInitialContext - Detected attempted lookup using invalid JNDI name [java:jdbc/xxxxxx]; attempting to recover by lookup using [java:/jdbc/xxxxxx]. Details:
    10:53:38,459 INFO [stdout] (Appian Work Item - 9509 - ProcessExec02 : UnattendedJavaActivityRequest) com.appiancorp.common.StrictNamingInitialContext.lookup(StrictNamingInitialContext.java:54)
    10:53:38,459 INFO [stdout] (Appian Work Item - 9509 - ProcessExec02 : UnattendedJavaActivityRequest) sun.reflect.GeneratedMethodAccessor22684.invoke(Unknown Source)

    With JNDI - ="jdbc/xxxxxxx"

    10:51:49,599 INFO [stdout] (Appian Work Item - 9508 - ProcessExec01 : UnattendedJavaActivityRequest) 2018-01-23 10:51:49,598 [Appian Work Item - 9508 - ProcessExec01 : UnattendedJavaActivityRequest] ERROR com.appiancorp.analytics.excel_export.ExportSqlToFlatFile - java.lang.NullPointerException
    10:51:49,599 INFO [stdout] (Appian Work Item - 9508 - ProcessExec01 : UnattendedJavaActivityRequest) java.lang.NullPointerException
    10:51:49,599 INFO [stdout] (Appian Work Item - 9508 - ProcessExec01 : UnattendedJavaActivityRequest) at com.appiancorp.analytics.excel_export.ExportSqlToFlatFile.run(ExportSqlToFlatFile.java:81)
  • How to get the jndi it always depends on your Application server

    if you are using JBoss try the jndi to "java:/jdbc/xxxxxxxxxxxx"
    if you were using Oracle Weblogic the jndi should be "jdbc/xxxxxxxxxxxx"
    and so on.

     

    But i will support the use of Appian's Smart service as mentioned in previous posts

  • I'm having the same problem. Initially the problem was with the naming convention for the JDBC connection.

    Ultimately I'm still having the issue, however it's only with the new Document folder that I've created for the application that needs this. If I test with an older folder this works. Will check log files and post more.

    As a result of further testing, this is the issue that I've received:

    <Jan 9, 2019 7:04:18,062 PM GMT> <Notice> <Stdout> <BEA-000000> <2019-01-09 19:04:18,061 [Appian Work Item - 7699 - ProcessExec02 : UnattendedJavaActivityRequest] ERROR com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToFlatFile - java.nio.file.NoSuchFileException: /appian/_admin/accdocs3/11776/10002708.csv
    java.lang.Exception: java.nio.file.NoSuchFileException: /appian/_admin/accdocs3/11776/10002708.csv

     

    I'm not sure if this is an issue with our development server, however I was able to work around the problem by using a "Create Text Doc from Template" node to create a file and then use the resulting file in the "document to overwrite" parameter of the Export SQL smart service.

    Having some issues with extensions, but this seems to work

  • See my entry, it appears (at least in my case) that the Unix file is not being created, but the node seems to receive a filename to write to....