fpopic edited a comment on pull request #13083:
URL: https://github.com/apache/beam/pull/13083#issuecomment-730852531
> Also, re: the question above about pricing: the storage API is free when
used to read anonymous tables (e.g. query results). Users pay only when
scanning from a named table.
Let me understand on a small example.
Does it mean that for my existing named table `myproject:mydataset.mytable`
with the following schema:
```json
[
{
"mode": "NULLABLE",
"name": "my_string_field_1",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "my_string_field_2",
"type": "STRING"
}
]
```
1. Option A
```java
BigQueryIO
.read<T>(...)
.from("myproject.mydataset.mytable")
.withSelectedFields("my_string_field_1")
.withMethod(Method.DIRECT_READ))
```
Would only include the BigQuery Query scan cost of the field
`my_string_field_1` + Storage API scan cost for the field `my_string_field_1`?
2. Option B
```java
BigQueryIO
.read<T>(...)
.fromQuery("SELECT my_string_field_1 ||
'my_concat_business_logic_for_this_field' FROM `myproject.mydataset.mytable`")
.usingStandardSql()
.withMethod(Method.DIRECT_READ))
```
And here the cost would only include the BigQuery Query scan cost for
the field `my_string_field_1`?
Or you are just saying that anonymous table scan
```java
BigQueryIO
.read<T>(...)
.fromQuery("SELECT 'dummy' AS my_string_field_1")
.usingStandardSql()
.withMethod(Method.DIRECT_READ))
```
is free of the Storage API cost for the bytes of `dummy` bytes?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]