Question: I am using sparksql. Below is a sample query, which keeps running for long because of huge volume of data. I want to add user
I am using sparksql. Below is a sample query, which keeps running for long because of huge volume of data. I want to add user prompt for the query instead of hardcoding. Query should run for the value entered by user for these two prompts ALohaserialnumber
ALordernumberA
How can I add prompts for these two.
SELECT
TrimALmtype TrimALordernumber as ordnbr
ALmtype as ModTyp
ALserialnum as FuncSerNbr
ALpartnumber,
ALaccumquantity as TSN
ALaccumquantity as CSN
ALaccumquantity as TSDPI,
FROM
emsmoduleserialhistory AL
JOIN moduledescription AL ON trimALmtype trimALmtype AND trimALengtype trimALengtype
JOIN Engdescription AL ON trimALetype trimALetype
JOIN functiondescription AL ON trimALetype trimALbometype AND trimALmtype trimALbommtype
WHERE
trimALetypeA
AND TrimALohaserialnumber
AND trimALordernumberA
AND
LEFTtrimALeffenddtml
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
