cancel
Showing results for 
Search instead for 
Did you mean: 

Consume SQL table on Python Operation in SAP Data Intelligence

0 Kudos

Hi,

I am trying to do data processing using python operator. The data is coming from sql server. I am using table consumer to load the data from sql server. But on the python operator read the input data as empty dictionary. Does someone have an example to process the table that coming from SQL or SAP DWC on python operator? and also sample python script.

Apologize if the question is duplicate.

Thank you.

Accepted Solutions (0)

Answers (2)

Answers (2)

Dokon
Advisor
Advisor

Hi Agus,

You can use "Table To Message Converter" Operator in Structured Data Operator Category.

Thanks,

Dokon

0 Kudos

Hi,

Thank you for your help. I have tried it and on python operator it reads as message. Do you have example python script how to process the message on the python operator?

Again, thank you.

Regards,

Agus

Dokon
Advisor
Advisor

Hi,

You can find "File to File Python" graph in Modeler -> Graph Tab.

Thanks,

Dokon

michal_majer
Active Participant

Yes, Table to Message looks like a best approach for this case.

0 Kudos

Hi, Don-kon Kim,

Thank you for the example, that's really helps.

In the end of the process I want to write the data to Data Warehouse Cloud or SAP DI Data Lake. The data is a data frame how I set the output for the python operator. And what output port that I should choose?.

Thank you.

Regards,

Agus

michal_majer
Active Participant
0 Kudos

Hi Agus,

The Table Consumer comes from Structured Operators category and You need it to connect it to other operators from this category (check docu below).

You could try to use SQL Server SQL Consumer with Flowagent CSV Producer. Output content form CSV Producer could be consumed by any base operator (python, node, js, go).

Alternative way is to load the data to file - then read the file - process - etc.

If You need more details let me know.

Best,

Michal

0 Kudos

Hi Michal,

Thank you for your help. I will try it first. Will back to you if need more detail.

Regards,

Agus