DevoInc/python-sdk

Issue using int types while uploading lookups

Closed this issue · 2 comments

Hi,

We have the next issue with one lookup upload: We upload a lookup with one field with "int" type and it shows up as int8 (the domain doesn't matter, because we have tried to upload that same lookup to devo_101 and telefonicasistemas domains). The problem is that we have to upload that lookup with int4 type because that might interfere with mata/mafia parsers, but it keeps showing up as int8.

Greetings.

Hi, with this code example I can upload fields in int4 type:

from devo.common import Configuration
from devo.sender import Lookup, Sender, SenderConfigSSL
config = Configuration()
engine_config = SenderConfigSSL(address=("us.elb.relay.logtrust.net", 443),
                                key="/home/jose/certs/joseramonafonso_awsusapro/joseramonafonso.key",
                                cert="/home/jose/certs/joseramonafonso_awsusapro/joseramonafonso.crt",
                                chain="/home/jose/certs/joseramonafonso_awsusapro/chain.crt")
con = Sender(engine_config)
lookup = Lookup(name="Test_types", con=con)
ki = 0
p_headers = Lookup.list_to_headers(headers=["id", "name", "myint"],
                                   key_index=ki, types=["int8", "str", "int4"])
lookup.send_control('START', p_headers, 'FULL')
lookup.send_data_line(key_index=ki, fields=["1", 'one', "1"])
lookup.send_data_line(key_index=ki, fields=["2", 'two', "2"])
lookup.send_data_line(key_index=ki, fields=["3", 'three', "3"])
lookup.send_data_line(key_index=ki, fields=["4", 'four', "4"])
lookup.send_data_line(key_index=ki, fields=["5", 'five', "5"])
lookup.send_control('END', p_headers, 'FULL')

If you want to use client-shell option you need to use one config file, yaml or json, with the value {'lookup': {...., 'types': [yourtypesstrs], ...}} filled.

If you cotinue having problems, please paste some code reference to see one failed example, or contact with our support team.
If your question are solved, please close the issue.
Greetings.

Sorry for the misunderstanding, checking I have verified that my answer is only valid for the USA.

In Europe and Spain, the platform components that allow sending int4 or int8 for these cases have not yet been updated. PS will inform you when these updates will be made.

I will close the issue when the platform updates.
Greetings