[
https://issues.apache.org/jira/browse/BEAM-13194?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kenneth Knowles updated BEAM-13194:
-----------------------------------
Description:
https://stackoverflow.com/questions/69863008/call-the-bigquery-stored-procedure-in-dataflow-pipeline
I have written a stored procedure in Bigquery and trying to call it within a
dataflow pipeline. This works for the {{SELECT}} queries but not for the stored
procedure:
{code:python}
pipeLine = beam.Pipeline(options=options)
rawdata = ( pipeLine
| beam.io.ReadFromBigQuery(
query="CALL my_dataset.create_customer()", use_standard_sql=True)
)
pipeLine.run().wait_until_finish()
{code}
Stored procedure:
{code:sql}
CREATE OR REPLACE PROCEDURE my_dataset.create_customer()
BEGIN
SELECT *
FROM `project_name.my_dataset.my_table`
WHERE customer_name LIKE "%John%"
ORDER BY created_time
LIMIT 5;
END;
{code}
I am able to create the stored procedure and call it within the Bigquery
console. But, in the dataflow pipeline, it throws an error:
{quote}"code": 400,
"message": "configuration.query.destinationEncryptionConfiguration cannot be
set for scripts",
"message": "configuration.query.destinationEncryptionConfiguration cannot be
set for scripts", "domain": "global",
"reason": "invalid"
"status": "INVALID_ARGUMENT"
{quote}
was:
[[stackoverflow]
|https://stackoverflow.com/questions/69863008/call-the-bigquery-stored-procedure-in-dataflow-pipeline]
I have written a stored procedure in Bigquery and trying to call it within a
dataflow pipeline. This works for the {{SELECT}} queries but not for the stored
procedure:
pipeLine = beam.Pipeline(options=options)
rawdata = ( pipeLine
| beam.io.ReadFromBigQuery(
query="CALL my_dataset.create_customer()", use_standard_sql=True)
)
pipeLine.run().wait_until_finish()
[{{}}|https://stackoverflow.com/questions/69863008/call-the-bigquery-stored-procedure-in-dataflow-pipeline]
Stored procedure:
CREATE OR REPLACE PROCEDURE my_dataset.create_customer()
BEGIN
SELECT *
FROM `project_name.my_dataset.my_table`
WHERE customer_name LIKE "%John%"
ORDER BY created_time
LIMIT 5;
END;
I am able to create the stored procedure and call it within the Bigquery
console. But, in the dataflow pipeline, it throws an error:
{quote}"code": 400,
"message": "configuration.query.destinationEncryptionConfiguration cannot be
set for scripts",
"message": "configuration.query.destinationEncryptionConfiguration cannot be
set for scripts", "domain": "global",
"reason": "invalid"
"status": "INVALID_ARGUMENT"
{quote}
> Call the stored procedure in dataflow pipeline
> ----------------------------------------------
>
> Key: BEAM-13194
> URL: https://issues.apache.org/jira/browse/BEAM-13194
> Project: Beam
> Issue Type: Bug
> Components: io-py-gcp
> Reporter: ahalya
> Priority: P2
>
> https://stackoverflow.com/questions/69863008/call-the-bigquery-stored-procedure-in-dataflow-pipeline
> I have written a stored procedure in Bigquery and trying to call it within a
> dataflow pipeline. This works for the {{SELECT}} queries but not for the
> stored procedure:
> {code:python}
> pipeLine = beam.Pipeline(options=options)
> rawdata = ( pipeLine
> | beam.io.ReadFromBigQuery(
> query="CALL my_dataset.create_customer()",
> use_standard_sql=True)
> )
> pipeLine.run().wait_until_finish()
> {code}
> Stored procedure:
> {code:sql}
> CREATE OR REPLACE PROCEDURE my_dataset.create_customer()
> BEGIN
> SELECT *
> FROM `project_name.my_dataset.my_table`
> WHERE customer_name LIKE "%John%"
> ORDER BY created_time
> LIMIT 5;
> END;
> {code}
> I am able to create the stored procedure and call it within the Bigquery
> console. But, in the dataflow pipeline, it throws an error:
> {quote}"code": 400,
> "message": "configuration.query.destinationEncryptionConfiguration cannot be
> set for scripts",
> "message": "configuration.query.destinationEncryptionConfiguration cannot be
> set for scripts", "domain": "global",
> "reason": "invalid"
> "status": "INVALID_ARGUMENT"
> {quote}
>
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)