Hi Team,
I am trying to read the selected products from a input table that has 1 million unique products and I want to pass the other node character list output to use as input to data process(input table).
Input table
Prodid, Prodname
1, abc
2, def
3,xyz
......
Character list output: [1,3]
I tried to create the data process, criteria variables data type populated by default as per the input table column data type (character in our example). so it expects single input parameter as input.
Is it possible to specify the character list as a type for criteria variables to read multiple values or Is there any way in RTDM to pull selected records from input table by passing list values as input ?
Thanks
Bhanu Charan
Hi James,
In our data Some of the products have more than 16 values. I have tried Jython to read cdm data(Postgres). Below is the sample code to fetch the data using sample sql into RTDM using process node.
import os
print(os.system("hostname"))
import psycopg2
productlist =[]
data = []
pg_conn = psycopg2.connect(database="postgres", user="xxxxxx", password="xxxxxxxxx", host="postgresdb", port=5432)
pg_cur = pg_conn.cursor()
pg_cur.execute("SELECT productid FROM cdm.table limit 10")
data = pg_cur.fetchall()
Above code is working fine when I submit the same in Mid tier server (cli). When I execute the campaign I am getting the below error
ImportError: No module named _psycopg
Added the _pyscopg package in jython jar file as well and tried the below code to install _psycopg package.
import os
print(os.system("hostname"))
import subprocess
import sys
def install(package):
subprocess.call([sys.executable, "-m", "pip", "install", psycopg2])
print("Done Install") /* code is executing till this point*/
import psycopg2 /* throwing error */
print("Imported Package Install")
Couldn't find a detailed logs in sasserver6_1,sasserver7_1. It is writing print statements in catalina logs.
Please suggest ?
Thanks
Bhanu
Want to review SAS Customer Intelligence 360? Gartner and G2 are offering a gift card or charitable donation for each accepted review. Use this link for G2 to opt out of receiving anything of value for your review.
SAS Customer Intelligence 360
Training Resources
SAS Customer Intelligence Learning Subscription (login required)
SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.
Find more tutorials on the SAS Users YouTube channel.
Want to review SAS Customer Intelligence 360? Gartner and G2 are offering a gift card or charitable donation for each accepted review. Use this link for G2 to opt out of receiving anything of value for your review.
SAS Customer Intelligence 360
Training Resources
SAS Customer Intelligence Learning Subscription (login required)