Google Sheet - How to override Matillion's column typecasting?

We are loading a Google Sheet from a client that has been shared to us.

A column in the data (Invoice Number) contains both numeric and alpha values.

The alpha values are after the first 100 rows.

Matillion is reading the metadata of the sheet and assigning a type of Integer to Invoice Number.

How do we override the type Integer and assign a type string?

 

Things I have tried:

  1. I have tried to typecast in the SQL (Advanced mode) but can’t seem to get this to work.
  2. I have tried creating a “static” stage table with a varchar Invoice Number column and turning off the ‘Recreate Target Table’ option in the Google Sheet component.
  3. I have tried setting some Connection Options in the Google Sheet component to affect the API call (valuerenderoption).

 

Any suggestions? Or is this an issue with the Google Sheet itself? Does the client need to set the column to “Text” explicitely?

 

Thanks

SOLVED:

 

Using a larger RowScanDepth in Connection Options has forced Matillion to compare more rows in the source data before assigning data types.

 

 

Hi,

 

Is there a solution for the same issue for Data Loader.

I can't find RowScanDepth parameter anywhere.

 

Thanks, B

Hi.

I mean here:

These are the settings where I would expect the parameter:

 

Thanks, B.

Yes, it is the Cloud version. I am new ti Matillion and didn't even know there are old and new (Cloud) versions :)

If I find a solution, I will post it here.

 

All available parameters are hard predefined. These are the available options:

I have contacted Matillion support, and they have added the missing parameter in Cloud Data Loader.

Hi there @SB699925​!

Thanks so much for sharing how you solved this, this will be super helpful to anyone else in the community who has the same question as you in the future.

Thanks again!

Claire

Hi - which component do you mean?

Data Transfer / Database Query?

 

Not sure what you mean by Data Loader, sorry!

Ok I see, it looks like you are on the Cloud version. We are still in the Matillion ETL, non-cloud. They are quite different!

 

I'm not familiar with the Data Loader in that case - but if you discover the answer please let me know!

I see, in that case if the help documentation for the Data Loader doesn't mention it then maybe you should raise a ticket with Matillion and have them respond directly?

All the best!

What if you enter the RowScanDepth as a connection parameter? Does that work? Can you enter free-text in the Parameter list or is that a hard-coded drop-down?