-
Notifications
You must be signed in to change notification settings - Fork 12
Enhancement - SQLFlow JSON Output: Include information from INSERT and DELETE statements in procedures. #8
Comments
@fprima Is it possible to post a sample stored proc? |
@sqlparser above please find a sample procedure. |
@cnfree {
"arguments": [
{
"coordinates": [
{
"x": 8,
"y": 24
},
{
"x": 8,
"y": 34
}
],
"id": "2",
"name": "pv_num1",
"datatype":"number",
"inout":"in"
},
{
"coordinates": [
{
"x": 8,
"y": 36
},
{
"x": 8,
"y": 40
}
],
"id": "4",
"name": "pv_num2",
"datatype":"number",
"inout":"inout"
}
],
"coordinates": [
{
"x": 8,
"y": 15
},
{
"x": 8,
"y": 22
}
],
"id": "1",
"name": "student_department_mod",
"type": "procedure"
} |
@fprima what's kind of information do you need in the JSON output for delete and update statement in the procedure. create or replace procedure student_department_mod(pv_num1 in number,pv_num2 in out number)
is
lr_address address%rowtype;
begin
--insert
insert into STUDENT (STUDENT_ID, NAME, AGE)
values (9998646, 'JON', 34);
-- select
select * into lr_address from ADDRESS where STUDENT_ID = pv_num2;
--update
update DEPARTMENT
set modified_date = sysdate
where department_id = 4;
--delete
delete from EMPLOYEE where employee_id = 9998;
end;
|
@sqlparser |
@cnfree thanks for the update. I checked the JSON output and see some issues. For example in the update statement we have "set modified_date = sysdate" and in the output I see Target: "column": "modified_date" and Source: "column": "modified_date" instead of sys date. Franco |
@cnfree another item is for example In the JSON below, "clauseType" is missing for the STUDENT_ID column although type is 'frd'. It should have "clauseType = where" in source |
@cnfree and lastly, were this changes committed to the package that we can download? |
@fprima The clauseType property is just used by join relation, but not frd relation. |
@sqlparser please answer for this question. |
Please update the DataFlowAnalyzer.java to support procedure input/output parameter. @cnfree |
@fprima please checkout https://github.com/sqlparser/gsp_demo and run DataFlowAnalyzer.java. And the new version handled the sysdate keyword as a constant. |
去公司官网看了下,东西挺好用,想买个资料无奈官网一个电话都没留,邮件也没人回复 |
We consider this as lineage because in some cases we may have store procedures that produce a full refresh of data. That is doing a Truncate/Delete followed by and Insert. For these type of store procedures, we will have no lineage from the JSON. We have seen in the SQLFlow demo in the Sample SQl that relationships are included in the JSON for INSERT statements. That is why we were wondering why they are not included in the store proc JSON.
The text was updated successfully, but these errors were encountered: