# Error 1103: Incorrect table name when reading using tiledb.cloud.sql.exec

**URL:** https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459
**Category:** Uncategorized
**Created:** [May 19, 2022, 12:46am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459 "2022-05-19T00:46:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rowanwins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/rowanwins/32/208_2.png) [@rowanwins](https://forum.tiledb.com/u/rowanwins)
#### Post date: [May 19, 2022, 12:46am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459/1 "2022-05-19T00:46:50Z")

</div>

Hey there,

I’m attempting to use `tiledb.cloud` to access some arrays that have been shared with me.  
The `tiledb.cloud.info()` call works for getting info about the array, but when I try and use the same array in a `tiledb.cloud.sql.exec()` i get an error

```auto
import tiledb, tiledb.cloud

tiledb.cloud.login(
    token = '...'
)

// Works
print(tiledb.cloud.info("tiledb://...my_array"))

df_sql = tiledb.cloud.sql.exec(
    query = 
        """
        select * from `tiledb://...my_array` 
        WHERE X >= 147.37 AND X <= 147.38 AND Y > -43.29 AND Y < -42
        """
)       

```

I get an error like

```auto
tiledb.cloud.tiledb_cloud_error.TileDBCloudError: Error 1103: Incorrect table name 'tiledb://...my_array' - Code: 5017

```

I am able to use the approach above to read a different array which has been shared with me, so it feels like there might be some permissions thing happening somewhere with the problematic array.

One difference might be around AWS permission. The array that I can read is in a public S3 bucket, whereas the array I can’t seem to read is in a restricted bucket. I have set some registered cloud credentials in my tiledb account settings, but I haven’t set any environment variables when executing my script.

Any other tips as to what to look for?

Thanks,  
Rowan

---

<div class="post-metadata">

### Author: ![rowanwins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/rowanwins/32/208_2.png) [@rowanwins](https://forum.tiledb.com/u/rowanwins)
#### Post date: [May 19, 2022, 12:52am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459/2 "2022-05-19T00:52:23Z")

</div>

And I should also note that accessing the array using the regular tiledb works fine

```auto
import tiledb

config = tiledb.Config()
config["rest.token"] = '...'

dataset = tiledb.open("tiledb://...my_array", 'r', ctx=tiledb.Ctx(config))
print(dataset.nonempty_domain())

```

---

<div class="post-metadata">

### Author: ![seth](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@seth](https://forum.tiledb.com/u/seth)
#### Post date: [May 19, 2022, 12:55am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459/3 "2022-05-19T00:55:19Z")

</div>

Hello @rowanwins and welcome to the TileDB forums! My first thought is that the number of characters in `tiledb://...my_array` is longer than 64 characters?

MariaDB, which we use for the underlying sql parsing, has a limitation of 64 characters for the `FROM` clause. We have a note on this in our [MariaDB docs](https://docs.tiledb.com/mariadb/usage#querying-tiledb-arrays) but I see we are missing this note and example from the TileDB Cloud docs. I will get this added.

If the character count is indeed `>= 64`a simple work around is as follows:

```auto
df_sql = tiledb.cloud.sql.exec(
    query = 
        """
        select * from `my_array` 
        WHERE X >= 147.37 AND X <= 147.38 AND Y > -43.29 AND Y < -42
        """
    init_commands=["CREATE TABLE my_array ENGINE=mytile uri='tiledb://...my_array'"]

```

What this effectively does is create an alias table in MariaDB with the name “my\_array” and we use the `uri` field we support as a table parameter to allow setting a longer character count for the full URI.

---

<div class="post-metadata">

### Author: ![rowanwins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/rowanwins/32/208_2.png) [@rowanwins](https://forum.tiledb.com/u/rowanwins)
#### Post date: [May 19, 2022, 12:58am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459/4 "2022-05-19T00:58:40Z")

</div>

That sounds very possible - the tablename I’m trying to access is 76 chars long inc the tiledb:// or 67 chars long without the tiledb:// bit 😮‍💨

Thanks for a quick response 👍 and hopefully it’s relatively easy to action on our end 🤞

---

<div class="post-metadata">

### Author: ![rowanwins](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.tiledb.com/rowanwins/32/208_2.png) [@rowanwins](https://forum.tiledb.com/u/rowanwins)
#### Post date: [May 19, 2022, 1:15am UTC](https://forum.tiledb.com/t/error-1103-incorrect-table-name-when-reading-using-tiledb-cloud-sql-exec/459/5 "2022-05-19T01:15:23Z")

</div>

And can confirm that workaround works perfectly thanks @seth !
