Test source connection outside Infoworks product

Test source connection outside Infoworks product

The aim of this article is document the steps to test the connection outside the Infoworks product. This is mainly for internal debugging purposes and is not intended to be a customer facing article.

SQL Server source:

1.Download below files.

<https://aflac-jar-drop.s3.amazonaws.com/sql-server-test/SQLDatabaseConnection.java>

<https://aflac-jar-drop.s3.amazonaws.com/sql-server-test/mssql-jdbc-7.4.1.jre8.jar>

  1. Run the below commands to test the connection

javac SQLDatabaseConnection.java

java -cp .:mssql-jdbc-7.4.1.jre8.jar SQLDatabaseConnection

Note: Currently, the user and password files in the file wrong. One can edit file and pass the correct values and retry following below instructions

rm SQLDatabaseConnection.class

javac SQLDatabaseConnection.java

java -cp .:mssql-jdbc-7.4.1.jre8.jar SQLDatabaseConnection

Kafka and Confluent Kafka source:

  1. Assuming user is root on master node. Create a kafka directory. mkdir kafka

  2. Download the dependencies

wget <https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/2.5.0/kafka-clients-2.5.0.jar> wget <https://repo1.maven.org/maven2/org/slf4j/slf4j-log4j12/1.7.25/slf4j-log4j12-1.7.25.jar>

wget <https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar>

  1. Run below command which test the connection (i.e. list the topics)

javac -cp ".:/root/kafka/*" consumer1.java java -cp ".:/root/kafka/*" consumer1

Ingest the data from cdata source outside Infoworks

Example: GoogleCM

  1. Launch the spark-shell and the below commands:

val query = """(select Ad,AdId, BrowserPlatform,PlatformType,Creative, CreativeId,AdStatus, AdType, Advertiser,AdvertiserId,Campaign, CampaignId,PackageRoadblock, PackageRoadblockId,ActivityClickThroughConversions, ActivityClickThroughRevenue,Clicks,ClickThroughUrl,ClickRate,ActivityId,Activity, ActivityGroup, ActivityGroupId,impressions, Site, SiteDirectory, SiteDirectoryId, SiteId, SiteKeyname,ActivityViewThroughConversions, ActivityViewThroughRevenue,MediaCost,Placement, PlacementId,ActiveViewEligibleImpressions, ActiveViewMeasurableImpressions, ActiveViewViewableImpressions from StandardReport where DateRange = 'TODAY')"""

Copy

Note: All the quotes for values of the connection strings options need to be escaped. Another RTK if the above one does not work

Copy

Write to target directory and creating a table.

Copy
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches