4replies
-
There is no OOTB feature for address validation or enrichment based on address, but I saw people use MV to do this type of job.
After the table with the address information is extracted from the source, the data can be available as a source for a MV.- The MV read the data into the a Spark dataframe
- Data from the Spark data frame can be read into a Python List
- A REST API can be called for each row that need to be enriched
- A new data frame can be created as a collection of rows with enriched data
Sample code of reading the data from a data frame into a list:
df_src=read("<INCORTASCHEMA>.<TABLE>") row_list = df_src.select('COL1','COL2').rdd.map(tuple).collect()
There are multiple ways to covert the enriched data back and to be a data frame. For example, make the data as a list of tuple and call Spark data frame API.
result_df = spark.createDataFrame(list_of_tuple, result_schema)
Once the Spark data frame with the enriched data is save as a Incorta MV, it can be used in Incorta model and thus in reporting.