Nama ERP DocsNama ERP Docs
Home
Namasoft.com
Data Model
GitHub
Home
Namasoft.com
Data Model
GitHub
  • Home

    • Search
    • Guides

      • Entity Flows
      • الفواتير والضرائب والخصومات
      • Supply Chain
      • e-commerce integration (Magento)
      • .
    • Examples
    • Reprocessing Transactions
    • Frequently Asked Questions
    • AI Generated Entity Flows Documentation

      • Core

        • DeleteRelatedEntityAction
        • EAAllowUseAsFromDocOfAField
        • EAAltCodeValidator
        • EAAttachReportResultToRecord
        • EAAutoCollectSignAndSentEInvoice
        • EAAutoEscalateApprovalToFallBackEmployee
        • EAAutoEscalateApprovalToSupervisor
        • EAAutoSendEInvoice
        • EAAutomaticGenerateEntityFromEntityAction
        • EAAutomaticGenerateEntityFromEntityActionWithApproval
        • EACacheEvicter
        • EACalcCurrencyRate
        • EACalcCurrencyRateInDetails
        • EACheckAndUpdateLinkAtOnlinePaymentTransactionSysEntry
        • EACheckDailyBackupOnGoogleDrive
        • EAClearGoogleDriveTrash
        • EACloseFiscalPeriodsInRange
        • EACodeValidator
        • EACopyEmptyAccountsFromBag
        • EADeleteFromAnotherServer
        • EADeleteFromQuery
        • EADeleteOldFiles
        • EADetailsRemover
        • EAEmptifyTomcatTemp
        • EAErrorIfQueryNotMatched
        • EAExecuteUpdateQuery
        • EAExecuteUpdateQueryOnDifferentDatasource
        • EAExportAttachments
        • EAFieldsValuesCalculator
        • EAForceApplyInstallmentEffects
        • EAGenerateDraftEntityFromEntityAction
        • EAGenerateDraftEntityFromEntityActionNoFlush
        • EAGenerateEntityFromEntityAction
        • EAGenerateEntityFromEntityActionNoFlush
        • EAGenerateEntityFromEntityActionNoFlushWithApproval
        • EAGenerateEntityFromEntityActionWithApproval
        • EAGenerateKNetPaymentURLs
        • EAGenerateMyFatoorahPaymentURLs
        • EAGroovyAction
        • EAGuessEntityFromNames
        • EAIgnoringNotFoundTargetFieldsValuesCalculator
        • EAJsonRecordExporter
        • EALoyalityEarnReward
        • EAMakeCreationDateAlwaysAfter
        • EAMakeCreationDateAlwaysBefore
        • EAMakeCreationDateAlwaysBetween
        • EAMakeCreationDateInValueDate
        • EANamaCloudBackupPrepare
        • EAOpenFiscalPeriodsInRange
        • EAPostGoPayOfflinePayment
        • EAPreventChangingFields
        • EAPreventFromDocOfUsageAgain
        • EAPreventUpdateDetailedRemarkLines
        • EAPreventUseAsFromDocOfAField
        • EAPrintFormToPrinter
        • EAPrintReportToPrinter
        • EARecommitFromQuery
        • EARefreshCriticalErrors
        • EARefreshGoogleDriveOrMailToken
        • EARegenAccEffects
        • EARegenAccFromQuery
        • EAReviseUnReviseFromQuery
        • EARevokeApproval
        • EARunEntityFlow
        • EARunEntityFlowFromQuery
        • EARunManualNotification
        • EARunManualNotificationFromQuery
        • EARunTaskSchedule
        • EASQLToCSVEmail
        • EASQLToCSVFile
        • EASaveDraftsFromQuery
        • EASaveRecordsFromQuery
        • EASaveToAnotherServer
        • EASaveToAnotherServerUsingJSON
        • EAScaleImage
        • EAScaleMasterFileImage
        • EASendHttpRequestByTempo
        • EASetCreationDateToEndOfDay
        • EASetCreationDateToStartOfDay
        • EASetFieldByTemplate
        • EASortFields
        • EAWathqAddressFetcher
        • EAWathqBasicInfoFetcher
        • EAWathqCommercialInfoFetcher
        • EAWordTemplate
        • SQLDraftImporter
        • SQLDraftImporterFromDifferentDataSource
        • SQLImporter
        • SQLImporterFromDifferentDataSource
        • Field Maps in Nama ERP - Complete Guide (AI-Generated by Claude.ai)
        • .
      • Accounting Module
      • AI Module
      • Contracting Module
      • CRM Module
      • EGTax Reader Module
      • Freight Management System Module
      • Hospital Management System Module
      • HR Module
      • e-commerce Integration Module
      • Manufacturing Module
      • POS Module
      • Real Estate Module
      • Service Center Module
      • Supply Chain Module
      • .
    • Release Notes

      • 2016
      • 2017
      • 2018
      • 2019
      • 2020
      • 2021
      • 2022
      • 2025
      • .
    • Video Tutorials

      • Supply Chain Videos
      • Report Wizard Videos
      • Human Resources Videos
      • .

EASQLToCSVFile

This document was generated using Claude.ai

Overview

Executes a SQL query and exports results to CSV file format. Supports saving to local file system or remote servers via FTP/FTPS/SFTP protocols. Includes date formatting capabilities and dynamic path generation using Tempo templates.

When This Action Runs

Manual execution for generating data exports, reports, or automated file transfers to external systems requiring CSV format data.

How It Works

  1. Executes SQL query - Runs the provided SQL query against the database
  2. Processes results - Formats data including special date formatting from column aliases
  3. Generates CSV content - Converts query results to CSV format with specified delimiter
  4. Renders file path - Uses Tempo template to generate dynamic file path
  5. Saves file - Writes CSV to local file system or uploads to remote server

Parameters

Parameter 1: SQL Statement (Required) - SQL query to execute and export

Example Query:

select code,creationDate [creationDate#ddMMyyy HH:mm:ss] from Employee

Parameter 2: Delimiter (Required) - CSV field delimiter (e.g., , or ; or |)

Parameter 3: Path Tempo (Required) - Dynamic file path template using Tempo syntax

Parameter 4: Headers Line (Optional) - CSV column headers (uses SQL column names if empty)

Parameter 5: Protocol (Optional) - Transfer protocol: local, ftp, ftps, or sftp (default: local)

Parameter 6: Server URL (Optional) - Remote server address (required for FTP protocols)

Parameter 7: Server Port (Optional) - Server port (21 for FTP, 990 for FTPS, 22 for SFTP)

Parameter 8: Server User (Optional) - Username for remote server authentication

Parameter 9: Server Password (Optional) - Password for remote server authentication

Database Tables Affected

  • Query Target Tables - Reads from tables specified in the SQL query
  • File System - Creates CSV files on local or remote file systems

Important Warnings

⚠️ SQL Query Requirements

  • Query must be valid SQL and return data suitable for CSV export
  • Large result sets may cause memory and performance issues
  • Use proper WHERE conditions to limit result size when appropriate

⚠️ File System Access

  • Local protocol requires write permissions to target directory
  • Remote protocols require network connectivity and valid credentials
  • File paths are created automatically including parent directories

⚠️ Date Formatting

  • Column aliases with # syntax enable custom date formatting
  • Date format patterns must be valid Java SimpleDateFormat patterns
  • Only applies to Date type columns in query results

⚠️ Remote Server Configuration

  • FTP/FTPS/SFTP require proper server configuration and credentials
  • Network firewalls may block remote file transfer protocols
  • Credential security considerations for password parameters

⚠️ Performance Considerations

  • Large CSV files may consume significant memory during generation
  • Remote file transfers add network latency to processing time
  • File operations may fail due to disk space or permission issues

Module: core

Full Class Name: com.namasoft.infor.domainbase.util.actions.EASQLToCSVFile

Related Actions:

  • EASQLToCSVEmail - CSV generation with email delivery
Edit On github
Last Updated:: 7/30/25, 2:51 AM
Prev
EASQLToCSVEmail
Next
EASaveDraftsFromQuery