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
질문됨 6달 전193회 조회
2개 답변
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.

답변함 6달 전
profile picture
전문가
검토됨 한 달 전
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
답변함 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인