### Run full setup with setupDb2.sh Source: https://www.striim.com/docs/en/db2-for-z-os-initial-setup-for-cdc.html Runs the full setup: installs and configures the Striim Agent for Db2 for z/OS, initializes the repository database, creates a pipeline to send data from Db2 to the Striim application's Kafka-persisted stream, starts the agent, and starts the pipeline. Requires the installation bundle to be extracted on the host. ```bash setupDb2.sh -a full -s -r -p ``` -------------------------------- ### OJet setup script example Source: https://www.striim.com/docs/platform/en/configuring-oracle-and-striim-to-use-ojet.html Example command to run setupOJet.sh with a sample IP address, SID, and password. ```bash setupOJet.sh 203.0.113.49:1521/orcl sys ******** OJET_USER ``` -------------------------------- ### Example: report start and stop for MultiLogApp Source: https://www.striim.com/docs/en/using-the-report-start---stop-command.html Example session showing report start, starting the application, and report stop for MultiLogApp. The application must be deployed or running when report start is issued. The output includes total events, first and last event details, and average throughput. ```text W (Samples) > report start multilogapp; Processing - report start multilogapp -> SUCCESS Elapsed time: 11 ms W (Samples) > start application multilogapp; Processing - start application multilogapp -> SUCCESS Elapsed time: 4043 ms W (Samples) > report stop multilogapp; Processing - report stop multilogapp Total Events - 2898802 First Event Time - 14:46:30 First Event - {"timeStamp":"2017-02-23T14:46:30.973-08:00","data":["216.103.201.86","-", "EHernandez","10/Feb/2014:12:13:51.037 -0800","GET http://cloud.saas.me/login& jsessionId=01e3928f-e059-6361-bdc5-14109fcf2383 HTTP/1.1","200","21560","-", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)","1606"], "metadata":{"RecordOffset":479236678,"RecordStatus":"VALID_RECORD","FileName":"access_log", "RecordEnd":479236986,"FileOffset":0},"before":null,"dataPresenceBitMap":"AAA=", "beforePresenceBitMap":"AAA=","typeUUID":null,"idstring":"01e6fa1a-0cb0-b625-a5e4-685b3587069e"} Average Throughput for this interval - 51000 Total Wactions created - 5850 Last Waction created at - 14:47:27 Last Waction - {"internalWactionStoreName":"Samples_UnusualActivity","wactionTs": "2017-02-23T14:47:27.408-08:00","key":"75.201.196.173","mapKey": {"id":"01e6fa1a-0ce9-2b03-a5e4-685b3587069e","key":"75.201.196.173"},"wactionStatus":0, "position":null,"typeOfActivity":"ZeroContent","accessTime":1392142812204, "accessSessionId":"01e39290-7985-4599-bdc5-14109fcf2383","srcIp":"75.201.196.173", "userId":"AWhite","country":"United States","city":null,"lat":38.0,"lon":-97.0, "accessTimeAsLong":1392142812204,"events":[{"_id":null,"timeStamp":1487890047407, "originTimeStamp":0,"key":null,"accessTime":1392142812204,"accessSessionId": "01e39290-7985-4599-bdc5-14109fcf2383","srcIp":"75.201.196.173","userId":"AWhite", "request":"GET http://cloud.saas.me/query?type=ChatterActivity& id=01e39290-798d-0dc9-bdc5-14109fcf2383&jsessionId=01e39290-7985-4599-bdc5-14109fcf2383 HTTP/1.1","code":200,"size":0,"referrer":"-","userAgent":"Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36","responseTime":883, "logTime":1392142812204,"logSessionId":"01e39290-7985-4599-bdc5-14109fcf2383", "level":"WARN","message":"Issue in API call [api=query] [session=01e39290-7985-4599-bdc5- 14109fcf2383] [user=AWhite] [sobject=ChatterActivity]","api":"query", "sobject":"ChatterActivity","xception":"com.me.saas.SaasMultiApplication$SaasException: Issue in API call [api=query] [session=01e39290-7985-4599-bdc5-14109fcf2383] [user=AWhite] [sobject=ChatterActivity]\n\tat com.me.saas.SaasMultiApplication.query (SaasMultiApplication.java:1069)\n\tat sun.reflect.GeneratedMethodAccessor2.invoke (Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606) \n\tat com.me.saas.SaasMultiApplication$ObjectApiCall.invoke(SaasMultiApplication.java:216) \n\tat com.me.saas.SaasMultiApplication$Session.invokeAPI(SaasMultiApplication.java:1500) \n\tat com.me.saas.SaasMultiApplication.main(SaasMultiApplication.java:1626)", "className":"com.me.saas.SaasMultiApplication","method":"query", "fileName":"SaasMultiApplication.java","lineNum":"1072", "idstring":"01e6fa1a-0ce9-0413-a5e4-685b3587069e"}]} Last Event Time - 14:47:27 Last Event - {"timeStamp":"2017-02-23T14:47:27.038-08:00","data":["206.93.30.161","-", "EMorris","11/Feb/2014:10:20:52.043 -0800","GET http://cloud.saas.me/getUpdated? type=ChatterMessage&id=01e39290-79a3-2dd2-bdc5-14109fcf2383&jsessionId= 01e39290-799f-3637-bdc5-14109fcf2383 HTTP/1.1","200","35712","-", "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:24.0) Gecko/20100101 Firefox/24.0","972"], "metadata":{"RecordOffset":479236678,"RecordStatus":"VALID_RECORD","FileName":"access_log", "RecordEnd":479236986,"FileOffset":0},"before":null,"dataPresenceBitMap":"AAA=", "beforePresenceBitMap":"AAA=","typeUUID":null,"idstring":"01e6fa1a-0cb0-b625-a5e4-685b3587069e"} Average Throughput for this interval - 51000 Total Wactions created - 5850 Last Waction created at - 14:47:27 Last Waction - {"internalWactionStoreName":"Samples_UnusualActivity","wactionTs": "2017-02-23T14:47:27.408-08:00","key":"75.201.196.173","mapKey": {"id":"01e6fa1a-0ce9-2b03-a5e4-685b3587069e","key":"75.201.196.173"},"wactionStatus":0, "position":null,"typeOfActivity":"ZeroContent","accessTime":1392142812204, "accessSessionId":"01e39290-7985-4599-bdc5-14109fcf2383","srcIp":"75.201.196.173", "userId":"AWhite","country":"United States","city":null,"lat":38.0,"lon":-97.0, "accessTimeAsLong":1392142812204,"events":[{"_id":null,"timeStamp":1487890047407, "originTimeStamp":0,"key":null,"accessTime":1392142812204,"accessSessionId": "01e39290-7985-4599-bdc5-14109fcf2383","srcIp":"75.201.196.173","userId":"AWhite", "request":"GET http://cloud.saas.me/query?type=ChatterActivity& id=01e39290-798d-0dc9-bdc5-14109fcf2383&jsessionId=01e39290-7985-4599-bdc5-14109fcf2383 HTTP/1.1","code":200,"size":0,"referrer":"-","userAgent":"Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36","responseTime":883, "logTime":1392142812204,"logSessionId":"01e39290-7985-4599-bdc5-14109fcf2383", "level":"WARN","message":"Issue in API call [api=query] [session=01e39290-7985-4599-bdc5- 14109fcf2383] [user=AWhite] [sobject=ChatterActivity]","api":"query", "sobject":"ChatterActivity","xception":"com.me.saas.SaasMultiApplication$SaasException: Issue in API call [api=query] [session=01e39290-7985-4599-bdc5-14109fcf2383] [user=AWhite] [sobject=ChatterActivity]\n\tat com.me.saas.SaasMultiApplication.query (SaasMultiApplication.java:1069)\n\tat sun.reflect.GeneratedMethodAccessor2.invoke (Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:606) \n\tat com.me.saas.SaasMultiApplication$ObjectApiCall.invoke(SaasMultiApplication.java:216) \n\tat com.me.saas.SaasMultiApplication$Session.invokeAPI(SaasMultiApplication.java:1500) \n\tat com.me.saas.SaasMultiApplication.main(SaasMultiApplication.java:1626)", "className":"com.me.saas.SaasMultiApplication","method":"query", "fileName":"SaasMultiApplication.java","lineNum":"1072", "idstring":"01e6fa1a-0ce9-0413-a5e4-685b3587069e"}]} ``` -------------------------------- ### Output of setupOJet.sh check option Source: https://www.striim.com/docs/en/configuring-oracle-and-striim-to-use-ojet.html Example output when running setupOJet.sh with the check option. Shows warnings for missing patches that must be installed before running the setup script. ```text Configuration check for OJet using user sys as sysdba started. Settings for downstream capture connecting to the capture database, using user sys as sysdba Checking existing configuration: Apply server owners: 0 Rule owners: 0 Queue table owners: 0 Capture owners: 0 Queue owners: 0 Rule set owners: 0 Checking required database options Checking if required patches are installed Warning: patch 31254535 not found to be installed Warning: patch 28209272 not found to be installed Warning: patch 34470389 not found to be installed Warning: patch 32338220 not found to be installed Warning: patch 34010877 not found to be installed ``` -------------------------------- ### Successful agent start output Source: https://www.striim.com/docs/en/connecting-striim-cloud-on-azure-to-data-services-behind-striim-forwarding-agent.html Example output from a successful agent start showing version and connection status. ```text Striim Agent: Version 5.4.0.6 (...) Connecting to cluster Striim.......connected ``` -------------------------------- ### OJet setup script successful output Source: https://www.striim.com/docs/platform/en/configuring-oracle-and-striim-to-use-ojet.html Example output from running setupOJet.sh successfully, showing granted resources and enabled features. ```text ./setupOJet.sh localhost:1521/ORCL sys oracle OJET_USER Configuration for OJet using user OJET_USER started: Granted resources to user OJET_USER Granted select any dictionary privilege to user OJET_USER Enabled replication Enabled streaming Enabled supplemental logging Building dictionary log … Done ``` -------------------------------- ### CREATE JUMPING WINDOW with PARTITION BY example Source: https://www.striim.com/docs/en/create-window.html Example from MultiLogApp that creates a one-hour jumping window for each company's API usage stream. The window is partitioned by company, so the hour is timed separately for each company, starting when the first event for that company is received. ```tql CREATE JUMPING WINDOW CompanyWindow OVER CompanyApiUsageStream KEEP WITHIN 1 HOUR ON logTime PARTITION BY company; ``` -------------------------------- ### START command syntax Source: https://www.striim.com/docs/en/console-commands.html Starts the specified application. ```striim START .; ``` -------------------------------- ### Load, deploy, and start simple.tql Source: https://www.striim.com/docs/platform/en/writing-a-simple-application-using-a-text-editor.html Console commands to load, deploy, and start the simple.tql application. After starting, the contents of RawDataStream appear in striim-node.log or the server terminal. ```console @samples/simple.tql; deploy application simple; start simple; ``` -------------------------------- ### Example setupOJet.sh command Source: https://www.striim.com/docs/en/configuring-oracle-and-striim-to-use-ojet.html Example command to run setupOJet.sh with a sample IP address, SID, and password. ```bash setupOJet.sh 203.0.113.49:1521/orcl sys ******** OJET_USER ``` -------------------------------- ### Configuration Example Source: https://www.striim.com/docs/platform/en/switching-from-initial-load-to-continuous-replication-of-snowflake-sources.html Shows how to configure the product for specific use cases. ```yaml version: '3' services: app: image: example/app ``` -------------------------------- ### Start Kafka commands for DEB/RPM/TGZ/ZIP installation Source: https://www.striim.com/docs/platform/en/configuring-kafka-for-persisted-streams.html Commands to start Zookeeper and Kafka when Striim is installed from a DEB, RPM, TGZ, or ZIP package. Run these from the `Striim/Kafka` directory in separate terminals. ```bash bin/zookeeper-server-start.sh config/zookeeper.properties ``` ```bash JMX_PORT=9998 bin/kafka-server-start.sh config/server.properties ``` -------------------------------- ### Example metadata repository configuration for Azure PostgreSQL Source: https://www.striim.com/docs/platform/en/running-striim-in-azure.html Example startUp.properties values using a sample Azure PostgreSQL server name and hostname. ```properties MetadataDb=azurepostgres MetaDataRepositoryLocation=striimtest1.postgres.database.azure.com:5432/striimrepo MetaDataRepositoryDBname=striimrepo MetaDataRepositoryUname=striim@striimtest1 ``` -------------------------------- ### Start the agent Source: https://www.striim.com/docs/en/connecting-striim-cloud-on-azure-to-data-services-behind-striim-forwarding-agent.html Commands to start the Striim Forwarding Agent. Run from the agent installation directory. ```bash cd /opt/striim/Agent/bin sudo ./agent.sh ``` -------------------------------- ### Expected output of setupOJet.sh Source: https://www.striim.com/docs/en/configuring-oracle-and-striim-to-use-ojet.html Example output after running setupOJet.sh successfully, showing granted resources and enabled features. ```text ./setupOJet.sh localhost:1521/ORCL sys oracle OJET_USER Configuration for OJet using user OJET_USER started: Granted resources to user OJET_USER Granted select any dictionary privilege to user OJET_USER Enabled replication Enabled streaming Enabled supplemental logging Building dictionary log … Done ``` -------------------------------- ### Striim configuration: PARTITION BY example Source: https://www.striim.com/docs/en/create-a-clickhouse-writer-application.html Shows how to supply PARTITION BY via TargetTableDefinition. The example partitions by month using toYYYYMM(placed_at). ```Text TargetTableDefinition: '{ "tgt.mytable": { "Partition BY": "toYYYYMM(placed_at)" } }' ``` -------------------------------- ### Enable and start Striim Agent on Ubuntu 16.04+ Source: https://www.striim.com/docs/platform/en/striim-forwarding-agent-installation-and-configuration.html Enables and starts the Striim Agent service on Ubuntu 16.04 or later. Use after installation and configuration. ```bash systemctl enable striim-agent && systemctl start striim-agent ``` -------------------------------- ### Example Usage Source: https://www.striim.com/docs/platform/en/switching-from-initial-load-to-continuous-replication-of-snowflake-sources.html A basic example demonstrating the product's core functionality. ```bash echo 'Hello, World!' ``` -------------------------------- ### Start console from terminal Source: https://www.striim.com/docs/en/console-commands.html Command to start the Striim console from a terminal when Striim is installed in /opt. Replace with the actual cluster name. ```bash /opt/Striim/bin/console.sh -c ``` -------------------------------- ### Get current timestamp from MySQL source Source: https://www.striim.com/docs/en/switching-from-initial-load-to-continuous-replication-of-mysql-sources.html Run this command on the source database before starting the initial load to capture the starting point for real-time replication. ```sql select current_timestamp; ``` -------------------------------- ### Set up the keystore Source: https://www.striim.com/docs/en/connecting-striim-cloud-on-google-cloud-platform-to-data-services-behind-striim-forwarding-agent.html Commands to run the keystore setup utility and set proper ownership for the keystore files. Requires the Striim sys user password. ```bash cd /opt/striim/Agent/bin sudo ./aksConfig.sh sudo chown striim /opt/striim/Agent/conf/aks.jks sudo chown striim /opt/striim/Agent/conf/aksKey.pwd ``` -------------------------------- ### Start pipeline with setupDb2.sh Source: https://www.striim.com/docs/en/db2-for-z-os-initial-setup-for-cdc.html Starts the pipeline that was created with the create command. ```bash setupDb2.sh -a start -p ``` -------------------------------- ### Start console on Windows Source: https://www.striim.com/docs/en/console-commands.html Command to start the Striim console from a Windows command prompt when Striim is installed in c:\striim. Replace with the actual cluster name. ```bash \striim\bin\console -c ``` -------------------------------- ### Configure sequence start and increment in rollover or upload policy Source: https://www.striim.com/docs/en/setting-output-names-and-rollover---upload-policies.html Adds the sequencestart and incrementsequenceby parameters to rolloverpolicy or uploadpolicy to start file sequence numbers at a value greater than 0 or increment them by more than 1. Example sets start at 10 and increments by 10. ```text rolloverpolicy:'eventcount:10000,sequencestart:10,incrementsequenceby:10' ``` -------------------------------- ### Install Striim samples package Source: https://www.striim.com/docs/platform/en/creating-a-cluster-in-red-hat-enterprise-linux.html Optionally install the sample applications package. ```bash sudo rpm -ivh striim-samples-5.4.2-Linux.rpm ``` -------------------------------- ### Start the Tungsten console Source: https://www.striim.com/docs/en/console-commands.html Command to launch the Tungsten console from the terminal, assuming a standard installation path. ```bash /opt/Striim/bin/console.sh ``` -------------------------------- ### Back up startUp.properties Source: https://www.striim.com/docs/platform/en/configuring-striim-s-metadata-repository.html Make a backup copy of startUp.properties before editing it. ```bash cd /opt/striim/conf cp startUp.properties *.bak ``` -------------------------------- ### GET /health/healthRecords Source: https://www.striim.com/docs/en/api-guide.html Returns health records from a specific time range using start and end switches. ```APIDOC ## [GET] /health/healthRecords ### Description Returns health records from a specific time range using start and end switches. ### Method GET ### Endpoint http://:/health/healthRecords?start=&end=&token= ### Parameters #### Query Parameters - **start** (integer) - Required - Start time in milliseconds. - **end** (integer) - Required - End time in milliseconds. - **token** (string) - Required - Authentication token for the REST API. ### Request Example ``` http://:/health/healthRecords?start=&end=&token= ``` ``` -------------------------------- ### CREATE DASHBOARD example from PosApp Source: https://www.striim.com/docs/en/create-dashboard.html Example command that imports the PosAppDashboard.json file from the Samples/PosApp directory. ```sql CREATE DASHBOARD USING "Samples/PosApp/PosAppDashboard.json"; ``` -------------------------------- ### Set up keystore with aksConfig.sh Source: https://www.striim.com/docs/en/connecting-striim-cloud-on-azure-to-data-services-behind-striim-forwarding-agent.html Run the keystore setup utility and enter the Striim 'sys' user password when prompted. Changes ownership of aks.jks and aksKey.pwd to striim user. ```shell cd /opt/striim/Agent/bin sudo ./aksConfig.sh sudo chown striim /opt/striim/Agent/conf/aks.jks sudo chown striim /opt/striim/Agent/conf/aksKey.pwd ``` -------------------------------- ### Start PostgreSQL Docker container Source: https://www.striim.com/docs/platform/en/running-the-cdc-demo-apps.html Runs a Docker container with a PostgreSQL instance configured as a source and target for the CDC demo apps. Use this command on Windows when installing the demo apps with a new Striim installation. ```bash docker run --name striimpostgres -d -p 5432:5432 striim/striim-postgres-cdc:latest ``` -------------------------------- ### S3 Writer sample application Source: https://www.striim.com/docs/platform/en/s3-writer.html Starts a Striim application named testS3 for the S3 Writer. This is the only code example on the page. ```sql CREATE APPLICATION testS3; ``` -------------------------------- ### Example HTTP log entry Source: https://www.striim.com/docs/en/parsing-http-log-entries.html Example log entry that the FreeFormTextParser regex is designed to parse. It contains fields such as start, addr, port, method, url, bytes, status, end, and host, while the log and agent patterns are excluded from the regex. ```text log {start 1234567890.123456} {addr 123.456.789.012} {port 12345} {method POST} {url /abc/def.ghi} {agent {Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.12345.1234)}} {bytes 1234} {status 200} {end 1234567890.123456} {host 123.456.789.012} ... ``` -------------------------------- ### StartTimestamp property example Source: https://www.striim.com/docs/en/kafka.html Specifies partition-specific start timestamps in the format 'key=value; key=value', where keys are partition numbers and values are timestamps. ```text StartTimestamp: '0=;1=;2=' ``` -------------------------------- ### Set DocumentationURL in startUp.properties Source: https://www.striim.com/docs/platform/en/switching-online-help-links-to-open-the-latest-docs-on-the-web.html Add this line to startUp.properties to make help links open the web documentation. Restart the server as described in 'Starting and stopping Striim Platform' for the change to take effect. ```properties DocumentationURL=https://www.striim.com/docs/archive/542/platform ``` -------------------------------- ### StartOffset property example Source: https://www.striim.com/docs/en/kafka.html Specifies partition-specific start offsets in the format 'key=value; key=value', where keys are partition numbers and values are offsets. ```text StartOffset: '0=1; 1=0; 2=1024' ``` -------------------------------- ### Example from MultiLogApp Source: https://www.striim.com/docs/en/create-wactionstore.html Example from MultiLogApp showing the creation of a type, a WActionStore, and a CQ that populates it. This stores information used to populate the five-column table on the Zero Content details dashboard page. ```sql CREATE TYPE ZeroContentEventListType ( srcIp String KEY, code Integer, size Integer, level String, message String, xception String); CREATE WACTIONSTORE ZeroContentEventList CONTEXT OF ZeroContentEventListType EVENT TYPES ( ZeroContentEventListType ... CREATE CQ GenerateZeroContentEventList INSERT INTO ZeroContentEventList SELECT srcIp, code, size, level, message, xception ... ``` -------------------------------- ### SCF commands to create and start the agent as a persistent generic process Source: https://www.striim.com/docs/en/running-the-striim-agent-as-an-scf-persistent-generic-process.html Use these SCF commands to add and start the agent as a persistent generic process. The NAME argument can be changed but must be specified. DEFAULTVOL must be set to the installation volume and subvolume. The ALLOWED-TABLES PARAM and DEFINE are optional; additional PARAMs and DEFINEs can be added before START. ```scf ASSUME PROCESS $ZZKRN ADD #WAGNT, & NAME $WAGNT, & HOMETERM $ZHOME, & CPU FIRSTOF (1,2,3), & AUTORESTART 10, & PROGRAM <$vol>..WAGENT , & DEFAULTVOL <$vol>. , & USERID ., & STARTMODE APPLICATION, & STARTUPMSG "--agent_port --logger_name " [ ADD #WAGNT , & ( PARAM ALLOWED-TABLES <$vol>.. ) ] [ ADD #WAGNT , & ( DEFINE =TCPIP^PROCESS^NAME, CLASS MAP, FILE ) ] START #WAGNT ``` -------------------------------- ### Import metadata example for 5.0.2.4 to 5.4.0.1 Source: https://www.striim.com/docs/platform/en/importing-the-metadata-and-completing-the-upgrade.html Example of the import command when upgrading from 5.0.2.4 to 5.4.0.1. ```bash sudo bin/tools.sh -A import -F export.json -B 5.0.2.4 -E 5.4.0.1 ``` -------------------------------- ### Install and initialize repository with setupDb2.sh Source: https://www.striim.com/docs/en/db2-for-z-os-initial-setup-for-cdc.html Installs and configures the Striim Agent for Db2 for z/OS and initializes the repository database without creating a pipeline. Use this when you want to create pipelines later with the create command. ```bash setupDb2.sh -a install -r -p ``` -------------------------------- ### Example REPORT LEE STATS command Source: https://www.striim.com/docs/en/monitoring-end-to-end-lag--lee-.html Example command returning statistics for two one-hour intervals (10-11 am and 11am-noon) for the current day. The start and end times can be specified in yyyy/MM/dd-HH:mm or yyyy/MM/dd-HH:mm:ss format for previous days. ```sql REPORT LEE STATS OracleSource KafkaTarget -START '10:00' -END '12:00' -ROLLUPINTERVAL '1h'; ``` -------------------------------- ### Configure startupProperties in my-values.yaml Source: https://www.striim.com/docs/platform/en/running-striim-in-the-google-kubernetes-engine.html Specify cluster name, product key, license key, and enable HTTP/HTTPS. Replace placeholders with values provided by Striim. ```yaml startupProperties: WAClusterName: ProductKey: LicenceKey: HttpEnabled: true HttpsEnabled: true ... ``` -------------------------------- ### Get current GTID for MariaDB Source: https://www.striim.com/docs/en/switching-from-initial-load-to-continuous-replication-of-mariadb-sources.html Run this SQL command on the source database to get the current global transaction ID (GTID) before performing the initial load. Record the returned value to use as the Start Position for the continuous real-time replication application. ```sql select @@gtid_current_pos; ``` -------------------------------- ### Initial load configuration: Tables mapping, Target Table Definition, and OracleToClickhouse_IL TQL Source: https://www.striim.com/docs/platform/en/create-a-clickhouse-writer-application.html Configuration examples for the initial load workflow: the Tables mapping with KeyColumns, an optional Target Table Definition JSON controlling ORDER BY and PARTITION BY, and the full Striim application TQL that creates the source, flow, and ClickHouse Writer target with CreateSchema enabled and Mode set to APPENDONLY. ```text Tables: ORACLE_SCHEMA.SOURCE_TABLE,CH_SCHEMA.TARGET_TABLE KeyColumns(ID) ``` ```json Target Table Definition: { "CH_SCHEMA.ORDERS": { "Order By": "ORDER_ID", "Partition By": "toYYYYMM(CREATED_AT)" } } ``` ```sql CREATE OR REPLACE APPLICATION OracleToClickhouse_IL RECOVERY 30 SECOND INTERVAL USE EXCEPTIONSTORE TTL : '7d'; CREATE FLOW OracleToClickhouse_IL_SourceFlow; CREATE OR REPLACE SOURCE OracleToClickhouse_IL_DBSource USING Global.DatabaseReader ( EnablePartitionAwareRead: true, connectionProfileName: 'admin.Oracle_Connection_Profile', QuiesceOnILCompletion: true, DatabaseProviderType: 'Oracle', useConnectionProfile: true, Tables: '"".""', ParallelThreads: 1, RestartBehaviourOnILInterruption: 'keepTargetTableData', FetchSize: 10000, CreateSchema: true ) OUTPUT TO OracleToClickhouse_IL_OutputStream; END FLOW OracleToClickhouse_IL_SourceFlow; CREATE OR REPLACE TARGET OracleToClickhouse_IL_Target USING Global.ClickHouseWriter ( DeleteStrategy: 'LightweightDelete', Mode: 'APPENDONLY', NullMarker: 'NULL', connectionProfileName: 'admin.ClickHouse_Cloud_CP', optimizedMerge: false, Tables: '""."%","".%', UploadPolicy: 'eventcount:10000,interval:30s', CDDLAction: 'Process', ConnectionRetryPolicy: 'initialRetryDelay=10s, retryDelayMultiplier=2, maxRetryDelay=1m, maxAttempts=10, totalTimeout=10m', TableEngine: 'MergeTree' ) INPUT FROM OracleToClickhouse_IL_OutputStream; END APPLICATION OracleToClickhouse_IL; ``` -------------------------------- ### Regex property example with multiple patterns Source: https://www.striim.com/docs/en/free-form-text-parser.html Shows how to define multiple regex patterns for the Regex property, separated by the '|' character. The example matches a word at the start, text after 'Author: ', and text after a blank line. Note that RecordBegin and RecordEnd do not support regex. ```regex regex: '((^([\w]+)) | ((?<=Author: ).*(\n)) | ((?<=\n\n).*))' ``` -------------------------------- ### Create user and describe with DESCRIBE Source: https://www.striim.com/docs/en/inspecting-users-and-roles-with-list-and-describe.html This example shows creating a new user with CREATE USER and then using DESCRIBE to see the user's details. The output includes the user's roles and indicates no email is set and authentication is internal. ```console W (admin) > CREATE USER newuser IDENTIFIED BY passwd; Processing - CREATE USER newuser IDENTIFIED BY passwd -> SUCCESS Elapsed time: 131 ms W (admin) > describe user newuser; Processing - describe user newuser USER newuser CREATED 2017-10-02 17:19:00 USERID newuser CONTACT THROUGH [] ROLES {newuser.admin, newuser.useradmin, Global.systemuser, Global.uiuser} PERMISSIONS [] INTERNAL user. ``` -------------------------------- ### Set NATIVE_LIBS property in agent.conf Source: https://www.striim.com/docs/en/striim-forwarding-agent-installation-and-configuration.html Add this property to Agent/conf/agent.conf to specify the Oracle Instant Client path. The example uses /usr/local/instantclient_21.6 as the installation directory. ```properties NATIVE_LIBS=/usr/local/instantclient_21.6 ``` -------------------------------- ### curl GET request with bearer token Source: https://www.striim.com/docs/en/automating-user-management-using-striim-apis.html Example curl command to list users. Replace {your-account} with your account short name and with your token. ```bash curl -X GET "https://{your-account}.striim.cloud/api/v1/users" \ -H "Authorization: Bearer " ``` -------------------------------- ### TQL Example 1 - AvroDebezium Source: https://www.striim.com/docs/en/create-external-source.html Example of creating an external source with AvroDebezium data format and a schema registry URL. ```sql CREATE STREAM example_data OF Global.WAEvent PERSIST; CREATE EXTERNAL SOURCE example_source ( connector: 'exampleDB', dataFormat: 'AvroDebezium', schemaRegistry: 'http://10.0.0.92:8085' ) OUTPUT TO example_data; ``` -------------------------------- ### curl example to query Salesforce for SystemModstamp Source: https://www.striim.com/docs/en/switching-from-initial-load-to-continuous-replication-of-salesforce-sources.html Example using curl to query Salesforce for the SystemModstamp of an object. Replace , , and with your values. This is used to retrieve the SystemModstamp values needed to determine the Start Timestamp for Salesforce CDC Reader. ```bash curl --location 'https://.salesforce.com/services/data/v65.0/query?q=' \ --header 'Authorization: Bearer ' ``` -------------------------------- ### PREVIEW Command Example Source: https://www.striim.com/docs/en/console-commands.html Example usage of the PREVIEW command and its typical output format. ```text PREVIEW Samples.PosData5Minutes inputoutput limit 1; ``` ```text Processing - preview samples.CsvToPosData inputoutput limit 1 Source:"Samples.CsvStream",IO:"I",Action:"added",Server:"S192_168_7_91", Data:"[[COMPANY 366761, 9XGDirhiN2UPnJ9w5GqmISM2QXe1Coav3Fq, 0558659360821268472, 6, 20130312174714, 0615, USD, 8.42, 8641415475152637, 61064, Polo], {FileOffset=0, RecordEnd=49798966, RecordOffset=49798836, FileName=posdata.csv, RecordStatus=VALID_RECORD}]" Source:"Samples.CsvToPosData",IO:"O",Action:"added",Server:"S192_168_7_91", ``` -------------------------------- ### Restart and enable Ollama service Source: https://www.striim.com/docs/platform/en/configuring-clara-ai.html Commands to reload the systemd daemon, restart the Ollama service, and enable it to start on boot. Run these on the host where Ollama is installed. ```bash sudo systemctl daemon-reload sudo systemctl restart ollama sudo systemctl enable ollama ``` -------------------------------- ### Create, deploy, and start a TQL application Source: https://www.striim.com/docs/en/loading-and-reloading-tql-applications-during-development.html Console commands to create, deploy, and start a TQL application named simple. The output shows the processing messages and elapsed times for each command. ```console W (admin): **@Samples/simple.tql;** Processing - CREATE APPLICATION simple ... Processing - END APPLICATION simple Elapsed time: 2473 ms W (admin): **deploy application simple in default;** Processing - deploy application simple in default Elapsed time: 180 m W (admin): **start application simple;** Processing - start application simple Elapsed time: 73 ms ``` -------------------------------- ### Table name specification examples for ServiceNow Writer Source: https://www.striim.com/docs/platform/en/servicenow-writer.html Examples showing how to specify source and target table mappings. The first maps a specific source table to a target object. The second uses wildcards to write to all objects starting with 'Emp'. The third writes to all matching objects at the target. ```text source.emp,Employee_c ``` ```text source.mydatabase.Emp%,% ``` ```text source1.%,% ``` -------------------------------- ### Example output of mon command for application summary Source: https://www.striim.com/docs/platform/en/using-the-mon-command.html Example output showing the summary view of the application Samples.MultiLogApp, including status, rates, CPU usage, and activity timestamps for each component. ```text ╒═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╕ │ Application Samples.MultiLogApp │ ├───────────────────────────────────────────┬─────────────────┬────────┬─────────────────┬────────┬────────┬────────────────────────────────────────┤ │ Name │ Status │ Rate │ SourceRate │ CPU% │ Nodes │ Activity │ ├───────────────────────────────────────────┼─────────────────┼────────┼─────────────────┼────────┼────────┼────────────────────────────────────────┤ │ Samples.MultiLogApp │ RUNNING │ 571,01 │ 40,958 │ 66% │ 1 │ 2021-04-28 17:02:14 │ │ │ │ 0 │ │ │ │ │ │ Samples.ApiFlow │ │ 0 │ 0 │ │ 1 │ │ │ Samples.GetApiSummaryUsage │ │ 176 │ 0 │ 0% │ 1 │ 2021-04-28 17:02:13 │ │ Samples.GetApiUsage │ │ 26,142 │ 0 │ 0% │ 1 │ 2021-04-28 17:02:13 │ │ Samples.ApiSummaryWindow │ │ 0 │ 0 │ │ 1 │ 2021-04-28 17:02:13 │ ... │ Samples.ZeroContentCheck │ │ 0 │ 0 │ │ 1 │ │ │ Samples.FindZeroContent │ │ 19,550 │ 0 │ 7% │ 1 │ 2021-04-28 17:02:14 │ │ Samples.GenerateZeroContentContext │ │ 0 │ 0 │ 0.02% │ 1 │ 2021-04-28 17:02:03 │ ... │ Samples.ZeroContentEventList │ │ 0 │ 0 │ 0% │ 1 │ 2021-04-28 17:02:03 │ │ Samples.ZeroContentAlertSub │ │ 0 │ 0 │ 0% │ 1 │ 2021-04-28 17:02:03 │ └───────────────────────────────────────────┴─────────────────┴────────┴─────────────────┴────────┴────────┴────────────────────────────────────────┘ ``` -------------------------------- ### Get maximum LSN for SQL Server initial load Source: https://www.striim.com/docs/en/switching-from-initial-load-to-continuous-replication-of-sql-server-sources.html Run this on the source SQL Server database before starting the initial load to capture the current maximum log sequence number (LSN). Record the returned value to use as the Start Position for the continuous real-time replication application. ```sql SELECT sys.fn_cdc_get_max_lsn()AS max_lsn; ``` -------------------------------- ### Checkpoint queue records with RBA values Source: https://www.striim.com/docs/en/switching-from-initial-load-to-continuous-replication-of-db2-for-z-os-sources.html Example output from the BSDS print job showing checkpoint queue records. The record of interest is the one with TIME OF CHECKPOINT prior to the initial load start time. The BEGIN CHECKPOINT RBA value from that record is used as the start RBA for CDC. ```text TIME OF CHECKPOINT 11:13:43 SEPTEMBER 18, 2025 BEGIN CHECKPOINT RBA 00000000000248EEF96C END CHECKPOINT RBA 00000000000248EF921D END CHECKPOINT STCK 00E1821BAF9B156F6200 TIME OF CHECKPOINT 11:08:43 SEPTEMBER 18, 2025 BEGIN CHECKPOINT RBA 00000000000248EB64F2 END CHECKPOINT RBA 00000000000248EBFC0C END CHECKPOINT STCK 00E1821A917EA4001600 TIME OF CHECKPOINT 11:03:43 SEPTEMBER 18, 2025 << - Record of Interest. BEGIN CHECKPOINT RBA 00000000000248E89498 << - Start RBA for CDC run. END CHECKPOINT RBA 00000000000248E93507 END CHECKPOINT STCK 00E18219736229BB0E00 TIME OF CHECKPOINT 10:58:43 SEPTEMBER 18, 2025 BEGIN CHECKPOINT RBA 00000000000248E237B6 END CHECKPOINT RBA 00000000000248E2CB8C END CHECKPOINT STCK 00E182185545C6605000 ``` -------------------------------- ### Example: Create GCP service account Source: https://www.striim.com/docs/en/using-google-managed-service-for-prometheus.html Example command to create a service account named 'otel-collector-sa' in project 'test-project'. ```bash gcloud iam service-accounts create otel-collector-sa \ --display-name="OTel Collector for GMP" \ --project test-project ``` -------------------------------- ### GG Trail Reader sample code with start position and exclusions Source: https://www.striim.com/docs/en/oracle-goldengate.html This example creates a GgTrailReadSrc source using GGTrailReader, specifying trail directory, file pattern, definition file, start position, and ExcludeTables. The source outputs to GGTrailReadStream. Note that AuditRBA and AuditPos appear in the output only when using version 5.4.0.2 or later. ```sql CREATE SOURCE GgTrailReadSrc USING GGTrailReader ( TrailDirectory:’./Samples/AppData/gg’, TrailFilePattern:’b1*’, DefinitionFile:’./Samples/AppData/gg/GGReadMultipleTables.def’, startPosition:’Filename:b1000000;offset:1039’, ExcludeTables :’QATEST.MULTTBL2’ ) OUTPUT TO GGTrailReadStream; ``` -------------------------------- ### Start Striim node and monitor logs Source: https://www.striim.com/docs/platform/en/importing-the-metadata-and-completing-the-upgrade.html Enable and start the striim-node service, then tail the log to verify startup. Wait ten seconds after starting the database before running these commands. ```bash sudo systemctl enable striim-node sudo systemctl start striim-node sudo tail -F /opt/striim/logs/striim-node.log ``` -------------------------------- ### AAL Parser example: CREATE SOURCE, TYPE, STREAM, and CQ Source: https://www.striim.com/docs/en/aal--apache-access-log--parser.html Shows the full setup for parsing Apache access logs with AALParser: create a source using FileReader, define an AccessLogEntry type, create an AccessStream, and a continuous query that parses fields from the raw stream. The example uses the AALParser and outputs to RawAccessStream. ```sql CREATE SOURCE AALSource USING FileReader ( directory:'Samples/appData', wildcard:'access_log.log', positionByEOF:false ) PARSE USING AALParser () OUTPUT TO RawAccessStream; CREATE TYPE AccessLogEntry ( src String KEY, accessTime DateTime, timeStr String, request String); CREATE STREAM AccessStream OF AccessLogEntry; CREATE CQ ParseAccessLog INSERT INTO AccessStream SELECT data[0], TO_DATE(data[3],"dd/MMM/yyyy:HH:mm:ss Z"), data[3], data[4] FROM RawAccessStream; ``` -------------------------------- ### Start the agent manually (first run) Source: https://www.striim.com/docs/en/connecting-striim-cloud-on-azure-to-data-services-behind-striim-forwarding-agent.html Start the agent for the first time to see live output. Successful start shows 'Connecting to cluster Striim.......connected'. ```shell cd /opt/striim/Agent/bin sudo ./agent.sh ``` -------------------------------- ### Run Windows Agent setup script Source: https://www.striim.com/docs/platform/en/striim-forwarding-agent-installation-and-configuration.html Runs the setupWindowsAgent.ps1 script as administrator to install the Striim Agent as a Windows service. The message 'Error in OpenSCManager' is of no concern if the script completes successfully. ```powershell .\setupWindowsAgent.ps1 ```