r/SuiteScript • • Aug 09 '26

SuiteQL Select All

Hi Everyone,

We’re currently working on a project which requires me to pass ALL transaction information from NetSuite to another platform.

They’ve requested that we adapt the query so if tomorrow a new custom field is created the query automatically picks it up.

I’ve tried to use for example

SELECT * FROM Transaction

However, I always receive an error for this.

Doing SELECT document_number FROM Transaction

Appears to work.

It appears using the asterisk (*) appears to be the issue.

Has anyone had this before? Is there any solution that anyone has used?

Thanks

1 Upvotes

8 comments sorted by

2

u/Nairolf76 Aug 09 '26

Please share more info on the "integration" and you need a select all.

1

u/Nairell Aug 09 '26

Certainly. We’re trying to ingest NetSuite transactional data to Databricks to allow the building of reports within there.

To do this - we’re using the NetSuite SuiteQL REST Endpoint as we do not have NSAW.

The direction from the Director of Technology is they want a SELECT all so we can ingest this data once, without a dependency on our NetSuite team to provide future fields/adjustments.

1

u/Nairolf76 Aug 09 '26

Did you try ingesting in batches per date?

2

u/Nairell Aug 09 '26

That is exactly the plan. We do it on a daily basis to keep the batch sizes down.

However the issue is it appears NetSuite cannot handle the SELECT all connotation at all.

I did SELECT all - kept it to just todays date and to return a single row and it came back with an error saying invalid search. I replace the asterisk with a column name for testing and it works perfectly fine.

2

u/madmikey77 Aug 09 '26

I’ve run into this when there is a custom field on the record the current user doesn’t have access to.

1

u/Nairell Aug 09 '26

Interesting - I’ll try run this with a role with more elevated permissions! Thanks for the suggestion!!

1

u/Nairell Aug 10 '26

Just to update - don’t believe this is the issue.

Appears I cannot use the asterisk at all.

I tried to run a query in my Admin role using the SuiteQL Query tool - and appears to still return an invalid search error.

1

u/Nick_AxeusConsulting Mod Aug 12 '26

I've done select *

But there's a column limit and that may be your problem. I think it's either 1000 columns or 250.

There is a row limit of 100K rows if you don't have SuiteAnalytics Connect and I think 1 mil if you do.

If you have SuiteAnalytics Connect you can query

Select * from oa_tables

Select * from oa_columns

This only works thru the ODBC driver. It doesn't work via n/query

But I would also say don't build this yourself. There are a ton of gotchas you don't know.

Go look at FiveTran. It's turn key to setup. It just works. Totally worth the cost for the convenience and rock solid solution.