Skip to content

Table.TransformColumnTypes - Identifying which transformation functions are used#300

Merged
v-dirichards merged 3 commits intoMicrosoftDocs:mainfrom
bgribaudo:patch-8
Apr 14, 2025
Merged

Table.TransformColumnTypes - Identifying which transformation functions are used#300
v-dirichards merged 3 commits intoMicrosoftDocs:mainfrom
bgribaudo:patch-8

Conversation

@bgribaudo
Copy link
Copy Markdown
Contributor

No description provided.

@prmerger-automator
Copy link
Copy Markdown
Contributor

@bgribaudo : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 8518a0e:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/table-transformcolumntypes.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@v-dirichards
Copy link
Copy Markdown
Contributor

@DougKlopfenstein

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label Apr 7, 2025

The type value in the `typeTransformations` parameter can be `any`, all of the `number` types, `text`, all of the `date`, `time`, `datetime`, `datetimezone`, and `duration` types, `logical`, or `binary`. The `list`, `record`, `table`, or `function` types aren't valid for this parameter.

For each column in `typeTransformations`, the ".From" method corresponding to the specified type value is used to perform the transformation. For example, if a type value of `Currency.Type` is given for a column, the transformation function `Currency.From` will be applied to each value in that column.
Copy link
Copy Markdown
Contributor

@ehrenMSFT ehrenMSFT Apr 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding "normally" below, because there are a few, ultra-obscure edge cases where that's not the case, but I don't think it's worth enumerating them.

Suggested change
For each column in `typeTransformations`, the ".From" method corresponding to the specified type value is used to perform the transformation. For example, if a type value of `Currency.Type` is given for a column, the transformation function `Currency.From` will be applied to each value in that column.
For each column in `typeTransformations`, the ".From" method corresponding to the specified type value is normally used to perform the transformation. For example, if a type value of `Currency.Type` is given for a column, the transformation function `Currency.From` will be applied to each value in that column.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ehrenMSFT! How does it look now?

@prmerger-automator
Copy link
Copy Markdown
Contributor

@bgribaudo : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@prmerger-automator prmerger-automator Bot requested a review from ehrenMSFT April 8, 2025 14:26
@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 620b162:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/table-transformcolumntypes.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@bgribaudo
Copy link
Copy Markdown
Contributor Author

@ehrenMSFT, you have me curious. Even though documenting them doesn't belong on this page, any chance you'd be willing to share the edge cases where the corresponding .From function isn't used? :-)

@ehrenMSFT
Copy link
Copy Markdown
Contributor

@ehrenMSFT, you have me curious. Even though documenting them doesn't belong on this page, any chance you'd be willing to share the edge cases where the corresponding .From function isn't used? :-)

I don't know much about the scenario, but there are cases where the presence of certain metadata on the column type indicates that a number value comes from the Windows filesystem. In that case, we call DateTime/DateTimeZone.FromFileTime instead of From.

There are also cases where, based on a flag, we can convert to list or record using an "as" operation. But this seems to only be used internally in the JSON library.

@learn-build-service-prod
Copy link
Copy Markdown
Contributor

Learn Build status updates of commit d1fe95c:

✅ Validation status: passed

File Status Preview URL Details
query-languages/m/table-transformcolumntypes.md ✅Succeeded

For more details, please refer to the build report.

For any questions, please:

@v-dirichards
Copy link
Copy Markdown
Contributor

@DougKlopfenstein - Could you review this proposed update to your article and enter #sign-off in a comment if it's ready to merge?

@DougKlopfenstein
Copy link
Copy Markdown
Contributor

#sign-off

@v-dirichards v-dirichards merged commit 5cdc911 into MicrosoftDocs:main Apr 14, 2025
2 checks passed
@bgribaudo bgribaudo deleted the patch-8 branch April 22, 2025 13:00
@bgribaudo
Copy link
Copy Markdown
Contributor Author

@ehrenMSFT, you have me curious. Even though documenting them doesn't belong on this page, any chance you'd be willing to share the edge cases where the corresponding .From function isn't used? :-)

I don't know much about the scenario, but there are cases where the presence of certain metadata on the column type indicates that a number value comes from the Windows filesystem. In that case, we call DateTime/DateTimeZone.FromFileTime instead of From.

There are also cases where, based on a flag, we can convert to list or record using an "as" operation. But this seems to only be used internally in the JSON library.

Thanks, @ehrenMSFT!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants