Sample adapter configuration file for the File JSON Output adapter.
<?xml version="1.0" encoding="utf-8"?> <Adapter> <Name>file_json_output</Name> <Description>The File JSON Output adapter takes data from Event Stream Processor, formats it into JSON format, and sends it to a JSON file.</Description> <Log4jProperty>./log4j.properties</Log4jProperty> <Modules> <Module type="espconnector"> <InstanceName>MyOutStream_Subscriber</InstanceName> <Name>EspSubscriber</Name> <Next>MyJsonOutFormatter</Next> <Parameters> <EspSubscriberParameters> <ProjectName>EspProject1</ProjectName> <StreamName>EntityStream</StreamName> </EspSubscriberParameters> </Parameters> </Module> <Module type="formatter"> <InstanceName>MyJsonOutFormatter</InstanceName> <Name>EspToJsonStringFormatter</Name> <Next>MyStringToStreamFormatter</Next> <Parameters> <EspToJsonStringFormatterParameters> <DateFormat>yyyy-MM-dd HH:mm:ss.SSS</DateFormat> <TimestampFormat>yyyy/MM/dd HH:mm:ss</TimestampFormat> <ColsMapping> <Column>published_at</Column> <Column>title</Column> <Column>lang</Column> </ColsMapping> </EspToJsonStringFormatterParameters> </Parameters> </Module> <Module type="formatter"> <InstanceName>MyStringToStreamFormatter</InstanceName> <Name>StringToStreamFormatter</Name> <Next>FileOutputTransporter</Next> <Parameters> <StringToStreamFormatterParameters> <Delimiter>\n</Delimiter> <IncludeDelimiter>true</IncludeDelimiter> <AppendString>\n</AppendString> <AppendPosition>end</AppendPosition> <IgnoreSpace>true</IgnoreSpace> <CharsetName>US-ASCII</CharsetName> </StringToStreamFormatterParameters> </Parameters> </Module> <Module type="transporter"> <InstanceName>FileOutputTransporter</InstanceName> <Name>FileOutputTransporter</Name> <Parameters> <FileOutputTransporterParameters> <Dir>./data</Dir> <File>output.json</File> <AccessMode>Streaming</AccessMode> <AppendMode>false</AppendMode> </FileOutputTransporterParameters> </Parameters> </Module> </Modules> <EspProjects> <EspProject> <Name>EspProject1</Name> <Uri>esp://localhost:19011/sample_workspace/file_json_output</Uri> <Security> <User></User> <Password encrypted="false"></Password> <AuthType>user_password</AuthType> <!-- <RSAKeyStore>/keystore/keystore.jks</RSAKeyStore> <RSAKeyStorePassword>Sybase123</RSAKeyStorePassword> --> <!-- <KerberosKDC>KDC</KerberosKDC> <KerberosRealm>REALM</KerberosRealm> <KerberosService>service/instance</KerberosService> <KerberosTicketCache>/tmp/krb5cc_user</KerberosTicketCache> --> <EncryptionAlgorithm>RSA</EncryptionAlgorithm> </Security> </EspProject> </EspProjects> <GlobalParameters></GlobalParameters> </Adapter>