Skip to content

Is it possible to extract table and its related columns from sql query? #1349

Description

@vasudevla

Question

For example,
If query is

SELECT Orders.OrderID, Customers.CustomerName, Orders.OrderDate
FROM Orders
INNER JOIN Customers ON Orders.CustomerID=Customers.CustomerID;

I need something like below,

{
   "tableName":"Orders",
   "columns":[
      "OrderID",
      "OrderData",
      "CustomerID"
   ]
}

And

{
   "tableName":"Customers",
   "columns":[
      "CustomerName",
      "CustomerID"
   ]
}

I can extract table names and column names separately,
but is there anyway to extract table and its related columns?
or
Is it possible to extract table and its related columns in a single struct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions