Profile MySQL Date Columns using DataBrew programmatically

0

Hi,

I'm trying to programmatically kick off a DataBrew profile job using AWS SDK from my java application. I need to profile MySQL database tables. While I'm able to do that from my application, I see that date columns aren't getting profiled. I couldn't find a way to cast a date column as String when creating the dataset or in the profile configuration. Is there a way I can do this?

Thanks, Meena

Meena
posta 6 mesi fa193 visualizzazioni
2 Risposte
0

Dear Customer,

From your case correspondence, I understand you're attempting to launch a databrew profile job programmatically from a Java application using the AWS SDK. So you need to profile your SQL database tables, and you mentioned that while you can do so from your application, the date columns aren't getting profiled, so you couldn't find a way to cast a date column as a String when creating the dataset or in the profile configuration, so you were wondering if there was a way.

With regards to your question:

I was able to search internal and I was able to see that There is currently no way to cast a date column as a string when creating a dataset or in the profile configuration in DataBrew.

One workaround is to use a SQL query to cast the date column as a string before creating the dataset. For example, if you are using the AWS JDBC driver to connect to your MySQL database, you could use the following SQL query:

============ SELECT CAST(date_column AS VARCHAR(255)) AS string_date_column FROM table_name;

I hope the above answers your question. Please let me know if you have any other questions regarding this case, I will be happy to help you.

con risposta 6 mesi fa
profile picture
ESPERTO
verificato un mese fa
0

Thank you for the response. I have tried that already. Currently SQL query option is available only for Amazon RedShift and Snowflake datasources.

Meena
con risposta 6 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande