Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi guys help needed. So I tried getting data from Oracle sql via the function below.
Error: We encountered an error while trying to connect. SQL Command not properly ended
SQL: Select * From Table(TESTPOWERBI);
DROP TYPE VW_PEOPLE_TABLE; DROP TYPE VW_PEOPLE_TYPE; CREATE OR REPLACE TYPE VW_PEOPLE_TYPE AS OBJECT(NAME VARCHAR2(70), ALIAS VARCHAR2(90)); / CREATE OR REPLACE TYPE VW_PEOPLE_TABLE AS TABLE OF VW_PEOPLE_TYPEL / CREATE OR REPLACE FUNCTION TESTPOWERBI RETURN VW_PEOPLE_TABLE PIPELINED
AUTHID CURRENT_USER
AS VWT VW_PEOPLE_TABLE; PRAGMA AUTONOMOUS_TRANSACTION; BEGIN SELECT VW_PEOPLE_TYPE(NAME, ALIAS) BULK COLLECT INTO VWT FROM MYDATABASE; FOR i in 1 ... VWT.COUNT LOOP PIPE ROW (VW_PEOPLE_TYPE(VWT(i).NAME, VWT(i).ALIAS)); END LOOP; END TESTPOWERBI; / GRANT EXECUTE ON TESTPOWERBI TO PUBLIC
Solved! Go to Solution.
Hi wireless90,
It's very not recommended to implement transation SQL Script in power bi, because that may change data in your database. SQL Statement supported by power bi when connecting to database(SQL Server, Oracle) are like this pattern:
SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) HAVING condition ORDER BY column_name(s);
Regards,
Jimmy Tao
Hi wireless90,
It's very not recommended to implement transation SQL Script in power bi, because that may change data in your database. SQL Statement supported by power bi when connecting to database(SQL Server, Oracle) are like this pattern:
SELECT column_name(s) FROM table_name WHERE condition GROUP BY column_name(s) HAVING condition ORDER BY column_name(s);
Regards,
Jimmy Tao
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 69 | |
| 39 | |
| 35 | |
| 23 |